SpatialDatasets 1.5.0
The SpatialData
package contains a collection of spatially-resolved omics datasets, which have been formatted into the SpatialExperiment, MoleculeExperiment or CytoImageList Bioconductor classes, for use in examples, demonstrations, and tutorials. The datasets are from several different platforms including IMC, MIBI-TOF, Xenium, CosMx and MERFISH. They have been sourced from various publicly available sources.
To install the SpatialDatasets
package from GitHub:
if (!require("BiocManager", quietly = TRUE))
install.packages("BiocManager")
BiocManager::install("SpatialDatasets")
The package contains the following datasets:
spe_Keren_2018
: A study on triple negative breast cancer containing 40 samples measured using MIBI-TOF published by Keren et al. (2018).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(SpatialDatasets)
A study on triple negative breast cancer containing 40 samples measured using MIBI-TOF published by Keren et al. (2018).
# load object
spe <- spe_Keren_2018()
# check object
spe
## class: SpatialExperiment
## dim: 48 197678
## metadata(0):
## assays(1): intensities
## rownames(48): Na Si ... Ta Au
## rowData names(0):
## colnames(197678): 1 2 ... 197677 197678
## colData names(40): CellID imageID ... Censored sample_id
## reducedDimNames(0):
## mainExpName: NULL
## altExpNames(0):
## spatialCoords names(2) : x y
## imgData names(0):
For reference, we include code scripts to generate the SpatialExperiment
, MoleculeExperiment
or CytoImageList
objects from the raw data files.
These scripts are saved in /inst/scripts/
in the source code of the SpatialData
package. The scripts include references and links to the data files from the original sources for each dataset.
sessionInfo()
## R Under development (unstable) (2024-10-21 r87258)
## Platform: x86_64-pc-linux-gnu
## Running under: Ubuntu 24.04.1 LTS
##
## Matrix products: default
## BLAS: /home/biocbuild/bbs-3.21-bioc/R/lib/libRblas.so
## LAPACK: /usr/lib/x86_64-linux-gnu/lapack/liblapack.so.3.12.0
##
## locale:
## [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C
## [3] LC_TIME=en_GB LC_COLLATE=C
## [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8
## [7] LC_PAPER=en_US.UTF-8 LC_NAME=C
## [9] LC_ADDRESS=C LC_TELEPHONE=C
## [11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
##
## time zone: America/New_York
## tzcode source: system (glibc)
##
## attached base packages:
## [1] stats4 stats graphics grDevices utils datasets methods
## [8] base
##
## other attached packages:
## [1] SpatialDatasets_1.5.0 ExperimentHub_2.15.0
## [3] AnnotationHub_3.15.0 BiocFileCache_2.15.0
## [5] dbplyr_2.5.0 SpatialExperiment_1.17.0
## [7] SingleCellExperiment_1.29.0 SummarizedExperiment_1.37.0
## [9] Biobase_2.67.0 GenomicRanges_1.59.0
## [11] GenomeInfoDb_1.43.0 IRanges_2.41.0
## [13] S4Vectors_0.45.0 BiocGenerics_0.53.1
## [15] generics_0.1.3 MatrixGenerics_1.19.0
## [17] matrixStats_1.4.1 BiocStyle_2.35.0
##
## loaded via a namespace (and not attached):
## [1] KEGGREST_1.47.0 rjson_0.2.23 xfun_0.49
## [4] bslib_0.8.0 lattice_0.22-6 vctrs_0.6.5
## [7] tools_4.5.0 curl_5.2.3 AnnotationDbi_1.69.0
## [10] tibble_3.2.1 fansi_1.0.6 RSQLite_2.3.7
## [13] blob_1.2.4 pkgconfig_2.0.3 Matrix_1.7-1
## [16] lifecycle_1.0.4 GenomeInfoDbData_1.2.13 compiler_4.5.0
## [19] Biostrings_2.75.0 htmltools_0.5.8.1 sass_0.4.9
## [22] yaml_2.3.10 pillar_1.9.0 crayon_1.5.3
## [25] jquerylib_0.1.4 DelayedArray_0.33.1 cachem_1.1.0
## [28] magick_2.8.5 abind_1.4-8 mime_0.12
## [31] tidyselect_1.2.1 digest_0.6.37 purrr_1.0.2
## [34] BiocVersion_3.21.1 dplyr_1.1.4 bookdown_0.41
## [37] fastmap_1.2.0 grid_4.5.0 cli_3.6.3
## [40] SparseArray_1.7.0 magrittr_2.0.3 S4Arrays_1.7.1
## [43] utf8_1.2.4 withr_3.0.2 rappdirs_0.3.3
## [46] filelock_1.0.3 UCSC.utils_1.3.0 bit64_4.5.2
## [49] rmarkdown_2.29 XVector_0.47.0 httr_1.4.7
## [52] bit_4.5.0 png_0.1-8 memoise_2.0.1
## [55] evaluate_1.0.1 knitr_1.48 rlang_1.1.4
## [58] Rcpp_1.0.13-1 glue_1.8.0 DBI_1.2.3
## [61] BiocManager_1.30.25 jsonlite_1.8.9 R6_2.5.1
## [64] zlibbioc_1.53.0