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
  • 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


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

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

taxidtools-3.2.1-py3-none-any.whl (16.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: taxidtools-3.2.1.tar.gz
  • Upload date:
  • Size: 18.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for taxidtools-3.2.1.tar.gz
Algorithm Hash digest
SHA256 0bb3d7317cdb74b246a37f9375145507a81398d3a5bffe10b25ab00e57c6dd14
MD5 f840685c0f67a974eedca413cbd2dd32
BLAKE2b-256 c828f26bb3bd5e9b11a6b317e6e68c2957d3a4cef6a52f8ca3401e4010438c5d

See more details on using hashes here.

File details

Details for the file taxidtools-3.2.1-py3-none-any.whl.

File metadata

  • Download URL: taxidtools-3.2.1-py3-none-any.whl
  • Upload date:
  • Size: 16.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for taxidtools-3.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 ac3053f7b526fdbf5aaf173542b7cdfeaebb8197614c8f0f13c9bed6ed5acfa5
MD5 2ca68cde802957ab33ca9a24e64ebbba
BLAKE2b-256 3b13486c9e8a4cfdb6a76b4a65f352f3be4c366be1bbd40f0866b3a30d0ce1f6

See more details on using hashes here.

Supported by

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