Toytree
Tree plotting with Toytree in Python
Welcome to toytree, a Python library for tree object data parsing, visualization, manipulation, and numerical and evolutionary analyses. If you are new to toytree, head to the User Guide to see examples and learn about its features.
The goal of toytree is to provide a light-weight Python equivalent to widely used tree analysis and plotting libraries in R, and in doing so, to promote further development of phylogenetic and evolutionary analysis methods in Python.
Toytree generates rich interactive figures (SVG+HTML+JS) that render in jupyter-notebooks or webpages, and can be exported as high quality SVG, PDF, or PNG figures for publications. The library is minimal dependencies, is easy to install, and can be easily incorporated into other projects.
Current release info
| Name | Downloads | Version | Platforms |
|---|---|---|---|
Installing toytree
Toytree can be installed using conda or pip (conda preferred):
conda install toytree -c conda-forge
It is possible to list all of the versions of toytree available on your platform with:
conda search toytree --channel conda-forge
Documentation
See the full documentation at http://eaton-lab.org/toytree.
Example code
# import toyplot and load a newick file from a public URL
import toytree
tre = toytree.tree("https://eaton-lab.org/data/Cyathophora.tre")
# root the tree using a wildcard string matching and draw a tree figure.
rtre = tre.root('~prz')
rtre.draw(width=400, tip_labels_align=True);
# or chain a few functions together
tre.root('~prz').drop_tips("~tham").ladderize().draw();
# extensive styling options are available
rtre.draw(
tip_labels_colors='pink',
node_labels='support',
node_sizes=15,
node_colors="cyan",
edge_style={
"stroke": "darkgrey",
"stroke-width": 3,
},
)
Example plots
Metadata
Release files for toytree 3.0.11
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| toytree-3.0.11.tar.gz | 367.2 kB | Without provenance | Details for toytree-3.0.11.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| toytree-3.0.11-py3-none-any.whl | Python 3 | none | any | Details for toytree-3.0.11-py3-none-any.whl |
Total release size: 834.8 kB
Release files / toytree-3.0.11.tar.gz
| Download URL | toytree-3.0.11.tar.gz |
|---|---|
| Size | 367.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a117c56676889be72bdd6ce572a0bee26a299c5234d6fb6bf89dbc29bb960c12
|
|
BLAKE2b-256 checksum How to use checksums |
1cbc14dc4f31f376b3a1a6b9935a96f1e76dc5f4017ba9a1a71fa73ff1931c50
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.25
|
Release files / toytree-3.0.11-py3-none-any.whl
| Download URL | toytree-3.0.11-py3-none-any.whl |
|---|---|
| Size | 467.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
bc9857aedc54d7ed51bb0086330324815cfc8cb35c8c151cde720a6fc62410b3
|
|
BLAKE2b-256 checksum How to use checksums |
2297ae64477e109d790f61e7f73694659059ece5195ece835ff67defaed3964b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.25
|
Security for toytree 3.0.11
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.