Skip to main content

A Python Toolkit for Taxonomy

Project description

CD/CI PyPI - License GitHub release (latest by date) Conda Version Pypi Version Docker Image Version DOI

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

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


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.0.tar.gz (18.1 kB view details)

Uploaded Source

Built Distribution

taxidTools-3.1.0-py3-none-any.whl (16.4 kB view details)

Uploaded Python 3

File details

Details for the file taxidtools-3.1.0.tar.gz.

File metadata

  • Download URL: taxidtools-3.1.0.tar.gz
  • Upload date:
  • Size: 18.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.12.4

File hashes

Hashes for taxidtools-3.1.0.tar.gz
Algorithm Hash digest
SHA256 4966b672a866bdabf3af7d5eda67c18e3d637a502fba169dbc9218ad665a5e77
MD5 428516cac336ba004ea6bcea90102046
BLAKE2b-256 39d3a6fdb028bfd79656d9e539b2e8b2da73af51d2f811c189e234a4c7877230

See more details on using hashes here.

Provenance

File details

Details for the file taxidTools-3.1.0-py3-none-any.whl.

File metadata

  • Download URL: taxidTools-3.1.0-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

Hashes for taxidTools-3.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 97044399bf98539f7ce31d0a3f262f3602ee81857c46e5d1ae3e0831276f3893
MD5 5cb64761eadcf64178a4172dc75318ee
BLAKE2b-256 33e00e61bc7f47dbcdb19c8a3a46c1e89e8ad71e28b81e23f6367069d19be5f1

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page