ggtree version of plotTree
PLOTTING TREES + DATA is difficult. @DrKatHolt developed plotTree (R and Python scripts) to visualize associated data with trees, e.g. heatmap, horizontal bar etc.
I reproduced the examples presented in the plotTree repo using ggtree. Source code is freely available in https://github.com/GuangchuangYu/plotTree-ggtree.
Here are the outputs produced by
Tree with basic strain info
Pan genome heatmap
Curated genes, coloured
It can be very easy to produce a circular/fan layout version, and the tree was used to generate the ggtree hex sticker.
General solution with
ggtree provide the
facet_plot function which can be used to associate different types of data to the tree. With
ggtree we can associate more data (can be different types) and combine them freely.
see also examples in 1 and 2.
G Yu, DK Smith, H Zhu, Y Guan, TTY Lam*. ggtree: an R package for visualization and annotation of phylogenetic trees with their covariates and other associated data. Methods in Ecology and Evolution.
To leave a comment
for the author, please follow the link and comment on their blog: R on Guangchuang YU
offers daily e-mail updates
news and tutorials
on topics such as: Data science
, Big Data, R jobs
, visualization (ggplot2
), programming (RStudio
, Web Scraping
) statistics (regression
, time series
) and more...
If you got this far, why not subscribe for updates
from the site? Choose your flavor: e-mail
, or facebook