Difference between revisions of "Ggtree"
Kevin Keegan (Talk | contribs) |
Kevin Keegan (Talk | contribs) (→Getting Started) |
||
Line 16: | Line 16: | ||
== Getting Started == | == Getting Started == | ||
− | Download the tree file (Paul can you host the treefile?) and install the packages we will be using. We'll be using the packages: | + | Download the tree file (Paul can you host the treefile?) |
+ | |||
+ | ====Installing Packages==== | ||
+ | |||
+ | Open a terminal, start <tt>R</tt>, and install the packages we will be using. We'll be using the packages: | ||
BiocInstaller | BiocInstaller | ||
Line 28: | Line 32: | ||
stringi | stringi | ||
abind | abind | ||
+ | treeio | ||
You can install a package like so: | You can install a package like so: | ||
Line 33: | Line 38: | ||
install.packages("BiocInstaller") | 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 <tt>treeio</tt> | ||
+ | ====Cite ggtree==== | ||
+ | citation("ggtree") | ||
== References == | == 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. | 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. |
Revision as of 15:35, 7 March 2018
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.