minimalist tree plotting using toyplot
Project description
Toytree
==========
.. image:: https://badges.gitter.im/toytree-help/Lobby.svg
:alt: Join the chat at https://gitter.im/toytree-help/Lobby
:target: https://gitter.im/toytree-help/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge
.. image:: https://anaconda.org/eaton-lab/toytree/badges/installer/conda.svg
:alt: Install with conda
:target: https://conda.anaconda.org/eaton-lab
.. image:: https://travis-ci.org/eaton-lab/toytree.svg?branch=master
:target: https://travis-ci.org/eaton-lab/toytree
Tree plotting with **Toytree**
------------------------------
Welcome to toytree, a minimalist tree manipulation and plotting library for use inside jupyter notebooks. Toytree combines a popular tree data structure based on the `ete3 <http://etetoolkit.org/docs/latest/tutorial/tutorial_trees.html>`__) library with modern plotting tools based 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.
Installation
--------------
You can install ``toytree`` and its dependencies (``toyplot`` and ``numpy``) with a single command using conda (preferred), or from pip.
.. code:: bash
conda install toytree -c eaton-lab
Documentation
--------
See the `full documentation <http://toytree.readthedocs.io>`_ to see all of the options that toytree provides. Try it out instantly in the cloud using the `toytree binder <http://mybinder.org/repo/eaton-lab/toytree>`__.
Examples
-------
.. 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(wildcard='prz')
rtre.draw(width=400, tip_labels_align=True);
# or chain a few functions together
tre.root(wildcard='prz').drop_tips(wildcard="tham").ladderize().draw();
# extensive styling options are available
rtre.draw(
tip_labels_color='pink',
node_labels='support',
node_size=15,
node_color="cyan",
edge_style={
"stroke": "darkgrey",
"stroke-width": 3,
},
)
==========
.. image:: https://badges.gitter.im/toytree-help/Lobby.svg
:alt: Join the chat at https://gitter.im/toytree-help/Lobby
:target: https://gitter.im/toytree-help/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge
.. image:: https://anaconda.org/eaton-lab/toytree/badges/installer/conda.svg
:alt: Install with conda
:target: https://conda.anaconda.org/eaton-lab
.. image:: https://travis-ci.org/eaton-lab/toytree.svg?branch=master
:target: https://travis-ci.org/eaton-lab/toytree
Tree plotting with **Toytree**
------------------------------
Welcome to toytree, a minimalist tree manipulation and plotting library for use inside jupyter notebooks. Toytree combines a popular tree data structure based on the `ete3 <http://etetoolkit.org/docs/latest/tutorial/tutorial_trees.html>`__) library with modern plotting tools based 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.
Installation
--------------
You can install ``toytree`` and its dependencies (``toyplot`` and ``numpy``) with a single command using conda (preferred), or from pip.
.. code:: bash
conda install toytree -c eaton-lab
Documentation
--------
See the `full documentation <http://toytree.readthedocs.io>`_ to see all of the options that toytree provides. Try it out instantly in the cloud using the `toytree binder <http://mybinder.org/repo/eaton-lab/toytree>`__.
Examples
-------
.. 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(wildcard='prz')
rtre.draw(width=400, tip_labels_align=True);
# or chain a few functions together
tre.root(wildcard='prz').drop_tips(wildcard="tham").ladderize().draw();
# extensive styling options are available
rtre.draw(
tip_labels_color='pink',
node_labels='support',
node_size=15,
node_color="cyan",
edge_style={
"stroke": "darkgrey",
"stroke-width": 3,
},
)
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
toytree-0.1.18.tar.gz
(102.2 kB
view details)
Built Distribution
toytree-0.1.18-py3-none-any.whl
(76.7 kB
view details)
File details
Details for the file toytree-0.1.18.tar.gz
.
File metadata
- Download URL: toytree-0.1.18.tar.gz
- Upload date:
- Size: 102.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.18.4 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.6.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5a1ff3f154a036a79f6adefb6f8b3514ca89c6cc41ed1589a7fa2492531f237d |
|
MD5 | 33f4d0b6a66a44fbac8ee16aa06cc7e6 |
|
BLAKE2b-256 | 2342ea46f295c54c7472340c639b8fedddb04a560b4cdf170e667d9ec37ae2fc |
File details
Details for the file toytree-0.1.18-py3-none-any.whl
.
File metadata
- Download URL: toytree-0.1.18-py3-none-any.whl
- Upload date:
- Size: 76.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.18.4 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.6.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 81652d288f29cbe4d6765fd4242b93607201ff11fc4c594396c2388c32c438b1 |
|
MD5 | b7f3ecb14d8ab9b2f560c26559344fea |
|
BLAKE2b-256 | 1496ea7f57f59b6b5a2ad1640edf2d0b8f7ea2c8daf854cdf412fc35786be431 |