Entering edit mode
2.1 years ago
Amr
▴
180
How to visualize taxonomic data based on mean relative abundance?
This code visualize the data but I want to visualize based on the mean relative abundance > 1% in all samples
dat2 %>% ggplot(aes (x = sample,y = count))+ geom_bar(aes (fill=sample), stat = "identity",position = "fill")
Thanks
I'm not sure I totally understand, but if count = mean relative abundance, then you can use dplyr to filter for count > 1% as follows:
You can then continue with ggplot2.
No because relative abundance is to take the percentage of every count among all counts for example: if we have 3 samples sample1 = 5 , sample 2 = 10, and sample 3 = 12 then their relative abundance for sample 1 will be (5/5+2+10), for sample 2 will be 10/5+10+12 and for sample 3 will be 12/12+5+10
Would this work?