Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
773ee2c
Fixed R package referring and a citation
signynas Sep 15, 2025
67237c3
Fixed R package referring in agglomeration.qmd
signynas Sep 15, 2025
e06bb3d
Fixed R package referring in alpha_diversity.qmd
signynas Sep 15, 2025
8687249
Fixed R package referencing in community_similarity.qmd
signynas Sep 15, 2025
836bc98
Fixed referencing of packages in clustering.qmd
signynas Sep 16, 2025
b956942
Fixed referencing of packages in composition.qmd
signynas Sep 16, 2025
559ee29
Fixed referencing of packages in containers.qmd
signynas Sep 16, 2025
cefefb3
Fixed referencing of packages in contributions.qmd
signynas Sep 16, 2025
d9832e8
Removed unnecessary link leading to non-existent page in community_si…
signynas Sep 16, 2025
c3fc335
Fixed additional references to packages in contributions.qmd
signynas Sep 16, 2025
551a335
Fixed package referencing and other small stuff in convert.qmd
signynas Sep 17, 2025
1407446
Fixed package referencing and other small stuff in correlation.qmd
signynas Sep 17, 2025
9479a3d
Fixed referencing of packages and some other small stuff in different…
signynas Sep 17, 2025
01984fc
Fixed reference to other chapter in example_solutions.qmd
signynas Sep 17, 2025
f383347
Fixed referencing and some minor faults in extra_daa.qmd
signynas Sep 17, 2025
be3ae32
Fixed package referencing and other small stuff in import.qmd
signynas Sep 20, 2025
32d642a
Fixed package referencing and other small stuff in integrated_learner…
signynas Sep 20, 2025
2de9ff7
Fixed package referencing in intro.qmd
signynas Sep 22, 2025
c8a994a
Fixed package referencing in machine_learning.qmd
signynas Sep 22, 2025
134bcb8
Fixed package referencing in mediation.qmd
signynas Sep 22, 2025
d7b0670
Fixed package referencing in miaverse.qmd
signynas Sep 22, 2025
5f82ee0
Merge branch 'referring-packages' of https://github.com/signynas/OMA …
signynas Sep 22, 2025
1adc1fa
Fixed conflict when merging
signynas Sep 22, 2025
b13c7aa
Fixed package referencing and some other small stuff in miaverse.qmd
signynas Sep 22, 2025
5ed4a5f
Fixed package referencing in mmuphin_meta_analysis.qmd
signynas Sep 22, 2025
43c0bc4
Added BiocStyle to DESCRIPTION
signynas Sep 22, 2025
ad999e1
Fixed package referencing in msea.qmd
signynas Sep 22, 2025
6b06d4b
Fixed package referencing in multiassay_ordination.qmd
signynas Sep 22, 2025
6ecf7ab
Fixed package referencing in network_comparison.qmd
signynas Sep 22, 2025
1fdb51f
Updated contributions.qmd
signynas Sep 22, 2025
d94a207
Fixed referencing (again) in network_comparison.qmd
signynas Sep 23, 2025
130ea26
Fixed package referencing (again) in msea.qmd
signynas Sep 23, 2025
0c28a50
Fixed package referencing (again) in mmuphin_meta_analysis.qmd
signynas Sep 23, 2025
15a49e3
Fixed package referencing in network_learning.qmd
signynas Sep 23, 2025
1ac2cb5
Fixed package referencing and other small stuff in phyloseq_cheatshee…
signynas Sep 24, 2025
96e73e2
Fixed package referencing in preprocess.qmd
signynas Sep 25, 2025
de12fdd
Fixed package referencing in quality_control.qmd
signynas Sep 25, 2025
1ee07f3
Fixed package referencing and other small stuff in resources.qmd
signynas Sep 25, 2025
6e14c8b
Fixed package referencing in taxonomy.qmd
signynas Sep 25, 2025
79a3c08
Fixed referencing in training.qmd
signynas Sep 25, 2025
83ad290
Fixed package referencing in transformation.qmd
signynas Sep 25, 2025
711fdfc
Fixed package referencing in wrangling.qmd
signynas Sep 25, 2025
a95799e
Update DESCRIPTION
TuomasBorman Sep 26, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: OMA
Title: Orchestrating Microbiome Analysis with Bioconductor
Version: 0.98.47
Date: 2025-09-11
Version: 0.98.48
Date: 2025-09-26
Authors@R:
c(
person(given = "Tuomas", family = "Borman", role = c("aut", "cre"), email = "[email protected]", comment = c(ORCID = "0000-0002-8563-8884")),
Expand Down Expand Up @@ -30,6 +30,7 @@ Suggests:
BiocBook,
BiocManager,
BiocParallel,
BiocStyle,
Biostrings,
bluster,
caret,
Expand Down
4 changes: 2 additions & 2 deletions inst/pages/agglomeration.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ tse <- GlobalPatterns
One of the main applications of taxonomic information in sequencing data
is to agglomerate counts (such as ASV counts) to specific taxonomic levels
and to model how different sample-specific variables may influence the feature
composition at different taxonomic levels. For this, `mia` contains the
`agglomerateByRank()` function.
composition at different taxonomic levels. For this,
`r BiocStyle::Biocpkg("mia")` contains the `agglomerateByRank()` function.

At its simplest, the function takes a `TreeSE` object as input and outputs a
`TreeSE` object agglomerated to a specified taxonomy level using the `rank`
Expand Down
14 changes: 8 additions & 6 deletions inst/pages/alpha_diversity.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -129,9 +129,9 @@ modern 16S data, which commonly features denoising and removal of singletons

Alpha diversity can be estimated with the `addAlpha()` function, which includes
built-in methods for calculating some indices, while others are computed via
integration with the `vegan` [@R_vegan] package. The method calculates the
given indices, and add them to the `colData` slot of the `SummarizedExperiment`
object with the given `name`.
integration with the `r BiocStyle::CRANpkg("vegan")` package [@R_vegan].
The method calculates the given indices, and add them to the `colData` slot
of the `SummarizedExperiment` object with the given `name`.

```{r}
#| label: calc_diversity
Expand Down Expand Up @@ -173,7 +173,8 @@ used by default. However, the optional argument `tree` must be provided if
As alpha diversity metrics typically summarize high-dimensional samples into
singular values, many visualization approaches are available. Once calculated,
these metrics can be analyzed directly from the `colData`, for example, by
plotting them using `plotColData()` from the `scater` package [@R_scater].
plotting them using `plotColData()` from the `r BiocStyle::Biocpkg("scater")`
package [@R_scater].
Here, we use the `observed` species as a measure of richness. Let's visualize
the results against selected `colData` variables (sample type and final
barcode).
Expand Down Expand Up @@ -303,7 +304,8 @@ pairwise.wilcox.test(

Next, let's compare the Shannon index between sample groups and visualize the
statistical significance. Using the `stat_compare_means` function from the
`ggpubr` package, we can add visually appealing p-values to our plots.
`r BiocStyle::CRANpkg("ggpubr")` package, we can add visually appealing
p-values to our plots.

To add adjusted p-values, we first have to calculate them.

Expand Down Expand Up @@ -373,7 +375,7 @@ p

## Further reading

An article on [`ggpubr` package](http://www.sthda.com/english/articles/24-ggpubr-publication-ready-plots/76-add-p-values-and-significance-levels-to-ggplots/)
An article on [ggpubr package](http://www.sthda.com/english/articles/24-ggpubr-publication-ready-plots/76-add-p-values-and-significance-levels-to-ggplots/)
provides further examples for estimating and highlighting significances.

::: {.callout-tip icon="false"}
Expand Down
26 changes: 14 additions & 12 deletions inst/pages/clustering.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@ form the clusters based on the dissimilarity matrix. The data can be clustered
either based on features or on samples. The examples below are focused on
sample clustering.

There are multiple clustering algorithms available. `bluster` is a
Bioconductor package providing tools for clustering data in the
`SummarizedExperiment` container. It offers multiple algorithms such as
hierarchical clustering, DBSCAN, and K-means.
There are multiple clustering algorithms available.
`r BiocStyle::Biocpkg("bluster")` is a Bioconductor package providing tools
for clustering data in the `SummarizedExperiment` container. It offers multiple
algorithms such as hierarchical clustering, DBSCAN, and K-means.

```{r}
#| label: load_bluster
Expand Down Expand Up @@ -77,9 +77,10 @@ that contains all observations. Clusters are split recursively into clusters
that differ the most. The clustering can be continued until each cluster
contains only one observation.

In this example we use the `addCluster()` function from `mia` to cluster the
data. The `addCluster()` function allows to choose a clustering algorithm and
offers multiple parameters to shape the result. The `HclustParam()` parameter
In this example we use the `addCluster()` function from
`r BiocStyle::Biocpkg("mia")` to cluster the data. The `addCluster()`
function allows to choose a clustering algorithm and offers multiple
parameters to shape the result. The `HclustParam()` parameter
is used for hierarchical clustering, and it accepts several sub-parameters, as
further detailed in [HclustParam documentation](https://rdrr.io/github/LTLA/bluster/man/HclustParam-class.html).
Notably, the `by` argument specifies whether clustering is performed based on
Expand Down Expand Up @@ -348,11 +349,12 @@ community type and *W* representing continuous sample memberships across all
community types. The NMF algorithm calculates the minimum distance between the
original data and its approximation using Kullback-Leibler divergence.

Here, we use the `mia` wrapper `getNMF`. To reduce calculation time, we set the
number of components `k` to four instead of optimizing the number of components
that describe the original data the best. The matrix returned by `getNMF`
contains the sample scores, while the NMF output and NMF feature loadings are
stored in the attributes `NMF_output` and `loadings`, respectively.
Here, we use the `r BiocStyle::Biocpkg("mia")` wrapper `getNMF`. To reduce
calculation time, we set the number of components `k` to four instead of
optimizing the number of components that describe the original data the best.
The matrix returned by `getNMF` contains the sample scores, while the NMF
output and NMF feature loadings are stored in the attributes `NMF_output`
and `loadings`, respectively.

```{r}
#| label: nmf1
Expand Down
51 changes: 27 additions & 24 deletions inst/pages/community_similarity.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -124,12 +124,13 @@ tse$Group <- tse$SampleType == "Feces"

The standard Jaccard index is calculated based on a presence/absence table.
However, a common mistake is using the quantitative version instead. By
default, `vegan::vegdist()` computes the abundance-weighted Jaccard
default, the function `vegdist()` from the `r BiocStyle::CRANpkg("vegan")`
package computes the abundance-weighted Jaccard
dissimilarity, which is similar to Bray-Curtis. This can be controlled using
the `binary` parameter.

When calculating the Jaccard index with `mia`'s functions, it defaults to
standard presence/absence version:
When calculating the Jaccard index with `r BiocStyle::Biocpkg("mia")`'s
functions, it defaults to standard presence/absence version:

```
tse <- addDissimilarity(tse, assay.type = "counts", method = "jaccard")
Expand Down Expand Up @@ -273,7 +274,8 @@ and visualize the results.

In the following examples dissimilarity is calculated with the function
supplied to the `FUN` argument. Several metrics of beta diversity are defined
by the `vegdist()` function of the `vegan` package, which is often used in
by the `vegdist()` function of the `r BiocStyle::CRANpkg("vegan")`
package, which is often used in
this context. However, custom functions created by the user also work, as long
as they return a `dist` object. In either case, this function is then applied
to calculate reduced dimensions via an ordination method, the results of which
Expand All @@ -297,7 +299,8 @@ tse <- addMDS(
```

Sample dissimilarity can be visualized on a lower-dimensional display
(typically 2D) using the `plotReducedDim()` function from the `scater` package.
(typically 2D) using the `plotReducedDim()` function from the
`r BiocStyle::Biocpkg("scater")` package.
This also provides tools to incorporate additional information encoded by
color, shape, size and other aesthetics. Can you find any difference between
the groups?
Expand Down Expand Up @@ -375,9 +378,9 @@ tse <- addNMDS(
```

Multiple ordination plots are combined into a multi-panel plot with the
`patchwork` package, so that different methods can be compared to find
similarities between them or select the most suitable one to visualize
beta diversity in the light of the research question.
`r BiocStyle::CRANpkg("patchwork")` package, so that different methods
can be compared to find similarities between them or select the most
suitable one to visualize beta diversity in the light of the research question.

```{r}
#| label: mds-nmds_comparison2
Expand Down Expand Up @@ -570,15 +573,15 @@ p <- lapply(1:2, function(i) {
wrap_plots(p)
```

The `mia` package's `addAlpha()` and `getDissimilarity()` functions support
rarefaction in alpha and beta diversity calculations. Additionally, the
`rarefyAssay()` function allows random subsampling of a given assay within a
`TreeSummarizedExperiment` dataset.
The `r BiocStyle::Biocpkg("mia")` package's `addAlpha()` and
`getDissimilarity()` functions support rarefaction in alpha and beta diversity
calculations. Additionally, the `rarefyAssay()` function allows random
subsampling of a given assay within a `TreeSummarizedExperiment` dataset.

### Other ordination methods {#sec-other-ord-methods}

Other dimension reduction methods, such as PCA and UMAP, are inherited from the
`scater` package.
`r BiocStyle::Biocpkg("scater")` package.

```{r}
#| label: plot_pca
Expand Down Expand Up @@ -760,9 +763,8 @@ groups. A p-value smaller than the significance threshold indicates that the
groups have a different community composition.

This method is implemented with the
[`adonis2`](https://www.rdocumentation.org/packages/vegan/versions/2.4-2/topics/adonis)
function from the `vegan` package. You can find more on PERMANOVA from
[here](https://microbiome.github.io/OMA/docs/devel/pages/97_extra_materials.html/#compare-permanova).
[`adonis2`](https://www.rdocumentation.org/packages/vegan/versions/2.7-1/topics/adonis)
function from the `r BiocStyle::CRANpkg("vegan")` package.

From the results table below, we see that both clinical status and age explain
more than 10% of the variance, however, only age has statistical significance.
Expand All @@ -776,7 +778,7 @@ rda_info$permanova |>

Next, we proceed to visualize the weight and significance of each variable on
the similarity between samples with an RDA plot, which can be generated with
the `plotRDA()` function from the `miaViz` package.
the `plotRDA()` function from the `r BiocStyle::Biocpkg("miaViz")` package.

```{r}
#| label: plot_rda
Expand All @@ -798,9 +800,9 @@ complements the previous results obtained with PERMANOVA.
Calculating dissimilarities between samples is a computationally demanding
task, which can make methods like dbRDA or PCoA time-consuming with large
datasets. To speed up calculations, consider using functions that support
parallel processing instead of the default `vegan` package options. Packages
like `parallelDist` can significantly improve performance on systems with
multiple available cores.
parallel processing instead of the default `r BiocStyle::CRANpkg("vegan")`
package options. Packages like `r BiocStyle::CRANpkg("parallelDist")`
can significantly improve performance on systems with multiple available cores.

In `*Dissimilarity()` functions, you can specify the utilized dissimilarity
function with `dis.fun` argument.
Expand Down Expand Up @@ -1048,10 +1050,11 @@ plotReducedDim(
## Summary

As a final note, we provide a comprehensive list of functions for the
evaluation of dissimilarity indices available in the `mia` and `scater`
packages. The `calculate` methods return a reducedDim object as an output,
whereas the `run` methods store the reducedDim object into the specified
TreeSE.
evaluation of dissimilarity indices available in the
`r BiocStyle::Biocpkg("mia")` and `r BiocStyle::Biocpkg("scater")`
packages. The `calculate` methods return a `reducedDim` object as an output,
whereas the `run` methods store the `reducedDim` object into the specified
`TreeSE`.

* Canonical Correspondence Analysis (CCA): `getCCA()` and `runCCA()`
* dbRDA: `getRDA()` and `runRDA(0)`; our recommended default method to assess
Expand Down
22 changes: 11 additions & 11 deletions inst/pages/composition.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,9 @@ tse <- transformAssay(
)
```

We can visualize the heatmap with the
[`*sechm*`](http://www.bioconductor.org/packages/release/bioc/vignettes/sechm/inst/doc/sechm.html)
package. It is a wrapper for the *ComplexHeatmap* package [@ComplexHeatmap].
We can visualize the heatmap with the `r BiocStyle::Biocpkg("sechm")`
package. It is a wrapper for the `r BiocStyle::Biocpkg("ComplexHeatmap")`
package [@ComplexHeatmap].

```{r}
#| label: heatmap
Expand All @@ -111,8 +111,8 @@ heatmap
```

Another method to visualize community composition is by plotting a
NeatMap, which employs radial theta sorting when plotting the
heatmap [@Rajaram2010]. The `getNeatOrder()` function in the `miaViz`
NeatMap, which employs radial theta sorting when plotting the heatmap
[@Rajaram2010]. The `getNeatOrder()` function in the `r BiocStyle::Biocpkg("miaViz")`
package allows us to achieve this. This method sorts data points based
on their angular position in a 2D space, typically after an ordination
technique such as PCA or NMDS has been applied. The `getNeatOrder()` method
Expand All @@ -123,7 +123,7 @@ between data points according to the ordination method's spatial
configuration, rather than relying on hierarchical clustering.

Now, we'll perform the aforementioned steps to create a NeatMap using the
`sechm` package and the `getNeatOrder()` function.
`r BiocStyle::Biocpkg("sechm")` package and the `getNeatOrder()` function.

```{r}
#| label: neatmap
Expand Down Expand Up @@ -157,11 +157,11 @@ neatmap
::: callout-tip
## Additional heatmap visualization

In addition, there are also other packages that provide functions for
more complex heatmaps, such as those provided by
[*iheatmapr*](https://docs.ropensci.org/iheatmapr/articles/full_vignettes/iheatmapr.html)
and *ComplexHeatmap* [@ComplexHeatmap]. The utilization of
`ComplexHeatmap` for clustered heatmaps is explained in [@sec-clustered-heatmap].
In addition, there are also other packages that provide functions for more
complex heatmaps, such as those provided by `r BiocStyle::CRANpkg("iheatmapr")`
and `r BiocStyle::Biocpkg("ComplexHeatmap")` [@ComplexHeatmap]. The utilization
of `r BiocStyle::Biocpkg("ComplexHeatmap")` for clustered heatmaps is explained
in [@sec-clustered-heatmap].
:::

::: {.callout-tip icon="false"}
Expand Down
Loading
Loading