NCBI Genome Downloading Scripts
So this is a set of scripts that focuses on the actual genome downloading.
Installation
pip install ncbi-genome-download
Alternatively, clone this repository from GitHub, then run (in a python virtual environment)
pip install .
If this fails on older versions of Python, try updating your pip tool first:
pip install --upgrade pip
and then rerun the ncbi-genome-download install.
Usage
To download all bacterial RefSeq genomes in GenBank format from NCBI, run the following:
ncbi-genome-download bacteria
Downloading multiple groups is also possible:
ncbi-genome-download bacteria,viral
If you’re on a reasonably fast connection, you might want to try running multiple downloads in parallel:
ncbi-genome-download bacteria --parallel 4
To download all fungal GenBank genomes from NCBI in GenBank format, run:
ncbi-genome-download --section genbank fungi
To download all viral RefSeq genomes in FASTA format, run:
ncbi-genome-download --format fasta viral
It is possible to download multiple formats by supplying a list of formats or simply download all formats:
ncbi-genome-download --format fasta,assembly-report viral ncbi-genome-download --format all viral
To download only completed bacterial RefSeq genomes in GenBank format, run:
ncbi-genome-download --assembly-level complete bacteria
To download only bacterial reference genomes from RefSeq in GenBank format, run:
ncbi-genome-download --refseq-category reference bacteria
To download bacterial RefSeq genomes of the genus Streptomyces, run:
ncbi-genome-download --genus Streptomyces bacteria
Note: This is a simple string match on the organism name provided by NCBI only.
You can also use this with a slight trick to download genomes of a certain species as well:
ncbi-genome-download --genus "Streptomyces coelicolor" bacteria
Multiple genera is also possible:
ncbi-genome-download --genus "Streptomyces coelicolor,Escherichia coli" bacteria
To download bacterial RefSeq genomes based on their NCBI species taxonomy ID, run:
ncbi-genome-download --species-taxid 562 bacteria
Note: The above command will download all RefSeq genomes belonging to Escherichia coli.
To download a specific bacterial RefSeq genomes based on its NCBI taxonomy ID, run:
ncbi-genome-download --taxid 511145 bacteria
Note: The above command will download the RefSeq genome belonging to Escherichia coli str. K-12 substr. MG1655.
It is also possible to download multiple species taxids or taxids by supplying the numbers in a comma-separated list:
ncbi-genome-download --taxid 9606,9685 --assembly-level chromosome vertebrate_mammalian
Note: The above command will download the reference genomes for cat and human.
ncbi-genome-download --human-readable bacteria
To get an overview of all options, run
ncbi-genome-download --help
As a method
import ncbi_genome_download as ngd ngd.download()
Note: To specify a taxonomic group, like bacteria, use the group keyword.
License
Metadata
Release files for ncbi-genome-download 0.2.6
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| ncbi-genome-download-0.2.6.tar.gz | 4.4 MB | Without provenance | Details for ncbi-genome-download-0.2.6.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| ncbi_genome_download-0.2.6-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details for ncbi_genome_download-0.2.6-py2.py3-none-any.whl |
Total release size: 4.4 MB
Release files / ncbi-genome-download-0.2.6.tar.gz
| Download URL | ncbi-genome-download-0.2.6.tar.gz |
|---|---|
| Size | 4.4 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5a532435ea5f68f28ef7e21ca75d349edf5eac3f25ca44378cd311338c8b79c5
|
|
BLAKE2b-256 checksum How to use checksums |
e5e391cf5b01e3ef093768ffe3445a08e358f7c4438d3a5d395e40c5e6cea3b2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / ncbi_genome_download-0.2.6-py2.py3-none-any.whl
| Download URL | ncbi_genome_download-0.2.6-py2.py3-none-any.whl |
|---|---|
| Size | 18.3 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
0c6a1db0955f1d4f8501a5056f3650d3a571368bfbb161ce2ee7fdcf9dbe0e15
|
|
BLAKE2b-256 checksum How to use checksums |
4fb74ee9eac5be4405a33860d71fd668f7a1b88f1c5e24a85bd8297fbd909565
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for ncbi-genome-download 0.2.6
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.