DNASequence.write(fp, format='fasta', **kwargs)[source]

Write an instance of DNASequence to a file.

This is a convenience method for For more information about the I/O system in scikit-bio, please see

Supported file formats include:


fp : filepath or filehandle

The location to write the given format into. Filepaths are automatically closed when written; filehandles are the responsibility of the caller.

format : str

The format must be a registered format name with a writer for DNASequence. Default is ‘fasta’.

kwargs : dict, optional

Keyword arguments passed to and the file format writer.