I have a phylogenetic tree with a lot of tips. When I want to annotate some traits to the tree using gheatmap, I find it presents nothing. As I struggled to catch the bug, I found it's because gheatmap makes wrong in case of many tips. The pictures above shows how the window height influences the result using gheatmap and ggtree. In the attach file, I uploaded the tree I tested. Other tested data was produced via:
rnorm(397)->test
data.frame(test=test)->test
phylotre$tip.label->rownames(test)
gheatmap(ggtree(phylotre),test)
Thanks in advance.
Loojuen,
10.23
the tree you attached is not that large, only has 397 tips and of course ggtree can handle it well. please follow the guide, https://guangchuangyu.github.io/2016/07/how-to-bug-author/, before posting your question.
--
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. doi:10.1111/2041-210X.12628
Homepage: https://guangchuangyu.github.io/ggtree
---
You received this message because you are subscribed to the Google Groups "ggtree" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bioc-ggtree+unsubscribe@googlegroups.com.
To post to this group, send email to bioc-...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/bioc-ggtree/999c8261-6a06-46c3-b595-02b350d37768%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
beast_file <- system.file("examples/MCC_FluA_H3.tree", package="ggtree")
beast_tree <- read.beast(beast_file)
genotype_file <- system.file("examples/Genotype.txt", package="ggtree")
genotype <- read.table(genotype_file, sep="\t", stringsAsFactor=F)
colnames(genotype) <- sub("\\.$", "", colnames(genotype))
p <- ggtree(beast_tree, mrsd="2013-01-01") + geom_treescale(x=2008, y=1, offset=2)
p <- p + geom_tiplab(size=2)
gheatmap(p, genotype, offset = 5, width=0.5, font.size=3, colnames_angle=-45, hjust=0) +
scale_fill_manual(breaks=c("HuH3N2", "pdm", "trig"), values=c("steelblue", "firebrick", "darkgreen"))--
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. doi:10.1111/2041-210X.12628
Homepage: https://guangchuangyu.github.io/ggtree
---
You received this message because you are subscribed to the Google Groups "ggtree" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bioc-ggtree+unsubscribe@googlegroups.com.
To post to this group, send email to bioc-...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/bioc-ggtree/caef2ead-3118-4fdf-981a-408121baed51%40googlegroups.com.
--
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. doi:10.1111/2041-210X.12628
Homepage: https://guangchuangyu.github.io/ggtree
---
You received this message because you are subscribed to the Google Groups "ggtree" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bioc-ggtree+unsubscribe@googlegroups.com.
To post to this group, send email to bioc-...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/bioc-ggtree/598987aa-a85f-4288-a51a-eeb6dcc5c4a3%40googlegroups.com.
I'm also bored to argue whether I have put a reproducible example at the FIRST BEGINNING or not. I notice you licensed the "ggtree" under Artistic-2.0, hence, I've modified it under the Original License.
To other users:Since I have pointed out the bug was resulted from the borders of the heatmap (ie. geom_tile), I have modified the "gheatmap" function (in the attach file) to set "size=0" as well as rename the parameter "color" as "border_color" and it's now ready for microbiome analysis.In my fist example:Using defualt gheatmap:
Questions and comments can be sent to ChungL...@zju.edu.cnLoojuen,Oct 24, 2017
在 2017年10月23日星期一 UTC+8下午5:43:06,chin...@qq.com写道:
I have a phylogenetic tree with a lot of tips. When I want to annotate some traits to the tree using gheatmap, I find it presents nothing. As I struggled to catch the bug, I found it's because gheatmap makes wrong in case of many tips. The pictures above shows how the window height influences the result using gheatmap and ggtree. In the attach file, I uploaded the tree I tested. Other tested data was produced via:
rnorm(397)->test
data.frame(test=test)->test
phylotre$tip.label->rownames(test)
gheatmap(ggtree(phylotre),test)
Thanks in advance.
Loojuen,
10.23
--
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. doi:10.1111/2041-210X.12628
Homepage: https://guangchuangyu.github.io/ggtree
---
You received this message because you are subscribed to the Google Groups "ggtree" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bioc-ggtree+unsubscribe@googlegroups.com.
To post to this group, send email to bioc-...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/bioc-ggtree/37d74eef-833a-4db9-b4e6-cb69887925a1%40googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to bioc-ggtree...@googlegroups.com.
To post to this group, send email to bioc-...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/bioc-ggtree/37d74eef-833a-4db9-b4e6-cb69887925a1%40googlegroups.com.