3  Bioconductor data classes

3.1 Introduction

Bioconductor provides several data classes for storing and manipulating spatial transcriptomics datasets. By relying on these consistent data structures, we can easily connect methods and packages developed by different research groups to build analysis workflows that include the latest state-of-the-art methods.

Below, we describe the Bioconductor data classes used in this book.

3.2 SpatialExperiment

The SpatialExperiment class (Righelli et al. 2022) is the core data class used in this book. This class allows us to store datasets at the spot or cell level, i.e. data from sequencing-based platforms at the spot level, or data from imaging-based platforms aggregated to the cell level.

SpatialExperiment builds on the SingleCellExperiment class (Amezquita et al. 2020) for single-cell RNA sequencing data, with additional customizations to store spatial information, such as spatial coordinates and image files.

A summary of the SpatialExperiment object structure is shown in the following schematic. Briefly, a SpatialExperiment object consists of (i) assays containing expression counts, (ii) rowData containing information on features, i.e. genes, (iii) colData containing information on spots or cells, including nonspatial and spatial metadata, (iv) spatialCoords containing spatial coordinates, and (v) imgData containing image data. For spot-based data, a single assay named counts is used.

For more details, see the SpatialExperiment package Bioconductor vignette or the paper describing the class (Righelli et al. 2022).

Overview of the SpatialExperiment data class for storing and manipulating spatial transcriptomics datasets within the Bioconductor framework.

3.3 Imaging-based data

Imaging-based spatial transcriptomics datasets may contain additional information, including the spatial coordinates of individual mRNA molecules, and segmentation boundaries for cells or nuclei.

The following Bioconductor classes provide additional functionality to store and manipulate this information.

These classes extend SpatialExperiment and are compatible with SpatialExperiment for analyses at the aggregated cell level.

3.3.1 SpatialFeatureExperiment

SpatialFeatureExperiment is available as a Bioconductor package and described by the authors in their paper (Moses et al. 2023).

3.3.2 MoleculeExperiment

MoleculeExperiment is available as a Bioconductor package and described by the authors in their paper (Peters Couto et al. 2023).

References

Amezquita, Robert A., Aaron T. L. Lun, Etienne Becht, Vince J. Carey, Lindsay N. Carpp, Ludwig Geistlinger, Federico Marini, et al. 2020. “Orchestrating Single-Cell Analysis with Bioconductor.” Nature Methods 17: 137–45. https://doi.org/10.1038/s41592-019-0654-x.
Moses, Lambda, Pétur Helgi Einarsson, Kayla Jackson, Laura Luebbert, A. Sina Booeshaghi, Sindri Antonsson, Nicolas Bray, Páll Melsted, and Lior Pachter. 2023. Voyager: Exploratory Single-Cell Genomics Data Analysis with Geospatial Statistics.” bioRxiv. https://doi.org/10.1101/2023.07.20.549945.
Peters Couto, Bárbara Zita, Nicholas Robertson, Ellis Patrick, and Shila Ghazanfar. 2023. MoleculeExperiment Enables Consistent Infrastructure for Molecule-Resolved Spatial Omics Data in Bioconductor.” Bioinformatics 39: btad550. https://doi.org/10.1093/bioinformatics/btad550.
Righelli, Dario, Lukas M. Weber, Helena L. Crowell, Brenda Pardo, Leonardo Collado-Torres, Shila Ghazanfar, Aaron T. L. Lun, Stephanie C. Hicks, and Davide Risso. 2022. SpatialExperiment: Infrastructure for Spatially-Resolved Transcriptomics Data in R Using Bioconductor.” Bioinformatics 38 (11): 3128–31. https://doi.org/10.1093/bioinformatics/btac299.
Back to top