set_sequence#
- biotite.sequence.io.fasta.set_sequence(fasta_file, sequence, header=None, as_rna=False)[source]#
Set a sequence in a
FastaFileinstance.- Parameters:
- fasta_fileFastaFile
The
FastaFileto be accessed.- sequenceSequence
The sequence to be set.
- headerstr, optional
The header for the sequence. Default is
'sequence'.- as_rnabool, optional
If set to true,
'T'will be replaced by'U', if aNucleotideSequencewas given.
- Raises:
- ValueError
If the sequence’s alphabet uses symbols other than single characters.