Differential Abundance Analysis of OTUs in Macatawa Watershed Samples
Introduction
In this assignment you will conduct a differential abundance analysis of OTUs in the Macatawa watershed samples. The analysis is covered in Tutorial 11, and the first part of this assignment is to read that tutorial and run the code on HPC. You will not turn anything in from this part of the assignment.
The second part of this assignment is to conduct a differential abundance analysis, comparing the same two groups of samples that you used in the PERMANOVA assignment. This time, instead of comparing communities between the two groups of samples, you will be comparing abundances for individual OTUs. You will create a heat map to visualize your results. Since the comparison you are making is motivated by the topic of your final presentation, the heat map may become one of the figures you use in the presentation.
The Quarto file for tutorial 11 is posted to our Moodle site (with explanations removed). You may modify that code for your analysis.
Your analysis
In the PERMANOVA assignment, you probably filtered your data set to retain a specific subset of the data (e.g., just lake sites), and you may have needed to create a new variable combining levels from two other variables. Since you are comparing the same groups in this assignment, you should identify relevant portions of your previous code to reuse here and integrate them into the new code.
You should include about 30 OTUs in your plot. You should adjust the log fold change threshold to select the right number of OTUs. Create a plot of the number of significant OTUs vs log fold change threshold to do this (as in Tutorial 11). If you do not have 30 significant OTUs, even with a log fold change threshold of 0, then you can use a higher significance level (as high as 0.05).
Adjust the color scale for your heat map so that it is appropriate for the relative abundances for the OTUs and samples you have selected. You should continue to color cells white that correspond to relative abundances that are less than 0.001 (as in the Tutorial). Create a histogram of relative abundances for your OTUs/samples, and use it to determine the other levels for the color scale.
Try several different combinations of variables for annotating the columns (samples), focusing on variables that are relevant to your final project questions. Your grouping variable should always be one of the column annotation variables. Also try different approaches to labeling and annotating the rows (OTUs) using taxonomic information. Again, focus on things that are relevant to your final project questions. You should create several versions of your heatmap before settling on the one you turn in. Can you identify any interesting patterns?
You may need to experiment with different plot sizes and font sizes to create an easily readable plot. Make sure that the title of your plot is appropriate for your analysis. Also ensure that all legends are visible.
As usual, you should create a Quarto file (probably based on the one from Tutorial 11) to conduct your analyses. It should include a brief introduction, explanatory text for each code chunk, discussion of your statistical results, interpretation of your plots, and conclusions. You should indicate things like the number of OTUs that have significantly different abundances in your two groups.
Include a brief description of you plot of the number of significant OTUs vs the log fold change threshold. How did you use the plot to choose the threshold that you used in your later analysis? Also include a very brief description of your histogram of relative abundances and how you used it to set the color scale for your heat map.
For the interpretation of your heat map, discuss how what you see in your heat map relates to the the community comparison you performed in the PERMANOVA assignment. Describe any patterns that you see in your heat map (look for light or dark bands representing multiple samples or multiple OTUs). Are there groups of OTUs that tend to be more or less well represented in different sets of samples? How are these OTUs related to each other? Does the variability relate to any of the other variables you have used for annotation? Can you suggest reasons for any of the patterns you see? How do your results relate to the questions/ares you are exploring in your final project?
What you need to turn in
For this assignment, you need to turn in 3 files:
- A Quarto (.qmd) file with your code and output and your introduction, explanatory text, conclusions, and interpretation
- The rendered report (.html) that was generated using the Quarto file you created
- The pdf file with your heat map (make sure it is readable and complete)