A Python Toolkit for Taxonomy
Project description
TaxidTools - A Python Toolkit for Taxonomy
taxidTools is a Python library to handle Taxonomy definitions.
Highlights
- Load taxonomy defintions for the NCBI's taxdump files
- Prune, filter, and normalize branches
- Save as JSON for later use
- Determine consensus, last common ancestor, or distances
- Retrieve ancestries or list descendants
- Export as Newick trees
Installation
With pip
:
pip install taxidtools
With conda
:
conda install -c conda-forge taxidtools
With docker
:
docker pull gregdenay/taxidtools
Quickstart
With the NCBI's taxdump files installed locally:
>>> import taxidTools
>>> tax = taxidTools.read_taxdump('nodes.dmp', 'rankedlineage.dmp', 'merged.dmp')
>>> tax.getName('9606')
'Homo sapiens'
>>> lineage = tax.getAncestry('9606')
>>> lineage.filter()
>>> [node.name for node in lineage]
['Homo sapiens', 'Homo', 'Hominidae', 'Primates', 'Mammalia', 'Chordata', 'Metazoa']
>>> tax.lca(['9606', '10090']).name
'Euarchontoglires'
>>> tax.distance('9606', '10090')
18
Documentation
Full documentation is hosted on the homepage
Cite us
If you use taxidTools for your reasearch, you can cite it using the DOI at the top of this page.
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
taxidtools-3.1.1.tar.gz
(18.3 kB
view details)
Built Distribution
File details
Details for the file taxidtools-3.1.1.tar.gz
.
File metadata
- Download URL: taxidtools-3.1.1.tar.gz
- Upload date:
- Size: 18.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3f8d8dc769b893e924c91ef38c765b1f28f4cf1141f3605b76f5b083b79c768c |
|
MD5 | 2119b1ed34dbbfd95041e4a0bed69230 |
|
BLAKE2b-256 | f62fb3fee2956555cdab941b0562ce82fbb5932cd29ffa9042907eb33677cd8c |
Provenance
File details
Details for the file taxidTools-3.1.1-py3-none-any.whl
.
File metadata
- Download URL: taxidTools-3.1.1-py3-none-any.whl
- Upload date:
- Size: 16.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c5ad5ef185d3502ea787ab2069681fd2db31d1c55c38055b853397d6ef4904f3 |
|
MD5 | 2e0b02109c051b783406c5bfea8b7f1e |
|
BLAKE2b-256 | 885cdc144903fe8f06f451c4d0a0c87dd2481cffb73d98372ead3dd94caa5cfb |