biotite.sequence.io.fasta.get_sequences¶
- biotite.sequence.io.fasta.get_sequences(fasta_file, seq_type=None)[source]¶
Get dictionary from a
FastaFile
instance, where headers are keys and sequences are values.The type of sequence is guessed from the sequence string: First, a conversion into a
NucleotideSequence
and second a conversion into aProteinSequence
is tried.- Parameters
- fasta_fileFastaFile
The
FastaFile
to be accessed.- seq_typeClass, optional
The
Sequence
subclass contained in the file. If not set, biotite will attempt to automatically detect whether a nucleotide or protein sequence is present.
- Returns
- seq_dictdict
A dictionary that maps headers to
NucleotideSequence
and/orProteinSequence
instances as values.
- Raises
- ValueError
If at least on of the sequence strings can be neither converted into a
NucleotideSequence
nor aProteinSequence
.
Gallery¶
Bionigma style multiple sequence alignment