Skip to content

Commit 4a2ff6d

Browse files
authored
Merge branch 'devel' into devel
2 parents c8295d4 + d02425a commit 4a2ff6d

5 files changed

Lines changed: 28 additions & 90 deletions

File tree

DESCRIPTION

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Package: OMA
22
Title: Orchestrating Microbiome Analysis with Bioconductor
3-
Version: 0.99.5
4-
Date: 2026-03-26
3+
Version: 1.1.1
4+
Date: 2026-05-07
55
Authors@R:
66
c(
77
person(given = "Tuomas", family = "Borman", role = c("aut", "cre"), email = "tuomas.v.borman@utu.fi", comment = c(ORCID = "0000-0002-8563-8884")),

inst/pages/differential_abundance.qmd

Lines changed: 21 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ treatment versus control groups.
1717
The goal of DAA is thus to identify biomarkers of a certain phenotype or
1818
condition, and gain understanding of a complex system by looking at its isolated
1919
components. 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
2121
insights into the underlying mechanisms of the disease. In other words,
2222
differentially abundant taxa can be involved in the dynamics of the disease,
2323
which 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

131131
We 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
181182
groups 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

185186
We employ the `Maaslin2` function from the `r BiocStyle::Biocpkg("Maaslin2")`
186187
package [@Mallick2020]. The function
@@ -199,11 +200,6 @@ folder for some output files. Lastly, we prevent `Maaslin2()` to create certain
199200
plots. (Note that `Maaslin2()` prints a lot of some output
200201
which 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).
558546
Note that a similar plot could also be used to illustrate a possible confounding
559547
effect.
560548

561-
```{r}
562-
#| label: enable_chunks
563-
knitr::opts_chunk$set(eval = TRUE)
564-
```
565-
566549
### Differential prevalence analysis (DPA) {#sec-DPA}
567550

568551
We 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

767750
As there does not currently exist a good implementation of ORM for
768751
DAA 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
771756
q-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
780765
introduced by @Firth1993. As there currently exists no convenient
781766
implementation of Firth logistic regression for DPA, one needs to use a custom
782767
function. 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.
818803
of positive abundances with your data.
819804

820805
10. 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).
822808
See how the results differ from the results obtained with `Maaslin2()` and
823809
`maaslin3()`.
824810

inst/pages/mediation.qmd

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ med_df <- getMediation(
147147
)
148148
149149
# Plot results as a forest plot
150-
plotMediation(med_df, layout = "forest")
150+
plotMediation(med_df, layout = "forest") + theme_minimal()
151151
```
152152

153153
The forest plot above shows significance for both ACME and ADE, which suggests
@@ -195,11 +195,13 @@ Significant findings can be marked with p-values or stars.
195195
#| label: mediation5
196196
197197
# Plot results as a heatmap
198-
plotMediation(
198+
p <- plotMediation(
199199
tse, "assay_mediation",
200200
layout = "heatmap",
201201
add.significance = "symbol"
202202
)
203+
204+
p + theme_minimal()
203205
```
204206

205207
Results suggest that only four out of eight features (Bacteroidetes, Firmicutes,
@@ -274,7 +276,7 @@ p2 <- plotLoadings(
274276
)
275277
276278
# Combine plots
277-
p1 / p2
279+
(p1 / p2) & theme_minimal()
278280
```
279281

280282
The plot above suggests that only PC1 partially mediates the effect of living

inst/pages/phyloseq_cheatsheet.qmd

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,5 @@
11
# phyloseq vs TreeSE cheatsheet {#sec-phyloseq_cheatsheet}
22

3-
```{r}
4-
#| label: setup
5-
#| echo: false
6-
7-
knitr::opts_chunk$set(eval = TRUE, warning = FALSE, message = FALSE)
8-
```
9-
103
This section has a cheatsheet for translating common functions in
114
`r BiocStyle::Biocpkg("phyloseq")` to
125
`r BiocStyle::Biocpkg("TreeSummarizedExperiment")` (`TreeSE`) /

oma_packages/oma_packages.csv

Lines changed: 0 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,87 +1,44 @@
1-
ALDEx2
2-
ANCOMBC
31
ape
4-
biclust
52
BiocBook
63
BiocManager
7-
BiocParallel
84
BiocStyle
9-
Biostrings
105
bluster
11-
caret
12-
circlize
13-
cluster
14-
cobiclust
156
ComplexHeatmap
16-
corpcor
17-
cowplot
187
curatedMetagenomicData
19-
dada2
208
dendextend
21-
devtools
22-
DirichletMultinomial
239
dplyr
2410
DT
2511
factoextra
26-
fido
27-
forcats
2812
ggdag
2913
ggExtra
3014
ggplot2
3115
ggpubr
3216
ggtree
33-
glmnet
3417
glue
35-
grid
36-
gsEasy
3718
gt
38-
gtools
39-
igraph
40-
IntegratedLearner
4119
knitr
42-
limma
43-
logistf
44-
Maaslin2
4520
maaslin3
4621
mediation
4722
mia
4823
miaTime
4924
miaViz
50-
microbiome
5125
microbiomeDataSets
52-
MicrobiomeStat
5326
mikropml
54-
MMUPHin
5527
MOFA2
56-
multiview
5728
NbClust
58-
NetCoMi
5929
NMF
6030
patchwork
6131
philr
6232
phyloseq
63-
plotly
64-
purrr
6533
qgraph
66-
RColorBrewer
6734
rebook
68-
reshape2
69-
reticulate
70-
rgl
71-
rms
7235
scales
7336
scater
7437
scuttle
7538
sechm
7639
sessioninfo
7740
shadowtext
78-
SpiecEasi
79-
SPRING
8041
stats
81-
stringr
82-
SuperLearner
8342
tidySingleCellExperiment
8443
tidyverse
8544
vegan
86-
WGCNA
87-
xgboost (== 1.7.7.1)

0 commit comments

Comments
 (0)