sequence subpackage#

From A to T - The sequence subpackage#

biotite.sequence is a Biotite subpackage concerning maybe the most prevalent data type in bioinformatics: sequences.

Sequences are represented by Sequence objects, with different subclasses for different types of sequences. For example, to present DNA one would use a NucleotideSequence.

import biotite.sequence as seq

dna = seq.NucleotideSequence("AACTGCTA")
print(dna)
AACTGCTA

Each type of sequence allows only for a certain set of symbols, which is controlled by the Alphabet of a sequence. For an unambiguous DNA sequence, the alphabet comprises the four nucleobases.

print(dna.alphabet)
('A', 'C', 'G', 'T')