tree manipulation, plotting, and evolutionary analysis library
Project description
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
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 toytree-3.0.11.tar.gz.
File metadata
- Download URL: toytree-3.0.11.tar.gz
- Upload date:
- Size: 367.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.25
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a117c56676889be72bdd6ce572a0bee26a299c5234d6fb6bf89dbc29bb960c12
|
|
| MD5 |
279518e99358308e4d1ceb6730796158
|
|
| BLAKE2b-256 |
1cbc14dc4f31f376b3a1a6b9935a96f1e76dc5f4017ba9a1a71fa73ff1931c50
|
File details
Details for the file toytree-3.0.11-py3-none-any.whl.
File metadata
- Download URL: toytree-3.0.11-py3-none-any.whl
- Upload date:
- Size: 467.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.25
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bc9857aedc54d7ed51bb0086330324815cfc8cb35c8c151cde720a6fc62410b3
|
|
| MD5 |
30bc029157055fc33b4dcaafe23d1007
|
|
| BLAKE2b-256 |
2297ae64477e109d790f61e7f73694659059ece5195ece835ff67defaed3964b
|