skbio.sequence.DNA.read#
- classmethod DNA.read(file, format=None, **kwargs)[source]#
Create a new
DNA
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 seeskbio.io
.Supported file formats include:
'embl'
(skbio.io.format.embl
)'fasta'
(skbio.io.format.fasta
)'fastq'
(skbio.io.format.fastq
)'qseq'
(skbio.io.format.qseq
)'genbank'
(skbio.io.format.genbank
)'gff3'
(skbio.io.format.gff3
)
- Parameters:
- fileopenable (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.- formatstr, optional
The format must be a format name with a reader for
DNA
. If a format is not provided or is None, it will attempt to guess the format.- kwargsdict, optional
Keyword arguments passed to
skbio.io.registry.read()
and the file format reader forDNA
.
- Returns:
- DNA
A new instance.