The TENxXeniumData ExperimentHub package provides a collection of Xenium spatial transcriptomics datasets by 10X Genomics. These datasets have been formatted into the Bioconductor classes, the SpatialExperiment or SpatialFeatureExperiment (SFE), to facilitate seamless integration into various applications, including examples, demonstrations, and tutorials. The constructed data objects include gene expression profiles, per-transcript location data, centroid, segmentation boundaries (e.g., cell or nucleus boundaries), and image.
TENxXeniumData 1.4.0
Image-based spatial data, like Xenium, is typically focused on profiling a pre-selected set of genes. Such data can achieve resolution at the level of individual molecules, preserving both single-cell and subcellular details. Additionally, these methods often capture cellular boundaries through segmentations.
The TENxXeniumData package aims to provide a curated collection of Xenium
spatial transcriptomics datasets provided by 10X Genomics. These
datasets are formatted into Bioconductor classes, specifically the
SpatialExperiment or SpatialFeatureExperiment (SFE). Similar to SFEData,
TENxXeniumData is designed as an ExperimentHub package focusing on Spatial
Data, with a specific emphasis on Xenium.
A notable distinction lies in our constructed data object, where our primary focus is on Xenium data. We aim to capture detected molecules/transcripts crucial for gaining insights into subcellular details related to specific markers and the imaging data, in addition to the gene expression profile of each cell, the centroid, and the boundary of each cell. Additionally, we have chosen to employ SpatialExperiment as an alternative scheme for data representation. In this scheme, cellular segmentations are integrated into per-cell metadata of the constructed object,
To install the TENxXeniumData package from GitHub:
if (!require("BiocManager", quietly = TRUE))
  install.packages("BiocManager")
BiocManager::install("TENxXeniumData")The TENxXeniumData package provides an R/Bioconductor resource for
Xenium spatially-resolved data by 10X Genomics.
The package currently includes the following datasets:
spe_mouse_brain (SpatialExperiment Bioconductor class)sfe_mouse_brain (SpatialFeatureExperiment Bioconductor class)spe_human_pancreas (SpatialExperiment Bioconductor class)sfe_human_pancreas (SpatialFeatureExperiment Bioconductor class)A list of currently available datasets can be obtained using the ExperimentHub interface:
library(SpatialExperiment)
library(SpatialFeatureExperiment)
library(TENxXeniumData)
library(BumpyMatrix)
library(SummarizedExperiment)
eh <- ExperimentHub()
(q <- query(eh, "TENxXenium"))## ExperimentHub with 4 records
## # snapshotDate(): 2025-04-11
## # $dataprovider: NA
## # $species: Mus musculus, Homo sapiens
## # $rdataclass: SpatialFeatureExperiment, SpatialExperiment
## # additional mcols(): taxonomyid, genome, description,
## #   coordinate_1_based, maintainer, rdatadateadded, preparerclass, tags,
## #   rdatapath, sourceurl, sourcetype 
## # retrieve records with, e.g., 'object[["EH8547"]]' 
## 
##            title             
##   EH8547 | spe_mouse_brain   
##   EH8548 | sfe_mouse_brain   
##   EH8549 | spe_human_pancreas
##   EH8550 | sfe_human_pancreasThe following examples illustrate the process of loading the provided
datasets into your R session, representing them as objects of
the SpatialExperiment or SpatialFeatureExperiment classes.
Loading SpatialExperiment object:
# load object
spe <- spe_mouse_brain()
# check object
spe## class: SpatialExperiment 
## dim: 541 36554 
## metadata(0):
## assays(2): counts molecules
## rownames(541): 2010300C02Rik Acsbg1 ... Zfp536 Zfpm2
## rowData names(3): means vars cv2
## colnames(36554): 1 2 ... 36601 36602
## colData names(10): transcript_counts control_probe_counts ... nCounts
##   nGenes
## reducedDimNames(0):
## mainExpName: NULL
## altExpNames(0):
## spatialCoords names(2) : x_centroid y_centroid
## imgData names(4): sample_id image_id data scaleFactor# here, cellular segmentations are stored in per-cell metadata 
colData(spe)## DataFrame with 36554 rows and 10 columns
##       transcript_counts control_probe_counts control_codeword_counts cell_area
##               <numeric>            <numeric>               <numeric> <numeric>
## 1                   384                    0                       0   305.211
## 2                   146                    0                       0   176.606
## 3                    81                    0                       0   263.938
## 4                   314                    0                       0   427.810
## 5                   639                    0                       0   424.604
## ...                 ...                  ...                     ...       ...
## 36598               352                    0                       0   466.961
## 36599               412                    1                       0   576.194
## 36600               161                    0                       0   398.323
## 36601               387                    0                       0   510.762
## 36602               449                    0                       0   565.898
##       nucleus_area                cellSeg                 nucSeg   sample_id
##          <numeric>          <sfc_POLYGON>          <sfc_POLYGON> <character>
## 1         70.71469 list(c(1901.875, 190.. list(c(1903.78747558..    sample01
## 2          6.41219 list(c(1895.5, 1890... list(c(1897.625, 189..    sample01
## 3         32.78344 list(c(2362.36254882.. list(c(2361.9375, 23..    sample01
## 4         68.18594 list(c(1902.51245117.. list(c(1903.15002441..    sample01
## 5        102.95625 list(c(1914.19995117.. list(c(1913.13745117..    sample01
## ...            ...                    ...                    ...         ...
## 36598     67.37313 list(c(3336.88745117.. list(c(3337.94995117..    sample01
## 36599      6.86375 list(c(3371.10009765.. list(c(3369.61254882..    sample01
## 36600     13.23078 list(c(3325.41259765.. list(c(3330.9375, 33..    sample01
## 36601     21.31375 list(c(3321.58740234.. list(c(3322.64990234..    sample01
## 36602     43.44031 list(c(3336.88745117.. list(c(3323.07495117..    sample01
##         nCounts    nGenes
##       <numeric> <integer>
## 1           385        97
## 2           146        64
## 3            81        48
## 4           315        95
## 5           640        98
## ...         ...       ...
## 36598       352        91
## 36599       413        85
## 36600       161        57
## 36601       387        95
## 36602       449        93Loading SpatialFeatureExperiment object:
# load object
sfe <- sfe_mouse_brain()
# check object
sfe## class: SpatialFeatureExperiment 
## dim: 541 36554 
## metadata(0):
## assays(2): counts molecules
## rownames(541): 2010300C02Rik Acsbg1 ... Zfp536 Zfpm2
## rowData names(3): means vars cv2
## colnames(36554): 1 2 ... 36601 36602
## colData names(8): transcript_counts control_probe_counts ... nCounts
##   nGenes
## reducedDimNames(0):
## mainExpName: NULL
## altExpNames(0):
## spatialCoords names(2) : x_centroid y_centroid
## imgData names(4): sample_id image_id data scaleFactor
## 
## unit:
## Geometries:
## colGeometries: centroids (POINT) 
## annotGeometries: cellSeg (POINT), nucSeg (POINT) 
## 
## Graphs:
## sample01:sessionInfo()## R version 4.5.0 RC (2025-04-04 r88126)
## Platform: x86_64-pc-linux-gnu
## Running under: Ubuntu 24.04.2 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  LAPACK version 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] BumpyMatrix_1.16.0              TENxXeniumData_1.4.0           
##  [3] ExperimentHub_2.16.0            AnnotationHub_3.16.0           
##  [5] BiocFileCache_2.16.0            dbplyr_2.5.0                   
##  [7] SpatialFeatureExperiment_1.10.0 SpatialExperiment_1.18.0       
##  [9] SingleCellExperiment_1.30.0     SummarizedExperiment_1.38.0    
## [11] Biobase_2.68.0                  GenomicRanges_1.60.0           
## [13] GenomeInfoDb_1.44.0             IRanges_2.42.0                 
## [15] S4Vectors_0.46.0                BiocGenerics_0.54.0            
## [17] generics_0.1.3                  MatrixGenerics_1.20.0          
## [19] matrixStats_1.5.0               BiocStyle_2.36.0               
## 
## loaded via a namespace (and not attached):
##   [1] jsonlite_2.0.0            wk_0.9.4                 
##   [3] magrittr_2.0.3            TH.data_1.1-3            
##   [5] magick_2.8.6              rmarkdown_2.29           
##   [7] vctrs_0.6.5               spdep_1.3-10             
##   [9] memoise_2.0.1             DelayedMatrixStats_1.30.0
##  [11] RCurl_1.98-1.17           terra_1.8-42             
##  [13] htmltools_0.5.8.1         S4Arrays_1.8.0           
##  [15] curl_6.2.2                BiocNeighbors_2.2.0      
##  [17] Rhdf5lib_1.30.0           s2_1.1.7                 
##  [19] SparseArray_1.8.0         rhdf5_2.52.0             
##  [21] LearnBayes_2.15.1         sass_0.4.10              
##  [23] spData_2.3.4              KernSmooth_2.23-26       
##  [25] bslib_0.9.0               htmlwidgets_1.6.4        
##  [27] sandwich_3.1-1            zoo_1.8-14               
##  [29] cachem_1.1.0              mime_0.13                
##  [31] lifecycle_1.0.4           pkgconfig_2.0.3          
##  [33] Matrix_1.7-3              R6_2.6.1                 
##  [35] fastmap_1.2.0             GenomeInfoDbData_1.2.14  
##  [37] digest_0.6.37             AnnotationDbi_1.70.0     
##  [39] dqrng_0.4.1               RSQLite_2.3.9            
##  [41] beachmat_2.24.0           filelock_1.0.3           
##  [43] spatialreg_1.3-6          httr_1.4.7               
##  [45] abind_1.4-8               compiler_4.5.0           
##  [47] proxy_0.4-27              withr_3.0.2              
##  [49] bit64_4.6.0-1             tiff_0.1-12              
##  [51] BiocParallel_1.42.0       DBI_1.2.3                
##  [53] HDF5Array_1.36.0          R.utils_2.13.0           
##  [55] MASS_7.3-65               rappdirs_0.3.3           
##  [57] DelayedArray_0.34.0       rjson_0.2.23             
##  [59] classInt_0.4-11           tools_4.5.0              
##  [61] units_0.8-7               R.oo_1.27.0              
##  [63] glue_1.8.0                h5mread_1.0.0            
##  [65] nlme_3.1-168              EBImage_4.50.0           
##  [67] rhdf5filters_1.20.0       grid_4.5.0               
##  [69] sf_1.0-20                 R.methodsS3_1.8.2        
##  [71] class_7.3-23              data.table_1.17.0        
##  [73] sp_2.2-0                  XVector_0.48.0           
##  [75] BiocVersion_3.21.1        pillar_1.10.2            
##  [77] limma_3.64.0              splines_4.5.0            
##  [79] dplyr_1.1.4               lattice_0.22-7           
##  [81] survival_3.8-3            bit_4.6.0                
##  [83] deldir_2.0-4              tidyselect_1.2.1         
##  [85] locfit_1.5-9.12           Biostrings_2.76.0        
##  [87] scuttle_1.18.0            sfheaders_0.4.4          
##  [89] knitr_1.50                bookdown_0.43            
##  [91] edgeR_4.6.0               xfun_0.52                
##  [93] statmod_1.5.0             DropletUtils_1.28.0      
##  [95] UCSC.utils_1.4.0          fftwtools_0.9-11         
##  [97] yaml_2.3.10               boot_1.3-31              
##  [99] evaluate_1.0.3            codetools_0.2-20         
## [101] tibble_3.2.1              BiocManager_1.30.25      
## [103] cli_3.6.4                 jquerylib_0.1.4          
## [105] Rcpp_1.0.14               zeallot_0.1.0            
## [107] coda_0.19-4.1             png_0.1-8                
## [109] parallel_4.5.0            blob_1.2.4               
## [111] jpeg_0.1-11               sparseMatrixStats_1.20.0 
## [113] bitops_1.0-9              mvtnorm_1.3-3            
## [115] e1071_1.7-16              purrr_1.0.4              
## [117] crayon_1.5.3              rlang_1.1.6              
## [119] KEGGREST_1.48.0           multcomp_1.4-28