rotifer.db.ncbi.assemblies#

rotifer.db.ncbi.assemblies(baseurl='ftp://ftp.ncbi.nlm.nih.gov/genomes/ASSEMBLY_REPORTS', targets=['refseq', 'genbank', 'refseq_historical', 'genbank_historical'], taxonomy=True, progress=True)[source]#

Load a table documenting all NCBI genome assemblies.

By default, the concatenated assembly summary tables are downloaded from the genomes/ASSEMBLY_REPORTS directory of the NCBI FTP site. A local directory containing assembly_summary_*.txt files may be used instead.

Parameters:
baseurlstr, optional

URL or directory with assembly_summary_*.txt files. Defaults to the NCBI FTP site named in the configuration.

targetslist of str, optional

Genome database sections to load. Options are refseq, genbank, refseq_historical and genbank_historical. All four are loaded by default.

taxonomybool, default True

Whether to add taxonomy data to the table, using TaxonomyCursor.

progressbool, default True

Display progress messages.

Returns:
pandas.DataFrame

One row per assembly.

Notes

Two columns are added to the original table: source (the genome database section) and loaded_from (the URL or path each row was read from). The ftp_path column is rewritten to use the ftp scheme.

Examples

Download from the NCBI FTP site:

>>> from rotifer.db import ncbi
>>> a = ncbi.assemblies()

Load local copies stored in /db/ncbi:

>>> b = ncbi.assemblies(baseurl="/db/ncbi")