skbio.alignment.Alignment.write

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

Write an instance of Alignment to a file.

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

Supported file formats include:

Parameters:

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 Alignment. Default is ‘fasta’.

kwargs : dict, optional

Keyword arguments passed to skbio.io.write and the file format writer.