mothur

Stacked barplot color choice

Hi community!!!
I am generating stacked barplots from cons.taxonomy and shared output files by phyloseq package. I have got around 60 genus (abundance >1%). I don’t know how can I color all of them, because it requires 60 colors. And, it’s very hard to differentiate between sixty colors in naked eye. Any suggestion from your side?

Thanks and regards,
DC7

Stacked barcharts and piecharts are popular but pretty horrible ways to visualize microbiome data for the reason you describe and others. My preferred approach is to use a box and whisker plot or strip chart where you compare the relative abundance of each OTU in each sample for each treatment group. Unless you have a reason to focus on particular taxa, I would only look at those that were statistically significant. If you look at the last lesson of my minimalR microbial ecology R tutorial I show how to do this.

1 Like

Thanks a lot Dr. @pschloss for your suggestion. As I’ve mentioned in previous query that I am mainly focusing on genus level, my target is to extract out genera with relative abundance greater than 1 or 2%. But, the problem is I am getting a lot of diversity and the stacked bars becoming indistinguishable.
Same problem with box plot.
Thanks,
DC7

Stacked bar chart isn’t really useful for more than 15 or 20 groups in my opinion. If you really want to use it I think you could choose the 15 or 20 groups you want to highlight (those with differences between samples for example) and cluster all others into ‘other genera’