Tool: ggtree: phylogenetic tree visualization and annotation
15
gravatar for Guangchuang Yu
2.0 years ago by
Guangchuang Yu1.9k
China/Hong Kong/The University of Hong Kong
Guangchuang Yu1.9k wrote:

ggtree: an R package for visualization and annotation of phylogenetic trees with their covariates and other associated data

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 in the tree.

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.


Homepage: https://guangchuangyu.github.io/ggtree/

Documentation: https://guangchuangyu.github.io/ggtree/documentation/

Featured Articles: https://guangchuangyu.github.io/ggtree/featuredArticles/

Report issues: https://guangchuangyu.github.io/ggtree/#feedback


Examples



ADD COMMENTlink modified 17 months ago • written 2.0 years ago by Guangchuang Yu1.9k
1

Can we see species in this tree. (The tree of life)

ADD REPLYlink written 2.0 years ago by Naresh60

Dear Guangchuang Yu, Hi

Sorry for my simple question but would you please help me for importing a Newick file (e.g test.nwk) in ggtree for drawing phylogenic tree?

I am using Rstudio.

~ Best

ADD REPLYlink written 18 months ago by Farbod3.1k
1

I have solve it as below, would you check it please :

biocLite("ggtree", type = "source") #for solving the Error: StatTreeHorizontal was built with an incompatible version of ggproto.

library(ape)
library("ggplot2")
library(ggtree)
tree <- read.tree(file = "test.nwk")
ggtree(tree)
ADD REPLYlink written 18 months ago by Farbod3.1k
1

that is correct. Actually, you don't need to load ape and ggplot2. Only library(ggtree) would be fine.

ADD REPLYlink written 18 months ago by Guangchuang Yu1.9k

Dear Guangchuang, Hi

I sometimes received the following error from the nwk files I have exported from MEGA6.

Have you any idea about it ?

Error in read.tree(file = "2.nwk") : The tree has apparently singleton node(s): cannot read tree file. Reading Newick file aborted at tree no. 1

ADD REPLYlink written 18 months ago by Farbod3.1k

pls google search it before posting question. see http://stackoverflow.com/a/35633663/3844636.

ADD REPLYlink written 18 months ago by Guangchuang Yu1.9k

Hi, I have searched but I did not find any related topic. Thank you for your help.

ADD REPLYlink written 18 months ago by Farbod3.1k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 940 users visited in the last hour