I need to programmatically create radial phylograms (example: http://bit.ly/n68PGN). The best available visualization tool for this type of tree is TreeIllustrator. Unfortunately, it is closed-source and not usable as a library or command-line program. Does anyone know of such a library in pretty much any language (Python or javascript preferred)?
Note that I want to create phylograms, so branch lengths must be honored. I am only interested in creating radial trees, not circular/fan trees. Thanks!
The ETE 2.1 python library can programmatically draw circular phylograms (branches are proportional to their original values in the newick tree), but not (yet) radial phylograms. (see this for disambiguation)
The following simple ETE example would produce this (but many other features are available):
from ete2a1 import Tree, TreeStyle
t = Tree()
t.populate(30)
ts = TreeStyle()
ts.show_leaf_name = True
ts.mode = "c" # circular mode
ts.arc_start = -180 # 0 degrees = 3 o'clock
ts.arc_span = 180 # Draws only a half of the circumference
t.render("mytree.svg", tree_style=ts) # SVG, PNG or PDF are supported
Ape library allows to draw radial phylograms, but you have little control on the graphical aspects of the tree.
Another option is TreeDyn, which is a standalone program (not library or programmatic drawing) but allows for some kind of scripting.
ADD COMMENT
• link
updated 6.2 years ago by
Ram
44k
•
written 13.4 years ago by
jhc
★
3.0k
Looking at the overview PDF, there is clearly a radial tree on the "Edition Conformation" page. However, there is no option for a radial tree in the "Conformation" menu of the software. If anyone knows how to use TreeDyn to draw a radial tree, this may be the solution.
OK this isn't a great answer since I haven't tried this myself, but I think the newly released version of ETE (v2.1) may do this. It produces circular trees, but this page suggests you can still show branch lengths (which is what you mean by radial right?). ETE is Python, feature rich, and open source, which are all good things.
I have used ETE and yes, you can show circular trees with branch lengths, but this is not the same as radial trees. See the previous comment for a link to disambiuation.
Thanks, I'll try out TreeDyn and report back.
Looking at the overview PDF, there is clearly a radial tree on the "Edition Conformation" page. However, there is no option for a radial tree in the "Conformation" menu of the software. If anyone knows how to use TreeDyn to draw a radial tree, this may be the solution.