9.7 Try it Question 4 - Is there an interaction between diet and age and the microbiome
Variables and conditions can interact with each other in complex ways. Here we will try to tease apart the relationship between the gut microbiome, diet, and age. What does an interaction look like? In this example, we’re looking at whether or not a change in diet affects people of different ages in different ways. We might imagine for example that a young person’s gut is more resilient to change than an older person’s or vice versa. Changes at one age group may be different in the other.
Approach: Use alpha diversity measure and DESeq2 tools to answer this question. Using alpha diversity, determine if there is an interaction between diet and age. Then use DESeq2 to see if any ASVs are associated with changes in die-age interaction. Using Simpson alpha diversity measure (or specifically, Gini-Simpson) evaluate how microbial diversity changes with age and diet in general, or age and BD, HD and WO diet specifically. Remember, shifts in alpha diversity measure suggest a shift in microbial diversity, with high alpha diversity suggesting high microbial diversity. Then, use DESeq2 to evaluate if ageing changes ASVs associated with diet.
Note, when plotting this data you may get a warning below. That is ok!
Warning: The data you have provided does not have any singletons. This is highly suspicious. Results of richness estimates (for example) are probably unreliable, or wrong, if you have already trimmed low-abundance taxa from the data.We recommended that you find the un-trimmed data and retry.- Refer to the “alpha diversity” section of the “Analyze 16S rRNA Data with phyloseq” tutorial for help using the plot_richness() function.
9.7.1 Step 1. Plot alpha diversity based on age for all dietary groups, and then for BD, HD and WO.
Step 1A. Plot alpha diversity based on age for all dietary groups, and then for BD, HD and WO.
Plot alpha diversity based on age for all dietary groups.**
- Subset data - None
- age is on the x-axis
- Color is by subject
- Use the following code as a template:
plot_richness(miso_counts, x="fill in the blank",
color="fill in the blank",
title = "miso",
measures= c("Simpson"))| 1A-1. Paste your plot below: |
|---|
| 1A-2. Does alpha diversity change in value with increasing age (overall alpha diversity measure) ? |
|---|
| 1A-3. Does alpha diversity grow more varied between individuals with increasing age (are points less clustered with increasing age) ? |
|---|
Step 1B. Plot alpha diversity based on age for BD diet only.
Plot alpha diversity based on age for BD diet only.
- Subset data - diet BD
- age is on the x-axis
- Color is by subject
- Use the following code as a template:
# Subset only BD samples
miso_counts_BD = subset_samples(miso_counts, diet == "BD")
plot_richness(miso_counts_BD, x="fill in the blank",
color="fill in the blank",
title = "fill in the blank",
measures= c("Simpson"))| 1B-2.Paste your plot below: |
|---|
| 1B-2. Did the relationship between age and alpha diversity change when only looking at the BD diet data points? Explain your answer by describing the trend or lack thereof in the graph. |
|---|
Step 1C. Plot alpha diversity based on age for HD diet only.
- Subset data - diet HD
- age is on the x-axis
- Color is by subject
- Use the following code as a template:
#Step1: Subset data for HD only
miso_counts_HD = subset_samples(miso_counts, diet == "fill in the blank")
plot_richness(miso_counts_HD, x="fill in the blank",
color="fill in the blank",
title = "fill in the blank",
measures= c("Simpson"))| 1C-1. Paste your plot below: |
|---|
| 1C-2. Did the relationship between age and alpha diversity change when only looking at the HD diet data points? Explain your answer by describing the trend or lack thereof in the graph. |
|---|
1D-1. Plot alpha diversity based on age for WO diet only.
- Subset data - diet WO
- age is on the x-axis
- Color is by subject
- Use the following code as a template:
#Step1: Subset data for WO only
miso_counts_WO = subset_samples(miso_counts, diet == "fill in the blank")
plot_richness(fill in the blank, x="fill in the blank",
color="fill in the blank",
title = "fill in the blank",
measures= c("Simpson"))| 1D-1. Paste your plot below: |
|---|
| 1D-2. Did the relationship between age and alpha diversity change when only looking at the WO diet data points? Explain your answer by describing the trend or lack thereof in the graph. Remember, the WO only has half as many datapoints compared to the BD and HD since there is only 1 WO timepoint (versus 2 for BD and HD). |
|---|
9.7.2 Step 2. Perform differential abundance analysis comparing HD to BD for the population in general, and then for older individuals specifically.
Step 2A. Perform differential abundance analysis between HD and BD.
Design - is based on diet (no double quotes)
Groups to compare - HD and BD (baseline)
Plot Phylum on the X-axis and color by Class
Make sure your graph has a title that includes the comparison you are making (ex. WO vs HD)
Refer to the “Differential abundance” section of the “Analyze 16S rRNA Data with phyloseq” tutorial for help using the plot_ordination() function.
Use the code below as a template:
# STEP 1: Convert the phyloseq object to a DESeq2 object and specify experimental design
DESeq2 <- phyloseq_to_deseq2(miso_counts, design = ~ diet)
# STEP 2: Select the groups to compare, where the latter group is your baseline
my_comparison <-c("diet", "HD", "fill in the blank (baseline)")
# STEP 3: Run the differential abundance analysis
Significant_DEseq2_ASVs<-Differential_Abundance(miso_counts, DESeq2, my_comparison, 0.05)
# STEP 4: Retrieve the list of ASVs with a significant difference in abundance between the chosen groups
Significant_DEseq2_ASVs
# STEP 5: Plot the results with your chosen x axis and legend
ggplot(Significant_DEseq2_ASVs, aes(x = Phylum, y=log2FoldChange, color= fill in the blank)) + geom_point(size=4) +
theme(axis.text.x = element_text(angle = -90, hjust = 0, vjust=0.5))+
ggtitle("fill in the blank")| 2A-1. Insert the resulting plot below: |
|---|
| 2A-2. How many differentially abundant ASVs were identified? This is the number of rows in the result table. |
|---|
| 2A-3. Did a change in diet from BD to HD cause there to be a lot of changes in microbe abundance? |
|---|
9.7.3 Step 2B. Perform differential abundance analysis between HD and BD for older individual (> 50 yo.)
Subset data - older age (> 50 yo)
Design - is based on diet (no double quotes)
Groups to compare - HD and BD (baseline)
Plot Phylum on the X-axis and color by Class
Make sure your graph has a title that includes the comparison you are making (ex. WO vs HD)
Refer to the “Differential abundance” section of the “Analyze 16S rRNA Data with phyloseq” tutorial for help using the plot_ordination() function.
Use the code below as a template:
#First, subset miso_counts object to only include older individuals over age 50
subset = subset_samples(miso_counts, age >50)
# STEP 1: Convert the phyloseq object to a DESeq2 object and specify experimental design
DESeq2_subset <- phyloseq_to_deseq2(subset, design = ~ diet)
# STEP 2: Select the groups to compare, where the latter group is your baseline
comparison_subset <-c("diet", "HD", "fill in the blank (baseline)")
# STEP 3: Run the differential abundance analysis
Significant_ASVs_subset <- Differential_Abundance(miso_counts, DESeq2_subset, comparison_subset, 0.05)
# STEP 4: Retrieve the list of ASVs with a significant difference in abundance between the chosen groups
Significant_ASVs_subset
# STEP 5: Plot the results with your chosen x axis and legend
ggplot(Significant_ASVs_subset, aes(x = Phylum, y=log2FoldChange, color= fill in the blank)) + geom_point(size=4) +
theme(axis.text.x = element_text(angle = -90, hjust = 0, vjust=0.5))+
ggtitle("fill in the blank")| 2B-1. Insert the resulting plot below: |
|---|
| 2B-2. How many differentially abundant ASVs were identified? This is the number of rows in the result table. |
|---|
| 2B-3. Did a change in diet from BD to HD cause there to be a lot of changes in microbe abundance in older individuals? |
|---|
| 2B-4. How do these results compare to the results when we looked at the entire dataset (2A-1)? |
|---|
| 2B-5. When this analysis is repeated for a younger population (<=50), 3 differentially abundant ASVs are found. Do you think there is a diet-age interaction? A reminder that an interaction would cause different age groups to react to the change in diet differently. |
|---|