Mismatch between qiime2 taxa bar plot and phyloseq taxa bar plot

Thanks for this @Sam_Degregori, however I think the following command:

ipd<- ggplot(pd, mapping=aes(x = Sample, y = Abundance,fill=Phylum))

may suffer the same problems as the tax_glom command. I think one way to confirm this is to run a forward fill on the taxonomy data prior to plotting any of the data. There are a couple ways to do this, e.g. fill.forward, and fill. There may be others. This is the an optional strategy we use when constructing SILVA databases, see the RESCRIPt SILVA tutorial, and see this related but older post about forward filling taxonomy (i.e. propagation).

-Cheers!
-Mike

3 Likes