8.7 Try it Question 4 - Does age contribute to individual microbiome variation

The human gut microbiome has been associated with age-related disease states, immune-system changes, and metabolic function. Here we will explore the potential microbiome changes associated with aging.

Approach: Survey the differences in microbiome across age, refining the plot to accommodate a continuous variable (age) and unequal sample sizes (some individuals in the study are the same age). Then, test if there is a shift in microbiome abundance of phyla Firmicutes and Bacteroidetes, two phyla suggested previously to change with age.

8.7.2 Step 4B. Merge samples by age, then re-normalize and finally re-plot Phyla by age.

  1. Merge samples of the same age, saving the resulting phyloseq object as ‘merge’. You will probably get a warning message letting you know “NAs were introduced by coercion.” That is OK.
merge <- merge_samples(miso, "age")
  1. Check your merged phyloseq object. Your new ‘merge’ object should have 16 samples corresponding to 16 unique ages in the MISO dataset.
merge

phyloseq-class experiment-level object
otu_table()   OTU Table:         [ 1702 taxa and 16 samples ]
sample_data() Sample Data:       [ 16 samples by 32 sample variables ]
tax_table()   Taxonomy Table:    [ 1702 taxa by 9 taxonomic ranks ]
  1. Normalize the sample counts using the function transform_sample_counts. Our function, (100* x/sum(x)) will transform all the samples into proportions.
merge <- transform_sample_counts(merge, function(x) 100 * x/sum(x))
  1. Re-plot Phyla by age.
plot_bar(merge, x= "age", fill = "fill in the blank", title = "fill in the blank") +
  geom_bar(aes(color = fill in the blank, fill = fill in the blank), stat = "identity", position = "stack")+
theme(legend.text=element_text(size=6)) + 
theme(legend.key.size = unit(6, "pt"))
  • We may need to reduce the legend text and key size in order to visualize the plot better. We have added some code above in light blue to help see the legend.

  • You will need to run all the commands in the same code chunk to produce the plot.

4B-1. Insert the resulting plot below:


4B-2. Do you observe any candidate Phyla that changes with age?


8.7.3 Step 4C. Candidate Phyla implicated in age variation include Firmicutes and Bacteroidetes. Plot these specific phyla on their own, separately, to observe any shift that occurs with age.

  • Use your new merged and normalized ‘merge’ phyloseq object as input. This means the new code must be placed in the same code block as the previous and run together.
  • Refer to the “Subset taxonomy” section of the “Explore 16S rRNA Data with phyloseq” tutorial for help using the subset_taxa and plot_bar() functions.
  • Use the following code as a template:
subset = subset_taxa(merge,  Phylum == "fill in the blank")
plot_bar(subset, "age", fill = "fill in the blank", title = "fill in the blank") + 
 geom_bar(aes(color = fill in the blank, fill = fill in the blank), stat = "identity", position = "stack")
4C-1. Insert the plot that graphs the relationship of age to the Phylum Firmicutes below: The graph should have age on the axis, and just one color of bar that varies in height.


4C-2. Do you observe any changes in Firmicutes based on age?


4C-3. Insert the plot that graphs the relationship of age to the Phylum Bacteroidetes below: The graph should have age on the axis, and just one color of bar that varies in height.


4C-4 Do you observe any changes in Bacteroidetes based on age?


8.7.4 Grading criteria

  • Download the assignment to your local computer as a .docx, complete it, and upload the assignment to your LMS (Blackboard, Canvas, Google Classroom).

8.7.5 Footnotes

8.7.5.2 Contributions and affiliations

  • Valeriya Gaysinskaya, Johns Hopkins University
  • Gauri Paul, Clovis Community College
  • Frederick Tan, Johns Hopkins University
  • Sayumi York, Notre Dame of Maryland University