Genome Collector
Genome Collector is a Python library to download and manage reference genome data for specific TaxIDs, in particular nucleotide and protein sequences (in fasta/genbank/gff formats), and alignment databases (BLAST, Bowtie1/2).
The data is downloaded automatically on a need-to basis, making it very easy for Python projects to use and re-use reference genomes of E. coli, S. cerevisiae, and so on, without the worry of manually downloading from NCBI.
Examples
Let’s get Biopython records of all protein sequences in E. coli:
from genome_collector import GenomeCollection
collection = GenomeCollection()
records = collection.get_taxid_biopython_records(511145, "protein_fasta")
And that’s it! If the protein data wasn’t already on your machine, Genome Collector downloaded from NCBI, and stored in your “collection” for the next time time you need it.
Now let’s get a path to a local BLAST database for S. cerevisiae:
from genome_collector import GenomeCollection
collection = GenomeCollection()
db_path = collection.get_taxid_blastdb_path(taxid=559292, db_type='nucl')
If there was no cerevisiae database on your machine, Genome Collector downloaded the genome data and built it. It is now in your collection, and you can use the returned db_path to start a BLAST process:
import subprocess
process = subprocess.run([
'blastn', '-db', db_path, '-query', 'queries.fa', '-out', 'results.txt'
])
Infos
Installation: with pip install genome_collector. Some BLAST and Bowtie features also require specific software installed, see docs.
Docs: https://edinburgh-genome-foundry.github.io/genome_collector/
Github repo: released on Github https://github.com/Edinburgh-Genome-Foundry/genome_collector
Licence: MIT
Similar software: see pre-existing projects ncbi-genome-download and Genomepy . In comparison, Genome Collector is more opinionated, it uses TaxID first and has features like on-demand genome downloading and database building, and Biopython records loading.
Everyone is welcome to contribute !
More biology software
Genome Collector is part of the EGF Codons synthetic biology software suite for DNA design, manufacturing and validation.
Metadata
Release files for genome_collector 0.1.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 |
|---|---|---|---|---|
| genome_collector-0.1.6.tar.gz | 15.3 kB | Without provenance | Details for genome_collector-0.1.6.tar.gz |
Release files / genome_collector-0.1.6.tar.gz
| Download URL | genome_collector-0.1.6.tar.gz |
|---|---|
| Size | 15.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f0b68deb0f2d6953e9234fdfe4054230863277f5017624305c5d71f0338c4300
|
|
BLAKE2b-256 checksum How to use checksums |
9eaae4334c7be9d6618d184df26cacc5f86bbc6c29071c2b1367e7372392761f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
Python-urllib/3.6
|
Security for genome_collector 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.