knitr::opts_chunk$set(echo = TRUE)
The STexampleData
package contains a collection of spatial transcriptomics datasets, which have been formatted into the SpatialExperiment Bioconductor class, for use in examples, demonstrations, and tutorials. The datasets are from several different technological platforms and have been sourced from various publicly available sources. Some of the datasets include images and/or reference annotation labels.
The STexampleData
package can be installed from Bioconductor:
install.packages("BiocManager") BiocManager::install("STexampleData")
The package contains the following datasets:
Visium_humanDLPFC
(10x Genomics Visium): A single sample (sample 151673) of human brain dorsolateral prefrontal cortex (DLPFC) in the human brain, measured using the 10x Genomics Visium platform. This is a subset of the full dataset containing 12 samples from 3 neurotypical donors, published by Maynard and Collado-Torres et al. (2021). The full dataset is available from the spatialLIBD Bioconductor package.
Visium_mouseCoronal
(10x Genomics Visium): A single coronal section from the mouse brain, spanning one hemisphere. This dataset was previously released by 10x Genomics on their website.
seqFISH_mouseEmbryo
(seqFISH): A subset of cells (embryo 1, z-slice 2) from a previously published dataset investigating mouse embryogenesis by Lohoff and Ghazanfar et al. (2022), generated using the seqFISH platform. The full dataset is available online.
ST_mouseOB
(Spatial Transcriptomics): A single sample from the mouse brain olfactory bulb (OB), measured with the Spatial Transcriptomics platform (Stahl et al. 2016). This dataset contains annotations for five cell layers from the original authors.
SlideSeqV2_mouseHPC
(Slide-seqV2): A single sample of mouse brain from the hippocampus (HPC) and surrounding regions, measured with the Slide-seqV2 platform (Stickels et al. 2021). This dataset contains cell type annotations generated by Cable et al. (2022).
Janesick_breastCancer_Chromium
(10x Genomics Chromium): 10x Genomics Chromium single-cell RNA sequencing data from human breast cancer dataset by Janesick et al. (2023). High resolution mapping of the breast cancer tumor microenvironment using integrated single-cell, spatial, and in situ analysis of FFPE tissue. Contains annotations for cell type from the original authors.
Janesick_breastCancer_Visium
(10x Genomics Visium): 10x Genomics Visium spatial transcriptomics data from human breast cancer dataset by Janesick et al. (2023). High resolution mapping of the breast cancer tumor microenvironment using integrated single-cell, spatial, and in situ analysis of FFPE tissue.
Janesick_breastCancer_Xenium_rep1
(10x Genomics Xenium): 10x Genomics Xenium in situ spatial data (sample 1, replicate 1) from human breast cancer dataset by Janesick et al. (2023). High resolution mapping of the breast cancer tumor microenvironment using integrated single-cell, spatial, and in situ analysis of FFPE tissue.
Janesick_breastCancer_Xenium_rep2
(10x Genomics Xenium): 10x Genomics Xenium in situ spatial data (sample 1, replicate 2) from human breast cancer dataset by Janesick et al. (2023). High resolution mapping of the breast cancer tumor microenvironment using integrated single-cell, spatial, and in situ analysis of FFPE tissue.
CosMx_lungCancer
(NanoString CosMx): NanoString CosMx human non-small cell lung cancer (NSCLC) dataset. Contains data from one sample (patient 9, slice 1). This dataset was previously released by NanoString on their website.
MERSCOPE_ovarianCancer
(Vizgen MERSCOPE): Vizgen MERSCOPE human ovarian cancer dataset. Contains data from one sample (patient 2, sample 1). This dataset was previously released by Vizgen on their website.
STARmapPLUS_mouseBrain
(STARmap PLUS): STARmap PLUS mouse brain data by Shi et al. (2023). Contains data from one sample (well 05), including annotations for cell type and tissue regions from the original authors.
The following examples show how to load the example datasets as SpatialExperiment
objects in an R session.
There are two options for loading the datasets: either using named accessor functions or by querying the ExperimentHub database.
library(SpatialExperiment) library(STexampleData)
# load object spe <- Visium_humanDLPFC() # check object spe dim(spe) assayNames(spe) rowData(spe) colData(spe) head(spatialCoords(spe)) imgData(spe)
# load object spe <- Visium_mouseCoronal() # check object spe
# load object spe <- seqFISH_mouseEmbryo() # check object spe
# load object spe <- ST_mouseOB() # check object spe
# load object spe <- SlideSeqV2_mouseHPC() # check object spe
# load object # note: this dataset is in SingleCellExperiment format sce <- Janesick_breastCancer_Chromium() # check object sce
# load object spe <- Janesick_breastCancer_Visium() # check object spe
# load object spe <- Janesick_breastCancer_Xenium_rep1() # check object spe
# load object spe <- Janesick_breastCancer_Xenium_rep2() # check object spe
# load object spe <- CosMx_lungCancer() # check object spe
# load object spe <- MERSCOPE_ovarianCancer() # check object spe
# load object spe <- STARmapPLUS_mouseBrain() # check object spe
library(ExperimentHub)
# create ExperimentHub instance eh <- ExperimentHub() # query STexampleData datasets myfiles <- query(eh, "STexampleData") myfiles # metadata md <- as.data.frame(mcols(myfiles))
# load 'Visium_humanDLPFC' dataset using ExperimentHub query spe <- myfiles[[1]] spe
# load 'Visium_humanDLPFC' dataset using ExperimentHub ID spe <- myfiles[["EH9516"]] spe
For reference, we include code scripts to generate the SpatialExperiment
objects from the raw data files.
These scripts are saved in /inst/scripts/
in the source code of the STexampleData
package. The scripts include references and links to the data files from the original sources for each dataset.
sessionInfo()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.