SpatialExperiment
object class for storing spatially-resolved transcriptomics datasets in the Bioconductor framework.2 Bioconductor data classes
Bioconductor provides several data classes for storing and manipulating SRT datasets. By relying on these standardized data classes, we can build analysis workflows that can easily connect methods and packages developed by different groups.
Below, we describe the Bioconductor data classes used in this book.
2.1 SpatialExperiment class
The SpatialExperiment class is the core data class that we use in this book. This class allows us to store datasets at the spot or cell level, e.g. 10x Genomics Visium data (spot level) or data from molecule-based platforms that has been aggregated to the cell level.
SpatialExperiment builds on the more general SingleCellExperiment class (Amezquita et al. 2019) 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 SRT data (e.g. 10x Genomics Visium), a single assay
named counts
is used.
For more details, see the Bioconductor vignette for the SpatialExperiment class or the associated paper (Righelli, Weber, and Crowell et al. 2022).
2.2 Molecule-based data
Molecule-based SRT datasets include additional information such as the locations of individual mRNA molecules and segmentation boundaries for cells.
The following classes provide additional functionality to store and manipulate this information.
Note that these classes extend SpatialExperiment
and are compatible with SpatialExperiment
for aggregated cell-level analyses.
2.2.1 MoleculeExperiment
MoleculeExperiment
is available as a Bioconductor package and described in detail in a paper by Couto et al. (2023).
2.2.2 SpatialFeatureExperiment
SpatialFeatureExperiment
is available as a Bioconductor package and described in detail in a paper by Moses et al. (2023).