Open Macok04 opened 2 years ago
I am not an expert in this but maybe this tutorial will help you: http://joey711.github.io/phyloseq-demo/Restroom-Biogeography I am trying to do something similar as well with my data. See the section about figure 1. I believe that you want to do something similar so hopefully this will do.
Best Leonardos
You can have a look at this post https://github.com/joey711/phyloseq/issues/1004
Hello, I am trying to make a graph with the relative abundances of the species found in my samples. I would like to graph the top 10 of the most abundant species, and that the rest are grouped into a group called others. However, I have not been able to do it, I am new to this, and although I have searched and tried things I have not been successful.
I am using the following code: ggplot (data = psmelt (SPlocation), mapping = aes_string (x = "species", y = "Abundance")) + geom_bar (aes (color = Species, fill = Species), stat = "identity", position = "fill ") + theme (legend.position =" bottom ") + facet_wrap (~ location)
The most I have been able to do is get the top 10 in an object, but it ends up eliminating the rest of the taxa, which I don't want.
top10s <- prune_taxa (names (sort (taxa_sums (SPlocation), TRUE)) [1:10], SPlocation)
Thank you