I am trying to make a bargraph in R with my relative abundances of fungal phyla by treatments. So far I have been using the Vegan package in to run all of my ecological statistics, but for this graph, I think ggplot would be appropriate. I do however have one issue. In my dataset, there was a really large variation in sequencing length between samples and that was significantly confounding the results of my NMDS and permanova’s. I then rarefied my samples using the sub.sample command command on my .shared file. Here is the code that I used:
mothur > sub.sample(shared=final.nn.0.03.pick.shared, size=3000)
This removed 27 of my samples (out of a total of 297) that had a total read length less than my cutoff of 3000. This solved the issue of variable sequencing length confounding my results.
However, now that I want to make the bar graph of relative abundances of fungal phyla between treatments, I am running into issues, because the number of OTU’s in the .shared file that is subsampled does not match that of my taxonomy file. I tried to subsample my taxonomy file at 3000, but it’s a bit confusing, because the taxonomy file is not organized by samples, but rather by taxa and relative abundance. I am honestly not sure how to go about this problem.
After doing some reading on the forum, it seems like the create.database can create something that will allow me to make these bar graphs. This command is however not working for me. Each time I tried it with the get.oturep step, it gives me an error about a sequence that is not in my name or count file.
I would dearly appreciate any suggestions here.