Ggtree
EEB 5349: Phylogenetics | |
by Kevin Keegan
Contents
Goals
To introduce you to the R package ggtree for plotting phylogenetic trees.
Introduction
Getting Started
Download the tree file (Paul can you host the treefile?)
Installing Packages
Open a terminal, start R, and install the packages we will be using. We'll be using the packages:
BiocInstaller ape Biostrings ggplot2 ggtree phytools ggrepel stringr stringi abind treeio
You can install a package like so:
install.packages("BiocInstaller")
Read in the Tree File
We're dealing with a tree in the Newick file format:
tree <- read.newick("moth.txt")
There are ways to parse other tree file formats using other functions of the library/package treeio
Cite ggtree
citation("ggtree")
References
Yu G, Smith D, Zhu H, Guan Y and Lam TT (2017). “ggtree: an R package for visualization and annotation of phylogenetic trees with their covariates and other associated data.” Methods in Ecology and Evolution, 8, pp. 28-36. doi: 10.1111/2041-210X.12628, http://onlinelibrary.wiley.com/doi/10.1111/2041-210X.12628/abstract.