skbio.sequence.SubstitutionMatrix.write#
- SubstitutionMatrix.write(file, format='lsmat', **kwargs)[source]#
Write an instance of
DissimilarityMatrix
to a file.This is a convenience method for
skbio.io.registry.write()
. For more information about the I/O system in scikit-bio, please seeskbio.io
.Supported file formats include:
'binary_dm'
(skbio.io.format.binary_dm
)'lsmat'
(skbio.io.format.lsmat
)
- Parameters:
- fileopenable (filepath, URL, filehandle, etc.)
The location to write the given format into. Something that is understood by
skbio.io.util.open()
. Filehandles are not automatically closed, it is the responsibility of the caller.- formatstr
The format must be a registered format name with a writer for
DissimilarityMatrix
. Default is ‘lsmat’.- kwargsdict, optional
Keyword arguments passed to
skbio.io.registry.write()
and the file format writer.