Python library for NCBI taxonomy database.
Project description
TaxTree: Python library for NCBI taxonomy database
Supported features:
- download data from NCBI automatically.
- use SQLite and SQLAlchemy to persist data.
- retrieve ancestor taxonomy in any rank.
installation
pip install taxtree
usage
initialize database
Just run:
taxtree
- All data were saved to
~/.taxtree
- Downloaded
taxdmp.zip
path:~/.taxtree/taxdmp.zip
- Persistent data file path:
~/.taxtree/taxtree.db
search taxonomy
from taxtree import get_scoped_session, Tax
with get_scoped_session() as session:
tax = session.query(Tax).filter_by(tax_id='9606').first()
get ancestor
from taxtree import get_scoped_session, Tax, KINGDOM, PHYLUM
with get_scoped_session() as session:
tax = session.query(Tax).filter_by(tax_id='9606').first()
kingdom_tax = tax.get_ancestor(KINGDOM)
phylum_tax = tax.get_ancestor(PHYLUM)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
taxtree-1.0.4.tar.gz
(4.1 kB
view details)
Built Distributions
taxtree-1.0.4-py2.7.egg
(3.6 kB
view details)
File details
Details for the file taxtree-1.0.4.tar.gz
.
File metadata
- Download URL: taxtree-1.0.4.tar.gz
- Upload date:
- Size: 4.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/3.7.3 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.7.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3ee3298dcca0d2984dc0f48a92add3cceda653ec2f2b577f8ade3065a2d9939a |
|
MD5 | e7d25f0fad0c3c1fba84e9da2cb6c93a |
|
BLAKE2b-256 | 9b85aff5d45b71b0e2c830ddc480c95841ef0e643121fd7fe78682f70abb467b |
File details
Details for the file taxtree-1.0.4-py2.7.egg
.
File metadata
- Download URL: taxtree-1.0.4-py2.7.egg
- Upload date:
- Size: 3.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/3.7.3 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.7.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f79cce2591eee61375de7b03fad7c371b3e4fbd5a52fb7a58580a3679fda29f7 |
|
MD5 | 1de7bf9856dfce753ad92e5d30940d50 |
|
BLAKE2b-256 | 748c2976a2294b4bc2098aba8d0e8f3e7aacc9d4169a9adaad7bcf61305ef94b |
File details
Details for the file taxtree-1.0.4-py2-none-any.whl
.
File metadata
- Download URL: taxtree-1.0.4-py2-none-any.whl
- Upload date:
- Size: 3.7 kB
- Tags: Python 2
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/3.7.3 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.7.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | dae2284ea9bf5131851a6d319efb150934200519d6e5d31bd4f22eddecf25427 |
|
MD5 | 061764c7c278210b61490ca1539bd693 |
|
BLAKE2b-256 | a5dda247c8d4f58119d7a158c3ac39cc9c9666e24b462b2b8fa28414590d56af |