The code here analyzes data from an ASV table of the ITS gene region. The ITS gene region is used here as a genetic barcode to distinguish over 16 thousand different fungal genera isolated from soil samples in Barro Colorado, Panama. Sequence variants and sample metadata were provided by the McGuire Lab at the University of Oregon (IE2).
phyloseq
package was used to handle ASV data. ./Data/setup.R
imports all data and writes them to .Rds
files, which are easily importable into other r scripts.
Other dependencies: vegan
, spaa
, and EcolUtils
were used for ordination and PERMANOVA tests.
Each of the .Rmd
files does a separate statistical analysis:
funguild.charts.Rmd
visualizes relative abundances of ecological guilds (guild classifications for ASVs determined prior via FunGUILD classification).genera.charts.Rmd
visualizes relative abundances of fungal genera.ordination.plots.Rmd
uses non-metric multidimensional scaling (NMDS) to produce ordination plots of community divergence.permanova.Rmd
uses a pairwise PERMANOVA test to confirm community divergence. Assumptions are tested using Beta-dispersion.
Prior to use, you will need to have some packages pre-installed in order to run this code properly. Packages such as vegan
and spaa
may be downloaded in the usual way: using the install.packages
function.
However, phyloseq
and EcolUtils
require special instructions for installation. You may find the links to these instructions below:
- Installing
phyloseq
: https://www.bioconductor.org/packages/release/bioc/html/phyloseq.html - Installing
EcolUtils
: https://github.com/GuillemSalazar/EcolUtils
You may also want to consider installing RStudio, since most of the code files are written in R markdown (.Rmd
format).
If you'd like to view the thesis I wrote, you can download on the U of O Scholars Bank (https://scholarsbank.uoregon.edu/xmlui/handle/1794/27369). I've also attached it to this repository for easy access.
I'd like to thank Dr. Kaye Shek, Univ. of Oregon colleague and fellow McGuire lab member, for all of her mentorship and for teaching me the theoretical and practical fundamentals of using these R packages. Her mentorship, in addition to that of Professor Krista McGuire, has greatly inspired me in this new and exciting path on the road of science. In addition, Ph.D. student and mentor Jeremy Collings in Professor Jeff Diez's lab provided me the skeleton R code for adding centroids to the NMDS plots. Much eternal gratitude to all, hope you are doing very well.