2  Getting started

This chapter provides an overview of the OMA ecosystem. Section 2.1 aims to describe the relationship between data containers utilized in OMA. Section 2.2 details the packages involved, while Section 2.3 provides guidance on installing these packages.

OMA (Orchestrating Microbiome Analysis) is an actively developed R/Bioconductor framework for microbiome downstream analysis. It becomes particularly relevant when working with abundance tables derived from sequencing data, whether from shotgun metagenomics or 16S rRNA sequencing. Before utilizing OMA, sequencing data must undergo preprocessing to convert raw sequence reads into abundance tables.

OMA consists of multiple R/Bioc packages and this online book that you are reading. The idea is not only to offer tools for microbiome downstream analysis but also to serve as a resource for valuable insights, offering guidance on conducting microbiome data analysis and developing effective microbiome data science workflows.

The key concept of OMA lies in its utilization of SummarizedExperiment-based data containers. This design choice enhances interoperability and versatility within the broader Bioconductor framework, facilitating access to an expanding array of tools. In practice, this approach allows for the integration of promising methods from related fields, such as single-cell sequencing.

Figure 2.1 shows how a typical microbiome study proceeds from data generation to results, and which steps OMA covers.

Flowchart from study system, sampling and sequencing through preprocessing to five OMA steps: data object, data processing, statistical analysis, data integration and results.
Figure 2.1: Microbiome data science workflow. After data generation and preprocessing (top), OMA covers five steps: 1) the data are wrapped in a TreeSummarizedExperiment object, 2) processed with quality control, transformations and agglomeration, 3) analyzed statistically, 4) integrated with other omic layers in a MultiAssayExperiment, and 5) reported reproducibly. Reproduced from Borman et al. (2025) under CC BY 4.0.

2.1 Data containers

As discussed, OMA is built upon the TreeSummarizedExperiment (TreeSE) data container. TreeSE is expanded from SingleCellExperiment (SCE) by incorporating additional slots tailored for microbiome analysis. The SCE class is designed for single-cell sequencing (Amezquita, Lun, Becht, et al. 2020; Lun and Risso 2020). Bioconductor offers a wide variety of tools for this field, including the online book Orchestrating Single-Cell Analysis with Bioconductor (OSCA) (Amezquita, Lun, Hicks, et al. 2020). SCE, in turn, is derived from the SummarizedExperiment (SE) class. This hierarchical relationship among data containers means that all methods applicable to SCE and SE objects can also be applied to TreeSE objects.

Orchestrating single-cell analysis with Bioconductor. Amezquita, Lun, Becht, et al. (2020). Nat Methods 17:137–145. doi:10.1038/s41592-019-0654-x.
Orchestrating single-cell analysis with Bioconductor. Amezquita, Lun, Hicks, et al. (2020). Bioconductor. https://bioconductor.org/books/release/OSCA/.
  • SummarizedExperiment (SE) (Morgan et al. 2020) is a generic and highly optimized container for complex data structures. It has become a common choice for analyzing various types of biomedical profiling data, such as RNA-seq, ChIP-seq, microarrays, flow cytometry, proteomics, and single-cell sequencing.

  • SingleCellExperiment (SCE) (Lun and Risso 2020) was developed as an extension to store copies of data in the same data container.

  • TreeSummarizedExperiment (TreeSE) (Huang 2020; Huang et al. 2021) was developed as an extension to incorporate hierarchical information (such as phylogenetic trees and sample hierarchies) and reference sequences.

SummarizedExperiment: SummarizedExperiment container. Morgan et al. (2020). R package version 1.20.0. https://bioconductor.org/packages/SummarizedExperiment.
SingleCellExperiment: S4 classes for single cell data. Lun et al. (2020). R package version 1.12.0.
TreeSummarizedExperiment: A S4 class for data with tree structures. Huang (2020). R package version 1.6.2.
TreeSummarizedExperiment: A S4 class for data with hierarchical structure [version 2; peer review: 3 approved]. Huang et al. (2021). F1000Res 9:1246. doi:10.12688/f1000research.26669.2.

The relationships between these classes are illustrated in Figure 2.2.

Figure 2.2: SummarizedExperiment (SE) is extended to SingleCellExperiment (SCE), which is further extended to TreeSummarizedExperiment (TreeSE).

MultiAssayExperiment (MAE) (Ramos et al. 2017) provides an organized way to bind several different data containers together in a single object. For example, we can bind microbiome data (in TreeSE container) with metabolomic profiling data (in an SE container), with (partially) shared sample metadata. This is convenient and robust, for instance, in subsetting and other data manipulation tasks. Microbiome data can be part of multi-omics experiments and analysis strategies. We highlight how the methods used throughout this book relate to this data framework by using the TreeSE, MAE, and classes beyond.

Software for the integration of multiomics experiments in Bioconductor. Ramos et al. (2017). Cancer Res 77:e39–e42. doi:10.1158/0008-5472.CAN-17-0344.
Other extensions

Beyond SCE and TreeSE, SE has been extended for many other purposes. Although these extensions were not developed specifically for microbiome data, they can be useful for it in certain cases. Examples include SpatialExperiment (Righelli et al. 2022) for spatially resolved data, GraphExperiment (Almeida-Silva 2026) for graph-structured data, DeeDeeExperiment (Abassi et al. 2026) for storing differential analysis results, and ReducedExperiment (Gisby and Barnes 2026) for dimensionality reduction results together with their feature loadings. These classes build on the same SE structure, so the skills covered in this book carry over to them. You do not need them to follow this book.

ReducedExperiment: Containers and tools for dimensionally-reduced -omics data. Gisby et al. (2026). R package version 1.5.0. doi:10.18129/B9.bioc.ReducedExperiment.
DeeDeeExperiment: Building an infrastructure for integrating and managing omics data analysis results in R/Bioconductor. Abassi et al. (2026). Bioinformatics 42:btag157. doi:10.1093/bioinformatics/btag157.
GraphExperiment: Infrastructure for high-dimensional quantitative data and associated networks in r/bioconductor. Almeida-Silva (2026). bioRxiv. doi:10.64898/2026.10.28.762566.
SpatialExperiment: Infrastructure for spatially-resolved transcriptomics data in r using bioconductor. Righelli et al. (2022). Bioinformatics 38:3128–3131. doi:10.1093/bioinformatics/btac299.

2.2 Package ecosystem

Methods for the (Tree)SummarizedExperiment and MultiAssayExperiment data containers are provided by multiple independent developers through R/Bioconductor packages. Bioconductor packages include comprehensive manuals and vignettes that show how to use their methods.

2.2.1 mia package family

The mia package family provides general methods for microbiome data wrangling, analysis and visualization.

Orchestrating microbiome analysis with Bioconductor. Borman et al. (2025). bioRxiv. doi:10.1101/2025.10.29.685036.
miaSim: An R/Bioconductor package to easily simulate microbial community dynamics. Gao et al. (2023). Methods Ecol Evol 14:1967–1980. doi:10.1111/2041-210x.14129.
miaDash: Shiny app for interactive analysis and exploration of microbiome data. Benedetti et al. (2024). R package version 1.1.1. https://github.com/microbiome/miaDash.

2.2.2 Other packages

Many other packages support these data containers, for example for differential abundance analysis, multi-omics integration and access to public data. Appendix B lists them, together with other microbiome tools. Tools based on phyloseq can be used by converting the data with convertToPhyloseq() (see Section 4.2). The Tools for Microbiome Analysis site lists more R packages for microbiome data science. Tips on new packages are welcome.

2.2.3 Open microbiome data

Hundreds of published microbiome datasets are readily available in these data containers (see Section 4.3).

2.3 Installation

2.3.1 Specific packages

You can install R packages of your choice with the following procedures.

Bioconductor release version is the most stable and tested version but may miss some of the latest methods and updates.

BiocManager::install("mia")

Bioconductor development version contains the latest updates. It is still under development and may require a newer R version. This is primarily recommended for those who already have experience with R/Bioconductor and need access to the latest updates.

BiocManager::install("mia", version = "devel")

GitHub development version is usually the same as the Bioconductor development version. In rare cases, it contains more experimental changes that are not yet available in Bioconductor.

remotes::install_github("microbiome/mia")

2.3.2 Key packages

Installing the core packages listed below is sufficient for training sessions and courses, as they provide the essential functionality required to run common tasks and most example workflows. You can then install additional packages as needed, depending on the specific requirements of your analysis.

The core packages include mia, miaViz and maaslin3 (Nickols et al. 2026) (for differential abundance).

MaAsLin 3: Refining and extending generalized multivariable linear models for meta-omic association discovery. Nickols et al. (2026). Nat Methods 23:554–564. doi:10.1038/s41592-025-02923-9.

Bioconductor packages are installed with the BiocManager package. First, install BiocManager if you do not have it yet.

install.packages("BiocManager")

Then, install the core packages. BiocManager::install() installs both Bioconductor and CRAN packages.

BiocManager::install(c("mia", "miaViz", "maaslin3"))

Installed packages are loaded into the R session with library(). If a package loads without an error, it was installed successfully.

2.3.3 All packages

You can install all packages that are required to run every example in this book via the following command:

remotes::install_github("microbiome/OMA", dependencies = TRUE, upgrade = TRUE)

Alternatively, you can install the packages from the list of all packages used in this book.

# URL of the raw CSV file on GitHub. It includes all packages needed.
url <- "https://raw.githubusercontent.com/microbiome/OMA/devel/oma_packages/oma_packages.csv"

# Read the CSV file directly into R
df <- read.csv(url)
packages <- df[[1]]

# Install packages
BiocManager::install(packages)

2.3.4 Docker container

Installing all the packages might take some time, and sometimes there can be some trouble. To get quick access to all packages, you might want to consider loading the Docker image. You can find more information in Section E.1.

2.3.5 Troubleshooting

If you encounter installation issues related to package dependencies, please see Appendix C and Chapter 24.

2.4 Colors in figures

The figures in this book use color-blind-friendly palettes: the Okabe-Ito palette (Okabe and Ito 2008) for groups and viridis for continuous values. These are set as the defaults with ggplot2 (Wickham 2016) options, which the plotting functions of miaViz also follow. You can use the same palettes in your own analysis by running the following before plotting:

Color universal design (CUD): How to make figures and presentations that are friendly to colorblind people. Okabe et al. (2008). https://jfly.uni-koeln.de/color/.
ggplot2: Elegant graphics for data analysis. Wickham (2016). Springer International Publishing. doi:10.1007/978-3-319-24277-4.
pal <- palette.colors(palette = "Okabe-Ito")[-1]
options(
    ggplot2.discrete.colour = pal,
    ggplot2.discrete.fill = pal,
    ggplot2.continuous.colour = "viridis",
    ggplot2.continuous.fill = "viridis"
)

The Okabe-Ito palette has eight colors. When a figure shows more groups, miaViz uses its own, larger palettes instead, and plots from other packages, such as scater (McCarthy et al. 2017), may use their own palettes. The code in the book is highlighted with the accessible a11y theme.

scater: Pre-processing, quality control, normalisation and visualisation of single-cell RNA-seq data in R. McCarthy et al. (2017). Bioinformatics 33:1179–1186. doi:10.1093/bioinformatics/btw777.

2.5 Interactive analysis

We also provide the Microbiome Analysis Dashboard (miaDash), a web app to interactively explore microbiome data through an intuitive Graphical User Interface (GUI). The app features a large part of the mia functionality and does not require any knowledge of R programming. This way, beginners can practice and learn the concepts of microbiome analysis while free from technical burdens. The app is openly available on Galaxy at this address. Feature requests and bug reports can be submitted here.

Summary

2.6 Exercises

Exercises 1 and 2 can be answered without writing code. Try to solve each exercise yourself before opening the solution.

Exercise 1: Data containers in OMA

Goal: Explain how the data containers used in OMA are related to each other.

Answer the following questions without writing any code. Section 2.1 will help you.

  1. Put the data containers TreeSummarizedExperiment (TreeSE), SummarizedExperiment (SE) and SingleCellExperiment (SCE) in order, starting from the one that the others are derived from.

  2. What does each of the three data containers add to the one it is derived from?

  3. A package provides a method for SCE objects. Can you use it for a TreeSE object? Why?

  4. You have measured both the microbiome and the metabolome from the same samples. Which data container can bind these two datasets together in a single object?

  1. SE → SCE → TreeSE. SCE is derived from SE, and TreeSE is derived from SCE.

  2. SE is a generic container for complex data structures, such as abundance tables and the metadata of samples and features. SCE adds the possibility to store copies of the data, such as alternative experiments, in the same container. TreeSE adds hierarchical information, such as phylogenetic trees and sample hierarchies, and reference sequences.

  3. Yes. Because TreeSE is derived from SCE, all methods that are applicable to SCE objects can also be applied to TreeSE objects. This allows OMA to borrow methods from other fields, such as single-cell sequencing.

  4. MultiAssayExperiment (MAE). It binds several data containers, for example a TreeSE with microbiome data and an SE with metabolomic data, together in a single object.

Exercise 2: Package ecosystem

Goal: Find packages for different tasks in the OMA package ecosystem.

Use the lists of packages in Section 2.2 to answer the following questions.

  1. Which package family provides general methods for microbiome data wrangling, analysis and visualization? Which package of this family would you use for each of the following tasks?

    • Visualizing microbiome data
    • Analyzing time series
    • Simulating microbiome data
    • Analyzing data interactively
  2. Name three packages that can be used for differential abundance analysis of (Tree)SummarizedExperiment data. The packages are listed in the tool list (Section B.1).

  3. You want to use a method from a package that is based on phyloseq objects. How can you use your TreeSE data with it?

  4. Open the list of packages used in this book. Which packages have you already used? Which packages are new to you? Any answer is correct.

  1. The mia package family. Visualization: miaViz. Time series: miaTime. Simulations: miaSim. Interactive analysis: miaDash.

  2. For example ALDEx2, ANCOMBC and maaslin3. The tool list also includes DESeq2, radEmu and dar, among others. maaslin3 is one of the key packages of this book (see Section 2.3.2).

  3. Convert the TreeSE object into a phyloseq object with convertToPhyloseq() (see Section 4.2).

  4. Any answer is correct. The list contains all packages that are needed to run the examples in this book.

Exercise 3: Install packages

Goal: Install packages and load them into the R session.

  1. Bioconductor packages are available as release, devel and GitHub versions. What is the difference between these versions?

  2. Install the packages mia and miaViz as shown in Section 2.3.2. If you do not have the BiocManager package yet, install it first.

  3. Load mia and miaViz into the R session. How can you tell that the packages were installed successfully?

  4. Check which version of mia you have installed.

Useful functions: install.packages(), BiocManager::install(), library(), packageVersion()

  1. The release version is the most stable and tested version, but it might miss the latest methods. The devel version contains the latest updates of Bioconductor, but it is still under development and may require a newer R version. The GitHub version is usually the same as the devel version. Only in rare cases does it contain changes that are not yet in Bioconductor.
# 2. Install BiocManager (only if needed), and then mia and miaViz
install.packages("BiocManager")
BiocManager::install(c("mia", "miaViz"))
# 3. Load the packages
library(mia)
library(miaViz)

# 4. Version of mia
packageVersion("mia")
##  [1] '1.21.37'
  1. If library() loads a package without an error, the package was installed successfully. Messages that are printed while loading are not errors.

  2. Any version is a correct answer. You can compare it with the version on the package page on the Bioconductor website.

Back to top