@@ -17,7 +17,7 @@ treatment versus control groups.
1717The goal of DAA is thus to identify biomarkers of a certain phenotype or
1818condition, and gain understanding of a complex system by looking at its isolated
1919components. For example, the identification of a bacterial taxon that is more
20- abundant in healthy patients compared to diseased patients can lead to important
20+ abundant in healthy versus diseased individuals can lead to important
2121insights into the underlying mechanisms of the disease. In other words,
2222differentially abundant taxa can be involved in the dynamics of the disease,
2323which in turn helps to understand the system as a whole.
@@ -129,8 +129,9 @@ analysis and the differential analysis of positive (non-zero) abundances.
129129### Preparing the data {#sec-prepare-data}
130130
131131We use the Tengeler2020 dataset from ` r BiocStyle::Biocpkg("mia") ` package.
132- The dataset includes samples from people with ADHD (N = 13) and without ADHD
133- (Control group, N = 14). The people are from three different cohorts.
132+ The dataset includes stool samples from mice humanized with either ADHD
133+ individuals' gut microbiome (N = 13) or healthy controls' (N = 14). The samples
134+ belong to three different cohorts.
134135
135136``` {r}
136137#| label: load_packages_and_data
@@ -177,10 +178,10 @@ tse$cohort <- factor(tse$cohort, levels = c("Cohort_1", "Cohort_2", "Cohort_3"))
177178
178179### Simple two-group comparison {#sec-daa-basic}
179180
180- Here we perform the simplest version of DAA, namely, the comparison of two
181+ Here, we perform the simplest version of DAA, namely, the comparison of two
181182groups without any other covariates included in the analysis.
182- In our case this means comparing the relative abundances of genera between the
183- people with and without ADHD .
183+ In our case, this means comparing the relative abundances of genera between the
184+ microbiome of ADHD individuals versus control .
184185
185186We employ the ` Maaslin2 ` function from the ` r BiocStyle::Biocpkg("Maaslin2") `
186187package [ @Mallick2020 ] . The function
@@ -199,11 +200,6 @@ folder for some output files. Lastly, we prevent `Maaslin2()` to create certain
199200plots. (Note that ` Maaslin2() ` prints a lot of some output
200201which is suppressed here for convenience.)
201202
202- ``` {r}
203- #| label: disable_chunks
204- knitr::opts_chunk$set(eval = FALSE)
205- ```
206-
207203``` {r}
208204#| label: run_daa_basic
209205#| results: hide
@@ -335,23 +331,15 @@ intervals.
335331
336332``` {r}
337333#| label: plot_daa_est_ci
338-
339- # First arrange the genera by log2-fold estimate
340- top_features <- res_daa_basic[order(res_daa_basic[["coef"]], decreasing = TRUE), "feature"]
341- res_daa_basic[["genus_ord"]] <- factor(res_daa_basic[["feature"]], levels = top_features)
342-
343334# Plot the log2-fold changes and the 95% confidence intervals
344- ggplot(res_daa_basic, aes(x = coef, y = genus_ord)) +
345- geom_vline(xintercept = 0, linetype = "dashed") +
346- geom_point() +
347- geom_errorbarh(aes(xmin = ci_lwr, xmax = ci_upr), height = 0.2) +
348- labs(x = "Log2-fold change (95% CI)") +
349- theme_light() +
350- theme(
351- axis.title.y = element_blank(),
352- axis.text.y = element_text(size = 7),
353- plot.title = element_text(hjust = 0.5)
354- )
335+ plotForest(
336+ res_daa_basic,
337+ effect.var = "coef",
338+ ci.lower.var = "ci_lwr",
339+ ci.upper.var = "ci_upr",
340+ id.var = "feature",
341+ order.by = "coef"
342+ )
355343```
356344
357345### DAA with additional covariates {#sec-daa-cov}
@@ -558,11 +546,6 @@ cohort).
558546Note that a similar plot could also be used to illustrate a possible confounding
559547effect.
560548
561- ``` {r}
562- #| label: enable_chunks
563- knitr::opts_chunk$set(eval = TRUE)
564- ```
565-
566549### Differential prevalence analysis (DPA) {#sec-DPA}
567550
568551We show here how to perform DPA with logistic regression. We show the case
@@ -766,7 +749,9 @@ comparison, but it can also incorporate covariates (and interaction terms)
766749
767750As there does not currently exist a good implementation of ORM for
768751DAA one must use a custom function. Such custom function with application
769- examples is given in [ @sec -extra_daa] . We also note that, in contrast to
752+ examples is given in
753+ [ extra materials] ( https://microbiome.github.io/OMA-extras/docs/devel/pages/extra_daa.html#sec-orm ) .
754+ We also note that, in contrast to
770755` Maaslin2() ` function, the custom function provides confidence intervals and
771756q-values (calculated for the variable of interest) automatically in its output.
772757
@@ -780,7 +765,7 @@ statistical power, we recommend using a version of logistic regression
780765introduced by @Firth1993 . As there currently exists no convenient
781766implementation of Firth logistic regression for DPA, one needs to use a custom
782767function. Such custom function with application examples is given in the
783- [ @ sec - extra_daa] .
768+ [ extra materials ] ( https://microbiome.github.io/OMA-extras/docs/devel/pages/ extra_daa.html#sec-firth ) .
784769
785770::: {.callout-tip icon=false}
786771
@@ -818,7 +803,8 @@ with interactions.
818803of positive abundances with your data.
819804
82080510 . Bonus 2: Try to run DAA and DPA with ordinal regression model and Firth
821- logistic regression with the custom functions provided in the extra materials.
806+ logistic regression with the custom functions provided in the
807+ [ extra materials] ( https://microbiome.github.io/OMA-extras/docs/devel/pages/extra_daa.html#sec-orm ) .
822808See how the results differ from the results obtained with ` Maaslin2() ` and
823809` maaslin3() ` .
824810
0 commit comments