knitr::opts_chunk$set(
    collapse = TRUE,
    comment = "#>",
    crop = NULL ## Related to https://stat.ethz.ch/pipermail/bioc-devel/2020-April/016656.html
)

Installation

To install the package, start R and enter:

if(!requireNamespace("BiocManager", quietly = TRUE))
    install.packages("BiocManager")
BiocManager::install("MerfishData")

Setup

After the installation, we proceed by loading the package and additional packages used in the vignette.

library(MerfishData)
library(ExperimentHub)
library(ggpubr)

Data

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.

Def. hypothalamic preoptic region: is a part of the anterior hypothalamus that controls essential social behaviors and homeostatic functions.

Cell segmentation was carried out based on total polyadenylated mRNA and DAPI nuclei costains. Combinatorial smFISH imaging was used for the identification and spatial expression profiling of 161 genes in 1,027,848 cells from 36 mice (16 female, 20 male).

The data was obtained from the datadryad data publication.

This vignette demonstrates how to obtain the MERFISH mouse hypothalamic preoptic region dataset from Moffitt et al., 2018 from Bioconductor's ExperimentHub.

eh <- ExperimentHub()
query(eh, c("MerfishData", "hypothalamus"))

Note: complementary scRNA-seq of ~31,000 cells dissociated and captured from the preoptic region of the hypothalamus from multiple male and female mice is available on GEO (GSE113576).

Segmented data

It is also possible to obtain the data in a SpatialExperiment, which integrates experimental data and cell metadata, and provides designated accessors for the spatial coordinates.

spe <- MouseHypothalamusMoffitt2018()
spe

Inspect the data components:

assay(spe)[1:5,1:5]
colData(spe)
head(spatialCoords(spe))

Def. Bregma: The bregma is the anatomical point on the skull at which the coronal suture is intersected perpendicularly by the sagittal suture. Used here as a reference point for the twelve 1.8- by 1.8-mm imaged slices along the z-axis.

The anterior position of the preoptic region is at Bregma +0.26.

table(spatialCoords(spe)[,"z"])

Cell type assignment:

table(spe$cell_class)

Visualization

Visualize cell centroids and annotated cell type labels as in Figure 3E of the paper for six different anterior-posterior positions from a single female mouse.

relz <- c(0.26, 0.16, 0.06, -0.04, -0.14, -0.24)
cdat <- data.frame(colData(spe), spatialCoords(spe))
cdat <- subset(cdat, cell_class != "Ambiguous")
cdat$cell_class <- sub(" [1-4]$", "", cdat$cell_class)
cdat <- subset(cdat, z %in% relz)
cdat$z <- as.character(cdat$z)
zum <- paste(0:5 * 100, "um")
names(zum) <- as.character(relz)
cdat$z <- unname(zum[cdat$z]) 
pal <- get_palette("simpsons", 9)
names(pal) <- c("Endothelial", "Excitatory", "OD Immature", "Astrocyte", "Mural",
                "Microglia", "Ependymal", "Inhibitory", "OD Mature")
ggscatter(cdat, x = "x", y = "y", color = "cell_class", facet.by = "z",
          shape = 20, size = 1, palette = pal) +
          guides(color = guide_legend(override.aes = list(size = 3)))

Interactive exploration

The MERFISH mouse hypothalamus dataset is part of the gallery of publicly available MERFISH datasets.

This gallery consists of dedicated iSEE and Vitessce instances, published on RStudioConnect, that enable the interactive exploration of different segmentations, the expression of marker genes, and overlay of cell metadata on a spatial grid or a microscopy image.

SessionInfo

sessionInfo()


ccb-hms/MerfishData documentation built on Aug. 19, 2022, 8:55 a.m.