This function downloads from ExperimentHub Visium, Visium Spatial
Proteogenomics (Visium-SPG), or single nucleus RNA-seq (snRNA-seq) data
and results analyzed by LIBD from multiple projects.
If ExperimentHub is not available, this function will
download the files from Dropbox using BiocFileCache::bfcrpath() unless the
files are present already at destdir. Note that ExperimentHub and
BiocFileCache will cache the data and automatically detect if you have
previously downloaded it, thus making it the preferred way to interact with
the data.
fetch_data(
type = c("sce", "sce_layer", "modeling_results", "sce_example", "spe",
"spatialDLPFC_Visium", "spatialDLPFC_Visium_example_subset",
"spatialDLPFC_Visium_pseudobulk", "spatialDLPFC_Visium_modeling_results",
"spatialDLPFC_Visium_SPG", "spatialDLPFC_snRNAseq",
"Visium_SPG_AD_Visium_wholegenome_spe", "Visium_SPG_AD_Visium_targeted_spe",
"Visium_SPG_AD_Visium_wholegenome_pseudobulk_spe",
"Visium_SPG_AD_Visium_wholegenome_modeling_results", "visiumStitched_brain_spe",
"visiumStitched_brain_spaceranger", "visiumStitched_brain_Fiji_out",
"LFF_spatial_ERC_SRT", "LFF_spatial_ERC_SRT_pseudobulk",
"LFF_spatial_ERC_SRT_modeling_results", "LFF_spatial_ERC_snRNAseq",
"LFF_spatial_ERC_snRNAseq_pseudobulk_broad",
"LFF_spatial_ERC_snRNAseq_pseudobulk_subcluster",
"LFF_spatial_ERC_snRNAseq_modeling_results_broad",
"LFF_spatial_ERC_snRNAseq_modeling_results_subcluster"),
destdir = tempdir(),
eh = ExperimentHub::ExperimentHub(),
bfc = BiocFileCache::BiocFileCache()
)A character(1) specifying which file you want to download. It
can either be: sce for the
SingleCellExperiment
object containing the spot-level data that includes the information for
visualizing the clusters/genes on top of the Visium histology, sce_layer
for the
SingleCellExperiment
object containing the layer-level data (pseudo-bulked from the spot-level),
or modeling_results for the list of tables with the enrichment,
pairwise, and anova model results from the layer-level data. It can also
be sce_example which is a reduced version of sce just for example
purposes. The initial version of spatialLIBD downloaded data only from
https://github.com/LieberInstitute/HumanPilot. As of BioC version 3.13
spe downloads a
SpatialExperiment-class object.
As of version 1.11.6, this function also allows downloading data from the
http://research.libd.org/spatialDLPFC/ and
https://github.com/LieberInstitute/Human_DLPFC_Deconvolution projects. As
of version 1.11.12,
data from https://github.com/LieberInstitute/Visium_SPG_AD can be
downloaded. As of version 1.17.3, data from
https://research.libd.org/visiumStitched_brain/ can be downloaded. As of
version 1.23.1, data from https://research.libd.org/LFF_spatial_ERC/ can be
downloaded.
The destination directory to where files will be downloaded
to in case the ExperimentHub resource is not available. If you already
downloaded the files, you can set this to the current path where the files
were previously downloaded to avoid re-downloading them.
An ExperimentHub object
ExperimentHub-class.
A BiocFileCache object
BiocFileCache-class. Used when
eh is not available.
The requested object: sce, sce_layer, ve or modeling_results that
you have to assign to an object. If you didn't you can still avoid
re-loading the object by using .Last.value.
The data was initially prepared by scripts at https://github.com/LieberInstitute/HumanPilot and further refined by https://github.com/LieberInstitute/spatialLIBD/blob/master/inst/scripts/make-data_spatialLIBD.R.
Please always cite the spatialLIBD publication whenever you use
fetch_data() to download data.
Pardo B, Spangler A, Weber LM, Page SC, Hicks SC, Jaffe AE, Martinowich K, Maynard KR, Collado-Torres L. spatialLIBD: an R/Bioconductor package to visualize spatially-resolved transcriptomics data. BMC Genomics. 2022 Jun 10;23(1):434. doi: 10.1186/s12864-022-08601-w. PubMed PMID: 35689177; PubMed Central PMCID: PMC9188087.
Additionally, please cite the relevant publication describing the data generation and initial data analysis for the dataset you are using.
For "sce", "sce_layer", "modeling_results", "sce_example", and "spe" which
are files from the HumanPilot study
https://github.com/LieberInstitute/HumanPilot please cite:
Maynard KR, Collado-Torres L, Weber LM, Uytingco C, Barry BK, Williams SR, Catallini JL 2nd, Tran MN, Besich Z, Tippani M, Chew J, Yin Y, Kleinman JE, Hyde TM, Rao N, Hicks SC, Martinowich K, Jaffe AE. Transcriptome-scale spatial gene expression in the human dorsolateral prefrontal cortex. Nat Neurosci. 2021 Mar;24(3):425-436. doi: 10.1038/s41593-020-00787-0. Epub 2021 Feb 8. PubMed PMID: 33558695; PubMed Central PMCID: PMC8095368.
For spatialDLPFC files http://research.libd.org/spatialDLPFC/ please
cite:
Huuki-Myers LA, Spangler A, Eagles NJ, Montgomery KD, Kwon SH, Guo B, Grant-Peters M, Divecha HR, Tippani M, Sriworarat C, Nguyen AB, Ravichandran P, Tran MN, Seyedian A, Hyde TM, Kleinman JE, Battle A, Page SC, Ryten M, Hicks SC, Martinowich K, Collado-Torres L, Maynard KR. A data-driven single-cell and spatial transcriptomic map of the human prefrontal cortex. Science. 2024 May 24;384(6698):eadh1938. doi: 10.1126/science.adh1938. Epub 2024 May 24. PubMed PMID: 38781370; PubMed Central PMCID: PMC11398705.
Note that spatialDLPFC_snRNAseq from
https://github.com/LieberInstitute/Human_DLPFC_Deconvolution was also
described in the following publication:
Huuki-Myers LA, Montgomery KD, Kwon SH, Cinquemani S, Eagles NJ, Gonzalez-Padilla D, Maden SK, Kleinman JE, Hyde TM, Hicks SC, Maynard KR, Collado-Torres L. Benchmark of cellular deconvolution methods using a multi-assay dataset from postmortem human prefrontal cortex. Genome Biol. 2025 Apr 7;26(1):88. doi: 10.1186/s13059-025-03552-3. PubMed PMID: 40197307; PubMed Central PMCID: PMC11978107.
For Visium_SPG_AD files https://research.libd.org/Visium_SPG_AD please
cite:
Kwon SH, Parthiban S, Tippani M, Divecha HR, Eagles NJ, Lobana JS, Williams SR, Mak M, Bharadwaj RA, Kleinman JE, Hyde TM, Page SC, Hicks SC, Martinowich K, Maynard KR, Collado-Torres L. Influence of Alzheimer's disease related neuropathology on local microenvironment gene expression in the human inferior temporal cortex. GEN Biotechnol. 2023 Oct;2(5):399-417. doi: 10.1089/genbio.2023.0019. Epub 2023 Oct 16. PubMed PMID: 39329069; PubMed Central PMCID: PMC11426291.
For visiumStitched_brain files
https://research.libd.org/visiumStitched_brain/ please cite:
Eagles NJ, Bach SV, Tippani M, Ravichandran P, Du Y, Miller RA, Hyde TM, Page SC, Martinowich K, Collado-Torres L. Integrating gene expression and imaging data across Visium capture areas with visiumStitched. BMC Genomics. 2024 Nov 13;25(1):1077. doi: 10.1186/s12864-024-10991-y. PubMed PMID: 39533203; PubMed Central PMCID: PMC11559125.
For LFF_spatial_ERC files https://research.libd.org/LFF_spatial_ERC/
please cite:
Huuki-Myers LA, Divecha HR, Bach SV, Valentine MR, Eagles NJ, Mulvey B, Bharadwaj RA, Zhang R, Evans JR, Grant-Peters M, Miller RA, Kleinman JE, Han S, Hyde TM, Page SC, Weinberger DR, Martinowich K, Ryten M, Maynard KR, Collado-Torres L. APOE E4 Alzheimer's Risk Converges on an Oligodendrocyte Subtype in the Human Entorhinal Cortex. bioRxiv. 2025 Nov 20;. doi: 10.1101/2025.11.20.689483. PubMed PMID: 41332786; PubMed Central PMCID: PMC12667772.
## Download the SingleCellExperiment object
## at the layer-level
if (!exists("sce_layer")) sce_layer <- fetch_data("sce_layer")
#> 2026-01-09 17:21:58.465732 loading file /github/home/.cache/R/BiocFileCache/101f6597747f_Human_DLPFC_Visium_processedData_sce_scran_sce_layer_spatialLIBD.Rdata%3Fdl%3D1
## Explore the data
sce_layer
#> class: SingleCellExperiment
#> dim: 22331 76
#> metadata(0):
#> assays(2): counts logcounts
#> rownames(22331): ENSG00000243485 ENSG00000238009 ... ENSG00000278384
#> ENSG00000271254
#> rowData names(10): source type ... is_top_hvg is_top_hvg_sce_layer
#> colnames(76): 151507_Layer1 151507_Layer2 ... 151676_Layer6 151676_WM
#> colData names(13): sample_name layer_guess ...
#> layer_guess_reordered_short spatialLIBD
#> reducedDimNames(6): PCA TSNE_perplexity5 ... UMAP_neighbors15 PCAsub
#> mainExpName: NULL
#> altExpNames(0):
## How to download and load "spatialDLPFC_snRNAseq"
## A similar process is needed for downloading and loading other
## HDF5SummarizedExperiment files:
## * "LFF_spatial_ERC_SRT"
## * LFF_spatial_ERC_snRNAseq"
if (FALSE) { # \dontrun{
sce_path_zip <- fetch_data("spatialDLPFC_snRNAseq")
sce_path <- unzip(sce_path_zip, exdir = tempdir())
sce <- HDF5Array::loadHDF5SummarizedExperiment(
file.path(tempdir(), "sce_DLPFC_annotated")
)
sce
#> class: SingleCellExperiment
#> dim: 36601 77604
#> metadata(3): Samples cell_type_colors cell_type_colors_broad
#> assays(2): counts logcounts
#> rownames(36601): MIR1302-2HG FAM138A ... AC007325.4 AC007325.2
#> rowData names(7): source type ... gene_type binomial_deviance
#> colnames(77604): 1_AAACCCAAGTTCTCTT-1 1_AAACCCACAAGGTCTT-1 ... 19_TTTGTTGTCTCATTGT-1 19_TTTGTTGTCTTAAGGC-1
#> colData names(32): Sample Barcode ... cellType_layer layer_annotation
#> reducedDimNames(4): GLMPCA_approx TSNE UMAP HARMONY
#> mainExpName: NULL
#> altExpNames(0):
lobstr::obj_size(sce)
#> 172.28 MB
} # }