get_sequences#
- biotite.sequence.io.fasta.get_sequences(fasta_file, seq_type=None)[source]#
Get dictionary from a
FastaFileinstance, where headers are keys and sequences are values.The type of sequence is guessed from the sequence string: First, a conversion into a
NucleotideSequenceand second a conversion into aProteinSequenceis tried.- Parameters:
- fasta_fileFastaFile
The
FastaFileto be accessed.- seq_typeClass, optional
The
Sequencesubclass 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
NucleotideSequenceand/orProteinSequenceinstances as values.
- Raises:
- ValueError
If at least on of the sequence strings can be neither converted into a
NucleotideSequencenor aProteinSequence.
Gallery#
Customized visualization of a multiple sequence alignment
Customized visualization of a multiple sequence alignment