| Title: | Collection of public MERFISH datasets |
|---|---|
| Description: | MerfishData is an ExperimentHub package that serves publicly available datasets obtained with Multiplexed Error-Robust Fluorescence in situ Hybridization (MERFISH). MERFISH is a massively multiplexed single-molecule imaging technology capable of simultaneously measuring the copy number and spatial distribution of hundreds to tens of thousands of RNA species in individual cells. The scope of the package is to provide MERFISH data for benchmarking and analysis. |
| Authors: | Ludwig Geistlinger [aut, cre] (ORCID: <https://orcid.org/0000-0002-2495-5464>), Tyrone Lee [ctb], Helena Crowell [ctb] (ORCID: <https://orcid.org/0000-0002-4801-1767>), Daniela Corbetta [ctb], Jeffrey Moffitt [aut], Robert Gentleman [aut] |
| Maintainer: | Ludwig Geistlinger <[email protected]> |
| License: | Artistic-2.0 |
| Version: | 1.14.1 |
| Built: | 2026-10-10 11:18:17 UTC |
| Source: | https://github.com/bioc/MerfishData |
MerfishData is an ExperimentHub package that serves publicly available datasets obtained with Multiplexed Error-Robust Fluorescence in situ Hybridization (MERFISH). MERFISH is a massively multiplexed single-molecule imaging technology capable of simultaneously measuring the copy number and spatial distribution of hundreds to tens of thousands of RNA species in individual cells. The scope of the package is to provide MERFISH data for benchmarking and analysis.
Ludwig Geistlinger [email protected]
Useful links:
Add holes to a data.frame of cell polygon coordinates
addHolesToPolygons(poly)addHolesToPolygons(poly)
poly |
A
|
A data.frame
x <- c(2053, 2053, 2053, 2056, 2059, 2059) y <- c(51, 54, 57, 57, 57, 54) poly <- data.frame(cell = 1, x = x, y = y) poly <- addHolesToPolygons(poly)x <- c(2053, 2053, 2053, 2056, 2059, 2059) y <- c(51, 54, 57, 57, 57, 54) poly <- data.frame(cell = 1, x = x, y = y) poly <- addHolesToPolygons(poly)
Obtain the MERFISH mouse colon IBD dataset from Cadinu et al., 2024
MouseColonIbdCadinu2024()MouseColonIbdCadinu2024()
Gut inflammation involves contributions from immune and non-immune cells, whose interactions are shaped by the spatial organization of the healthy gut and its remodeling during inflammation. The crosstalk between fibroblasts and immune cells is an important axis in this process, but our understanding has been challenged by incomplete cell-type definition and biogeography.
To address this challenge, Cadinu et al., 2024 used multiplexed error-robust fluorescence in situ hybridization (MERFISH) to profile the expression of 943 genes in 1.35 million cells imaged across the onset and recovery from a mouse colitis model. They identified diverse cell populations, charted their spatial organization, and revealed their polarization or recruitment in inflammation.
The barcoding scheme contained 990 possible barcodes; 943 of them were used to
code the RNAs of the genes assayed via combinatorial smFISH across different
stages of colitis in a mouse model; 47 of these barcodes
were left unassigned ("blank"), providing a direct measure of the false-positive
rate in MERFISH. Measurements for these 47 blank barcodes is stored in an
altExp named "blank".
The dataset includes cell type labels with three levels of granularity.
Data were collected at multiple time points: prior to the onset of colitis
(sample_type="Healthy") and at intervals of 3 days, 9 days,
and 21 days post-onset.
An object of class SpatialExperiment.
https://doi.org/10.5061/dryad.rjdfn2zh3
Cadinu et al. (2024) Charting the cellular biogeography in colitis reveals fibroblast trajectories and coordinated spatial remodeling. Cell, 187(8).
spe <- MouseColonIbdCadinu2024()spe <- MouseColonIbdCadinu2024()
Obtain the MERFISH mouse hypothalamic preoptic region dataset from Moffitt et al., 2018
MouseHypothalamusMoffitt2018(center.coords = TRUE)MouseHypothalamusMoffitt2018(center.coords = TRUE)
center.coords |
logical. Should spatial x- and y-coordinates be centered
for each z-layer (bregma slice)? This is useful for making coordinates
comparable between bregma slices for visualization and analysis.
Defaults to |
The hypothalamus controls essential social behaviors and homeostatic functions. However, the cellular architecture of hypothalamic nuclei, including the molecular identity, spatial organization, and function of distinct cell types, is not well understood.
Moffitt et al., 2018, developed an imaging-based cell type identification and mapping method and combined it with single-cell RNA-sequencing to create a molecularly annotated and spatially resolved cell atlas of the mouse hypothalamic preoptic region.
The MERFISH measurements were obtained via combinatorial smFISH imaging for
135 genes (main experiment named "smFISH"), followed by sequential rounds
of non-combinatorial seqFISH for 20 additional genes (stored as an altExp
named "seqFISH"). These genes were considered neuronal markers and important
for discriminating neuronal cell populations. For behavioral measurements,
cFos was added to the set of genes measured with sequential rounds of FISH.
The barcoding scheme contained 140 possible barcodes; 135 of them were used to
code the RNAs of the genes assayed via combinatorial smFISH; 5 of these barcodes
were left unassigned ("blank"), providing a direct measure of the false-positive
rate in MERFISH. Measurements for these 5 blank barcodes is stored in an
altExp named "blank".
An object of class SpatialExperiment.
https://doi.org/10.5061/dryad.8t8s248
Moffitt et al. (2018) Molecular, spatial, and functional single-cell profiling of the hypothalamic preoptic region. Science, 362(6416), eaau5324.
spe <- MouseHypothalamusMoffitt2018()spe <- MouseHypothalamusMoffitt2018()
Obtain the MERFISH mouse ileum dataset from Petukhov et al., 2021
MouseIleumPetukhov2021( segmentation = c("baysor", "cellpose"), use.images = TRUE, use.polygons = TRUE )MouseIleumPetukhov2021( segmentation = c("baysor", "cellpose"), use.images = TRUE, use.polygons = TRUE )
segmentation |
character. Should be either |
use.images |
logical. Should DAPI and Membrane Na+/K+ - ATPase images
be loaded into memory and annotated to the |
use.polygons |
logical. Should polygon cell boundaries be annotated
to the |
Spatial transcriptomics protocols based on in situ sequencing or multiplexed RNA fluorescent hybridization can reveal detailed tissue organization. Distinguishing the boundaries of individual cells in such data is challenging. Current segmentation methods typically approximate cells positions using nuclei stains.
Petukhov et al., 2021, describe Baysor, a segmentation method, which optimizes 2D or 3D cell boundaries considering joint likelihood of transcriptional composition and cell morphology. Baysor can also perform segmentation based on the detected transcripts alone.
Petukhov et al., 2021, compare the results of Baysor segmentation (mRNA-only) to the results of a deep learning-based segmentation method called Cellpose from Stringer et al., 2021. Cellpose applies a machine learning framework for the segmentation of cell bodies, membranes and nuclei from microscopy images.
The function allows to obtain segmented MERFISH mouse ileum data for both segmentation methods.
A note on storing images within a SpatialExperiment:
The default use.images = TRUE reduces the 9-frame z-stack images
for DAPI stain and Membrane Na+/K+ - ATPase fluorecense to single-frame
images (taking the first frame). For working with the 9-frame z-stack
images it is recommended to load the images individually from ExperimentHub.
An object of class SpatialExperiment.
https://doi.org/10.5061/dryad.jm63xsjb2
Petukhov et al. (2021) Cell segmentation in imaging-based spatial transcriptomics. Nat Biotechnol, 40(3), 345-54.
Stringer et al. (2021) Cellpose: a generalist algorithm for cellular segmentation. Nat Methods, 18(1), 100-6.
spe <- MouseIleumPetukhov2021()spe <- MouseIleumPetukhov2021()
Small helper function to plot a raster image.
plotRasterImage(img)plotRasterImage(img)
img |
a raster object representing a bitmap image. |
A ggplot object.
hgrid <- hcl(0, 80, seq(50, 80, 10)) img <- as.raster(matrix(hgrid, nrow = 4, ncol = 5)) plotRasterImage(img)hgrid <- hcl(0, 80, seq(50, 80, 10)) img <- as.raster(matrix(hgrid, nrow = 4, ncol = 5)) plotRasterImage(img)
Plot a tabset of colData annotations of one or more SpatialExperiment objects over an image.
plotTabset(spe.list, img)plotTabset(spe.list, img)
spe.list |
A named |
img |
a raster object representing a bitmap image. |
None. Produces a tabset for rendering with rmarkdown.
# create simulated data as described in the SpatialExperiment man page n <- 1000; ng <- 50; nc <- 20 x <- runif(n) y <- runif(n) # assign each molecule to some gene-cell pair gs <- paste0("gene", seq(ng)) cs <- paste0("cell", seq(nc)) gene <- sample(gs, n, TRUE) cell <- sample(cs, n, TRUE) # generate molecule coordinates df <- data.frame(gene, cell, x, y) df$gene <- factor(df$gene, gs) df$cell <- factor(df$cell, cs) mol <- BumpyMatrix::splitAsBumpyMatrix( df[, c("x", "y")], row = df$gene, column = df$cell) # generate gene x cell molecule count matrix y <- with(df, table(gene, cell)) y <- as.matrix(unclass(y)) # construct SpatialExperiment spe <- SpatialExperiment(assays = list(counts = y, molecules = mol)) # add simulated cell centroids s <- cbind(x = runif(20), y = runif(20)) spatialCoords(spe) <- s # add simulated cell type and cell cycle annotation ct <- c("ct1", "ct2", "ct3") cc <- c("G1", "G2", "S", "M") spe$type <- sample(ct, ncol(spe), replace = TRUE) spe$cycle <- sample(cc, ncol(spe), replace = TRUE) # create an example image hgrid <- hcl(0, 80, seq(50, 80, 10)) img <- as.raster(matrix(hgrid, nrow = 4, ncol = 5)) # plotTabset spe.list <- list(myseg = spe) plotTabset(spe.list, img)# create simulated data as described in the SpatialExperiment man page n <- 1000; ng <- 50; nc <- 20 x <- runif(n) y <- runif(n) # assign each molecule to some gene-cell pair gs <- paste0("gene", seq(ng)) cs <- paste0("cell", seq(nc)) gene <- sample(gs, n, TRUE) cell <- sample(cs, n, TRUE) # generate molecule coordinates df <- data.frame(gene, cell, x, y) df$gene <- factor(df$gene, gs) df$cell <- factor(df$cell, cs) mol <- BumpyMatrix::splitAsBumpyMatrix( df[, c("x", "y")], row = df$gene, column = df$cell) # generate gene x cell molecule count matrix y <- with(df, table(gene, cell)) y <- as.matrix(unclass(y)) # construct SpatialExperiment spe <- SpatialExperiment(assays = list(counts = y, molecules = mol)) # add simulated cell centroids s <- cbind(x = runif(20), y = runif(20)) spatialCoords(spe) <- s # add simulated cell type and cell cycle annotation ct <- c("ct1", "ct2", "ct3") cc <- c("G1", "G2", "S", "M") spe$type <- sample(ct, ncol(spe), replace = TRUE) spe$cycle <- sample(cc, ncol(spe), replace = TRUE) # create an example image hgrid <- hcl(0, 80, seq(50, 80, 10)) img <- as.raster(matrix(hgrid, nrow = 4, ncol = 5)) # plotTabset spe.list <- list(myseg = spe) plotTabset(spe.list, img)
A helper function to overlay data onto a spatial image.
plotXY(df, col, img = NULL)plotXY(df, col, img = NULL)
df |
A |
col |
character. A column of |
img |
a raster object representing a bitmap image. |
A ggplot.
gene <- rep(c("Cd44", "Cd8b1", "Cd79b"), each = 2) x <- c(1693, 1701, 1820, 3188, 1631, 1881) y <- c(1831, 1666, 1855, 6612, 1533, 942) df <- data.frame(gene = gene, x = x, y = y) plotXY(df, "gene")gene <- rep(c("Cd44", "Cd8b1", "Cd79b"), each = 2) x <- c(1693, 1701, 1820, 3188, 1631, 1881) y <- c(1831, 1666, 1855, 6612, 1533, 942) df <- data.frame(gene = gene, x = x, y = y) plotXY(df, "gene")