Tuesday, January 31, 2017

Second video demo of tree.drawer in phytools

I'm getting a kick out of my new function tree.drawer to extract a phylogeny from an image of a plotted tree. Consequently, I couldn't resist posting another demo. This one is based on Figure 1 of Song et al. (2012).

If you'd like to try it yourself, just copy & past the following lines & click away:

library(phytools)
library(jpeg)
source("https://raw.githubusercontent.com/liamrevell/phytools/master/R/tree.drawer.R")
download.file("http://www.pnas.org/content/109/37/14942/F1.large.jpg", 
    "F1.large.jpg",mode="wb")
eutheria<-tree.drawer("F1.large.jpg")

The video also demonstrates the option GOBACK to remove the most recently added leaf from the tree & go back.

The result is as follows:

plotTree(eutheria)

plot of chunk unnamed-chunk-2

The video demo can also be seen embedded below:

No comments:

Post a Comment

Note: due to the very large amount of spam, all comments are now automatically submitted for moderation.