set_sequence#
- biotite.sequence.io.fasta.set_sequence(fasta_file: FastaFile, sequence: Sequence[str], header: str | None = None, as_rna: bool = False) None[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.