biotite.sequence.io.fasta.set_sequence

biotite.sequence.io.fasta.set_sequence(fasta_file, sequence, header=None)[source]

Set a sequence in a FastaFile instance.

Parameters:
fasta_file : FastaFile

The FastaFile to be accessed.

sequence : Sequence

The sequence to be set.

header : str, optional

The header for the sequence. Default is ‘sequence’.

Raises:
ValueError

If the sequence’s alphabet uses symbols other than single letters.