dendextend icon indicating copy to clipboard operation
dendextend copied to clipboard

how to color tip or branch based on an external data.frame with name corresponding to tip labels?

Open tboonf opened this issue 6 years ago • 0 comments

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

tboonf avatar May 17 '18 16:05 tboonf