Skip to main content

# NCBI Genome Downloading Scripts

[![Build Status](http://github.drone.secondarymetabolites.org/api/badges/kblin/ncbi-genome-download/status.svg)](http://github.drone.secondarymetabolites.org/kblin/ncbi-genome-download)

Some script to download bacterial and fungal genomes from NCBI after they restructured their FTP a while ago.

Idea shamelessly stolen from [Mick Watson’s Kraken downloader scripts](http://www.opiniomics.org/building-a-kraken-database-with-new-ftp-structure-and-no-gi-numbers/) that can also be found in [Mick’s GitHub repo](https://github.com/mw55309/Kraken_db_install_scripts). However, Mick’s scripts are ~~written in Perl~~ specific to actually building a Kraken database (as advertised).

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 . `

## Usage

To download all bacterial RefSeq genomes in GenBank format from NCBI, run the following:

` ncbi-genome-download bacteria `

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 `

To download only completed bacterial RefSeq genomes in GenBank format, run: ` ncbi-genome-download --assembly-level complete 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.

To get an overview of all options, run ` ncbi-genome-download --help `

## License All code is available under the Apache License version 2, see the [LICENSE](LICENSE) file for details.

Metadata

Release files for ncbi-genome-download 0.1.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ncbi-genome-download 0.1.6
File Size Uploaded Provenance Actions
ncbi-genome-download-0.1.6.tar.gz 8.4 kB Without provenance Details for ncbi-genome-download-0.1.6.tar.gz

Release files / ncbi-genome-download-0.1.6.tar.gz

Download URL ncbi-genome-download-0.1.6.tar.gz
Size 8.4 kB
Tags Source
SHA-256 checksum
How to use checksums
b4f14771be7da3d4343436da616d82aea1d74318a4f878baa2175c3ff6de464d
BLAKE2b-256 checksum
How to use checksums
acca59c34ea35e32d7388d4ad5ff8bb0e4b59591bfd181cfe1b709481925da7b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for ncbi-genome-download 0.1.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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page