Hi, I have a phyloseq object containing a phylogenetic tree at OTU level and I would like to do somenthing like this:
data(GlobalPatterns)
GP <- prune_taxa(taxa_sums(GlobalPatterns) > 0, GlobalPatterns)
GP.chl <- subset_taxa(GP, Phylum=="Chlamydiae")
ggtree(GP.chl) + geom_text2(aes(subset=!isTip, label=label), hjust=-.2, size=4) +
geom_tiplab(aes(label=Genus), hjust=-.3) +
geom_point(aes(x=x+hjust, color=SampleType, shape=Family, size=Abundance),na.rm=TRUE) +
scale_size_continuous(trans=log_trans(5)) +
theme(legend.position="right")
but insted of visualizing the tree with each OTU I would like to have it by family and show the total abundance of each family. is it possible? I saw that you can collapse clades by node but my tree is big and it is quite long to collapse clade by clade.
Hi, I have a phyloseq object containing a phylogenetic tree at OTU level and I would like to do somenthing like this: data(GlobalPatterns) GP <- prune_taxa(taxa_sums(GlobalPatterns) > 0, GlobalPatterns) GP.chl <- subset_taxa(GP, Phylum=="Chlamydiae")
ggtree(GP.chl) + geom_text2(aes(subset=!isTip, label=label), hjust=-.2, size=4) + geom_tiplab(aes(label=Genus), hjust=-.3) + geom_point(aes(x=x+hjust, color=SampleType, shape=Family, size=Abundance),na.rm=TRUE) + scale_size_continuous(trans=log_trans(5)) + theme(legend.position="right") but insted of visualizing the tree with each OTU I would like to have it by family and show the total abundance of each family. is it possible? I saw that you can collapse clades by node but my tree is big and it is quite long to collapse clade by clade.
Thanks a lot!