Pages

Friday, January 30, 2015

I am looking for a way to manually specify varying
vertical distance between the tips in a phylogeny
(because i want to add several lines of text to some of
the tips).

I.e. for the tree
library(ape)
TREE=read.tree(text=“((Tip_1:1,Tip_2:1):1,Tip_3:2);)”)

Is there a way for instance through plot phylo to print
place the tips in the heights of c(1,2,6) as opposed to
c(1,2,3) as they would be normally in plot.phylo.

This is not presently possible, but I realized
immediately that this would be pretty straightforward to
add to phytools plotSimmap because the way
that functions works is by first assigning 1:N
to the N tips of the tree, and then works
backwards to assign the vertical position of all internal
nodes via a post-order traversal.

I
responded
to the query, and now I have also
posted
code online that permits exactly this type of manipulation. The
new phytools build with this update can be obtained
here.
Here's a demo using the code of the original query:

About this blog

This web-log chronicles the development of new tools for phylogenetic analyses in the phytools R package. Unless you a reading a very recent page of the blog, I recommend that you install the latest CRAN version of phytools (or latest beta release) before attempting to replicate any of the analyses of this site. That is because the linked functions may be archived, and very likely have been replaced by newer versions.