Toytree
==========
Tree plotting with **Toytree** in Python
----------------------------------------
Welcome to toytree, a Python library for tree visualization, manipulation,
and numerical and evolutionary analyses. If you are new to toytree, head to
the [User Guide](https://eaton-lab.org/toytree/quick_guide/) to see
examples and learn about its features.
Toytree builds upon the Node data structure from the [ete3](http://etetoolkit.org/docs/latest/tutorial/tutorial_trees.html) library, but aims to provide
a more user-friendly object-oriented framework for interactive coding
through our ToyTree object. The toytree library includes a suite of
growing and extendable modules for analyses of trees and of data on trees.
It also includes modern plotting tools built on the [toyplot](http://toyplot.rtfd.io/)
plotting library. The goal of toytree is to provide a light-weight Python equivalent to commonly used tree manipulation and plotting libraries in R,
and in doing so, to promote further development of phylogenetic methods in Python. Toytree generates rich interactive figures (SVG+HTML+JS) that can be embedded in jupyter-notebooks or webpages, or rendered in SVG, PDF, or PNG for publications.
The library is small and easy to install, making it easy to incorporate into
other projects.
Current release info
--------------------
| Name | Downloads | Version | Platforms |
| --- | --- | --- | --- |
| [![Conda Recipe](https://img.shields.io/badge/recipe-toytree-green.svg)](https://anaconda.org/conda-forge/toytree) | [![Conda Downloads](https://img.shields.io/conda/dn/conda-forge/toytree.svg)](https://anaconda.org/conda-forge/toytree) | [![Conda Version](https://img.shields.io/conda/vn/conda-forge/toytree.svg)](https://anaconda.org/conda-forge/toytree) | [![Conda Platforms](https://img.shields.io/conda/pn/conda-forge/toytree.svg)](https://anaconda.org/conda-forge/toytree) |
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](http://eaton-lab.org/toytree) to learn more about plotting options, analysis methods, and other features of toytree. You can try out toytree in the cloud before installing by visiting the [toytree binder](http://mybinder.org/repo/eaton-lab/toytree).
Example code
------------
```python
# 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
------------
![./manuscript/ToyTree-figure.svg](./manuscripts/toytree-1.0/ToyTree-figure.svg)
Raw data
{
"_id": null,
"home_page": "https://eaton-lab.org/toytree",
"name": "toytree",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.7",
"maintainer_email": null,
"keywords": "phylogeny, tree, network, plotting, toyplot, SVG, HTML, Genealogy, Coalescent",
"author": "Deren Eaton",
"author_email": "de2356@columbia.edu",
"download_url": "https://files.pythonhosted.org/packages/66/97/f3176c826d2d1f241dae8f4a5e2fa5771e210e20b93e4382d40232a8349b/toytree-3.0.8.tar.gz",
"platform": null,
"description": "Toytree\n==========\n\nTree plotting with **Toytree** in Python\n----------------------------------------\nWelcome to toytree, a Python library for tree visualization, manipulation,\nand numerical and evolutionary analyses. If you are new to toytree, head to \nthe [User Guide](https://eaton-lab.org/toytree/quick_guide/) to see \nexamples and learn about its features.\n\nToytree builds upon the Node data structure from the [ete3](http://etetoolkit.org/docs/latest/tutorial/tutorial_trees.html) library, but aims to provide\na more user-friendly object-oriented framework for interactive coding \nthrough our ToyTree object. The toytree library includes a suite of \ngrowing and extendable modules for analyses of trees and of data on trees.\nIt also includes modern plotting tools built on the [toyplot](http://toyplot.rtfd.io/) \nplotting library. The goal of toytree is to provide a light-weight Python equivalent to commonly used tree manipulation and plotting libraries in R, \nand in doing so, to promote further development of phylogenetic methods in Python. Toytree generates rich interactive figures (SVG+HTML+JS) that can be embedded in jupyter-notebooks or webpages, or rendered in SVG, PDF, or PNG for publications. \nThe library is small and easy to install, making it easy to incorporate into \nother projects. \n\n\nCurrent release info\n--------------------\n| Name | Downloads | Version | Platforms |\n| --- | --- | --- | --- |\n| [![Conda Recipe](https://img.shields.io/badge/recipe-toytree-green.svg)](https://anaconda.org/conda-forge/toytree) | [![Conda Downloads](https://img.shields.io/conda/dn/conda-forge/toytree.svg)](https://anaconda.org/conda-forge/toytree) | [![Conda Version](https://img.shields.io/conda/vn/conda-forge/toytree.svg)](https://anaconda.org/conda-forge/toytree) | [![Conda Platforms](https://img.shields.io/conda/pn/conda-forge/toytree.svg)](https://anaconda.org/conda-forge/toytree) |\n\nInstalling toytree\n-------------------\nToytree can be installed using conda or pip (conda preferred):\n```\nconda install toytree -c conda-forge\n```\nIt is possible to list all of the versions of `toytree` available on your platform with:\n```\nconda search toytree --channel conda-forge\n```\n\nDocumentation\n-------------\nSee the [full documentation](http://eaton-lab.org/toytree) to learn more about plotting options, analysis methods, and other features of toytree. You can try out toytree in the cloud before installing by visiting the [toytree binder](http://mybinder.org/repo/eaton-lab/toytree).\n\n\nExample code\n------------\n\n```python\n# import toyplot and load a newick file from a public URL\nimport toytree\ntre = toytree.tree(\"https://eaton-lab.org/data/Cyathophora.tre\")\n\n# root the tree using a wildcard string matching and draw a tree figure.\nrtre = tre.root('~prz')\nrtre.draw(width=400, tip_labels_align=True);\n\n# or chain a few functions together\ntre.root('~prz').drop_tips(\"~tham\").ladderize().draw();\n\n# extensive styling options are available\nrtre.draw(\n tip_labels_colors='pink',\n node_labels='support',\n node_sizes=15,\n node_colors=\"cyan\",\n edge_style={\n \"stroke\": \"darkgrey\", \n \"stroke-width\": 3,\n },\n)\n```\n\nExample plots\n------------\n\n![./manuscript/ToyTree-figure.svg](./manuscripts/toytree-1.0/ToyTree-figure.svg)\n",
"bugtrack_url": null,
"license": "GPL",
"summary": "tree manipulation, plotting, and evolutionary analysis library",
"version": "3.0.8",
"project_urls": {
"Homepage": "https://eaton-lab.org/toytree"
},
"split_keywords": [
"phylogeny",
" tree",
" network",
" plotting",
" toyplot",
" svg",
" html",
" genealogy",
" coalescent"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "ed93ae575af22fdb0484df8a6aad0bc8c134f458f96f10a347cb686eb4de2478",
"md5": "eacfa5129c2014681e6b5bafdf241f3f",
"sha256": "87195a4cc377226a2f5bb92fc580971aeda6beee42cfe40c2794e05326447c9e"
},
"downloads": -1,
"filename": "toytree-3.0.8-py3-none-any.whl",
"has_sig": false,
"md5_digest": "eacfa5129c2014681e6b5bafdf241f3f",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.7",
"size": 416628,
"upload_time": "2025-01-28T18:23:44",
"upload_time_iso_8601": "2025-01-28T18:23:44.135196Z",
"url": "https://files.pythonhosted.org/packages/ed/93/ae575af22fdb0484df8a6aad0bc8c134f458f96f10a347cb686eb4de2478/toytree-3.0.8-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "6697f3176c826d2d1f241dae8f4a5e2fa5771e210e20b93e4382d40232a8349b",
"md5": "8c415489298810ecf9eab1d04f954a49",
"sha256": "2770663f79faae176d0f1bb9ad047bc0ddd1baf3333a76cab2307d9a30b9da55"
},
"downloads": -1,
"filename": "toytree-3.0.8.tar.gz",
"has_sig": false,
"md5_digest": "8c415489298810ecf9eab1d04f954a49",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.7",
"size": 333739,
"upload_time": "2025-01-28T18:23:46",
"upload_time_iso_8601": "2025-01-28T18:23:46.221404Z",
"url": "https://files.pythonhosted.org/packages/66/97/f3176c826d2d1f241dae8f4a5e2fa5771e210e20b93e4382d40232a8349b/toytree-3.0.8.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-01-28 18:23:46",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "toytree"
}