ggtree: visualization and annotation of phylogenetic trees

releaseVersion develVersion total month

The ggtree package extending the ggplot2 package. It based on grammar of graphics and takes all the good parts of ggplot2. ggtree is designed for not only viewing phylogenetic tree but also displaying annotation data on the tree. ggtree is released within the Bioconductor project and the source code is hosted on GitHub.


Guangchuang Yu and Tommy Tsan-Yuk Lam, School of Public Health, The University of Hong Kong.


Please cite the following article when using ggtree:

doi Altmetric citation

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. 2017, 8(1):28-36.


Install ggtree is easy, follow the guide on the Bioconductor page:

## try http:// if https:// URLs are not supported
## biocLite("BiocUpgrade") ## you may need this

If you have problems when installing some of the dependent packages, please refer to the ggtree-installation wiki page.


Getting tree into R

  • tree parsers: bring evolution evidences to be used/analyzed in R
  • merge_tree: allows evolution evidences to be merged and compared
  • fortify methods: convert tree objects into tidy data frame

Tree visualization & annotation

  • parsing tree as a collection of nodes allows grammar of graphics to be supported
  • geom_tree: extends ggplot2 to support tree structure
  • several layers and functions for tree annotation
  • supports annotating phylogenetic trees with user’s own data

Tree manipulation

  • helper functions for tree manipulation, make it possible to explore the tree visually

Find out details and examples on Documentation.

Projects that depend on ggtree

CRAN packages

  • harrietr: Wrangle Phylogenetic Distance Matrices and Other Utilities

Bioconductor packages

  • LINC: co-expression of lincRNAs and protein-coding genes
  • LymphoSeq: Analyze high-throughput sequencing of T and B cell receptors
  • philr: Phylogenetic partitioning based ILR transform for metagenomics data

Other applications

  • BreadCrumbs: Collection of scripts for metagenomics analysis
  • DegeneratePrimerTools: Utilities for Creating and Validating Degenerate primers
  • phyloscan: scan phylogenies created along a genome for patterns