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.0.tar.gz (18.6 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.0-py3-none-any.whl (16.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: taxidtools-3.2.0.tar.gz
  • Upload date:
  • Size: 18.6 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.0.tar.gz
Algorithm Hash digest
SHA256 b7266753e1a87c7da620b1de453633e578a9bdbc28de0d8c35756c6e483622f2
MD5 120fa7015ec604b0945cd54047209b13
BLAKE2b-256 a51425176fa4d6e1c91be504f5c7d70c1a355049fb90cf43dc19fed09451d0a1

See more details on using hashes here.

File details

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

File metadata

  • Download URL: taxidtools-3.2.0-py3-none-any.whl
  • Upload date:
  • Size: 16.7 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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c43528d877a7d8b39ca3fe8814cbedb7bc31348166a4ef8b30441902997a0d8e
MD5 b96d30e0dd6022414883647223ab27c5
BLAKE2b-256 00ef91cdf4410d8cb96f7abd810666f404277da3af499914b00d18656d5e06d6

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