Open Source Library For Radial Phylogram
3
5
Entering edit mode
13.4 years ago
User 3875 ▴ 50

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!

tree visualization phylogenetics • 5.2k views
ADD COMMENT
5
Entering edit mode
13.4 years ago
jhc ★ 3.0k

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
0
Entering edit mode

Thanks, I'll try out TreeDyn and report back.

ADD REPLY
0
Entering edit mode

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.

ADD REPLY
2
Entering edit mode
13.4 years ago

The Ape package in R is an open source library that can do this, e.g.

library(ape)
test.tree <- read.tree(file = "testree.phylip")
plot.phylo(test.tree, type="radial", use.edge.length=T)
ADD COMMENT
0
Entering edit mode

This is not true. APE ignores use.edge.length for all plots except normal (rectangular) phylograms.

ADD REPLY
1
Entering edit mode
13.4 years ago
Dave Lunt ★ 2.0k

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.

Has anyone used ETE 2.1? Can anyone test this?

ADD COMMENT
0
Entering edit mode

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.

ADD REPLY

Login before adding your answer.

Traffic: 2287 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6