how to color tip or branch based on an external data.frame with name corresponding to tip labels?
tboonf opened this issue · 0 comments
tboonf commented
I have been trying a few other dendogram plotting programs and have been pleased with the flexibility of dendextend when used with ggplot. I am having difficulty in combining workflow with phyloseq.
Phyloseq offers the flexibility of performing unifrac and h.clustering, after which the result can be plotted in ggplot.
GPUF<-UniFrac(physeq, weighted = FALSE)
GP.hclust <- hclust(GPUF, method = "average")
dend <- as.dendrogram(GP.hclust)
ggplot(dend, horiz = T)
Can one passes the grouping info to dendextend so that the tip or branch can be color according to group?
Name group
A aaa
B aaa
C bbb
D ccc