Taxonomic Distance and Phylogenetic Lineage Computation
Project description
taxodist
Taxonomic distance and phylogenetic lineage computation for any taxon on Earth.
taxodist retrieves full hierarchical lineages from The Taxonomicon and computes a tree metric distance between any two taxa: a pair of dinosaurs, a dinosaur and a fungus, two species of fly, or an oak tree and a human.
Installation
pip install taxodist
pip install git+https://github.com/rodrigosqrt3/taxodist-py.git
Basic usage
from taxodist import (
get_lineage, taxo_distance, mrca, distance_matrix,
filter_clade, taxo_path, save_cache, load_cache
)
# Get a full lineage
get_lineage("Tyrannosaurus")
# Distance between two taxa
taxo_distance("Tyrannosaurus", "Velociraptor")
# Most recent common ancestor
mrca("Tyrannosaurus", "Triceratops") # "Dinosauria"
mrca("Tyrannosaurus", "Homo") # "Amniota"
# Pairwise distance matrix
theropods = ["Tyrannosaurus", "Velociraptor", "Spinosaurus", "Allosaurus"]
distance_matrix(theropods)
# Filter taxa by clade
taxa =["Tyrannosaurus", "Triceratops", "Homo", "Quercus"]
filter_clade(taxa, "Dinosauria")
# Get the path between two taxa
taxo_path("Tyrannosaurus", "Velociraptor")
# Save and restore the lineage cache across sessions
save_cache("my_cache.pkl")
load_cache("my_cache.pkl")
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file taxodist-0.4.0.tar.gz.
File metadata
- Download URL: taxodist-0.4.0.tar.gz
- Upload date:
- Size: 24.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
af9235b06e5c49fc23e67a6056c268e3e4ad2e7eb62e9feb44895f0f25af1f60
|
|
| MD5 |
655b64a2ee5bae02a219acf7ea2d2f00
|
|
| BLAKE2b-256 |
f45a032d275a742b3efc2a718b8a84c43acca1e18ea9f838395c6cdafbb026af
|
File details
Details for the file taxodist-0.4.0-py3-none-any.whl.
File metadata
- Download URL: taxodist-0.4.0-py3-none-any.whl
- Upload date:
- Size: 16.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
769f12a83ef18f59060f77e3a3e918d880848a5a0db2aae6e8e8091f786f3f83
|
|
| MD5 |
a4af002e20775fa6a20b995d5c1213bf
|
|
| BLAKE2b-256 |
d125d75bec2969b98e1ab943736c68d5aff3783edf227b00117c71785f76e850
|