Hi all,
I am trying to plot rank abundance curve for my 16S rDNA data in which I have different treatments. When I do so, I get one curve only describing about the presence of each species. However, as I have different treatments, I want to plot multiple curves to show the relative comparison and species distribution. This is not working for me. I am attaching the plot which I got and would be thankful for suggestions / help!
The code i am using is given below
phyloTemp = transform_sample_counts(physeq, function(x) 1e+02 * x/sum(x))
clusterData = psmelt(phyloTemp)
clusterData = dplyr::filter(clusterData, Abundance > 0)
clusterAgg = aggregate(Abundance ~ OTU + Genus, data=clusterData, mean)
clusterAgg = aggregate(Abundance ~ OTU + Genus,data=clusterData,mean)
clusterAgg = clusterAgg[order(-clusterAgg$Abundance),][1:100,]
ggplot(clusterAgg,aes(x=reorder(OTU,-Abundance),y=Abundance)) +
geom_point(aes(color=Genus),size=3) +
theme(axis.ticks = element_blank(), axis.text.x = element_blank()) +
scale_y_log10()