biotite.sequence.io.fasta

This subpackage is used for reading and writing sequence objects using the popular FASTA format.

This package contains the FastaFile, which provides a dictionary like interface to FASTA files, where the header lines are keys and the strings containing sequence data are the corresponding values.

Furthermore, the package contains convenience functions for getting/setting directly Sequence objects, rather than strings.

Content

FastaFile

This class represents a file in FASTA format.

get_alignment

Get an alignment from a FastaFile instance.

get_sequence

Get a sequence from a FastaFile instance.

get_sequences

Get dictionary from a FastaFile instance, where headers are keys and sequences are values.

set_alignment

Fill a FastaFile with gapped sequence strings from an alignment.

set_sequence

Set a sequence in a FastaFile instance.

set_sequences

Set sequences in a FastaFile instance from a dictionary.