Fork me on GitHub"

# skbio.alignment.TabularMSA.read

classmethod `TabularMSA.``read`(file, format=None, **kwargs)

  Create a new `TabularMSA` instance from a file.

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

  Supported file formats include:

  - `'clustal'` (`skbio.io.format.clustal`)
  - `'fasta'` (`skbio.io.format.fasta`)
  - `'fastq'` (`skbio.io.format.fastq`)
  - `'phylip'` (`skbio.io.format.phylip`)
  - `'stockholm'` (`skbio.io.format.stockholm`)

  Parameters:

  file : openable (filepath, URL, filehandle, etc.)

  > The location to read the given format. Something that is understood by `skbio.io.util.open()`. Filehandles are not automatically closed, it is the responsibility of the caller.

  format : str, optional

  > The format must be a format name with a reader for `TabularMSA`. If a format is not provided or is None, it will attempt to guess the format.

  kwargs : dict, optional

  > Keyword arguments passed to `skbio.io.registry.read()` and the file format reader for `TabularMSA`.

  Returns:

  TabularMSA

  > A new instance.

  See also

  `write`, `skbio.io.registry.read`, `skbio.io.util.open`, `skbio.io.format.clustal`, `skbio.io.format.fasta`, `skbio.io.format.fastq`, `skbio.io.format.phylip`, `skbio.io.format.stockholm`