rotifer.db.ncbi.mirror.GenomeFeaturesCursor#

class rotifer.db.ncbi.mirror.GenomeFeaturesCursor(path='/databases/genomes', exclude_type=['source', 'gene', 'mRNA'], autopid=False, codontable='Bacterial', progress=False, tries=1, batch_size=None, threads=2, *args, **kwargs)[source]#

Bases: GenomeFeaturesCursor, GenomeCursor

Fetch genome annotation from a local mirror as dataframes.

Genomes are read like GenomeCursor does, then converted to feature tables with one row per annotated feature.

Parameters:
pathstr, optional

Path to a mirror of the genomes section of the NCBI FTP site.

exclude_typelist of str, default ['source', 'gene', 'mRNA']

Feature types to ignore.

autopidbool, default False

Automatically set protein identifiers.

codontablestr or int, default ‘Bacterial’

Codon table used when the data does not define one.

progressbool, default False

Whether to print a progress bar.

triesint, default 1

Accepted for interface compatibility; local reads are attempted only once.

batch_sizeint, optional

Number of accessions per batch.

threadsint, optional

Number of processes used for parallel reads.

Examples

Load the feature tables of two genomes:

>>> from rotifer.db.ncbi import mirror
>>> g = ['GCA_018744545.1', 'GCA_901308185.1']
>>> gfc = mirror.GenomeFeaturesCursor()
>>> df = gfc.fetchall(g)