Author: Anna Laddach and Michael Shapiro
Date: 2026-04-28

# CatsCradle Example Data

#### Anna Laddach and Michael Shapiro

#### 2026-04-28

BiocStyle

## CatsCradle Example Data

CatsCradle has a slightly unusual way of delivering example data. In order to save space we have tried to minimise the number and size of the .rda data. We have limited these to objects which are necessary to compute other objects (e.g., certain Seurat objects), objects which are necessary to the functioning of the package (e.g., human and mouse ligand receptor networks), and objects which take a long time to compute (e.g., ligandReceptorResults). These package variables are documented in the usual way and are loaded when invoked with data(variable name).

Other variables are computed from these as needed. The function which computes these additional objects also stores them internally for quick retrieval when they are subsequently requested. The retrieval function must be created before it can be used. It only needs to be created once in each session.

On the first invocation this computes STranspose:

    library(CatsCradle,quietly=TRUE)
    library(tictoc)
    getExample = make.getExample()
    tic()
    STranspose = getExample('STranspose')
    toc()
    #> 8.826 sec elapsed

On subsequent invocations it retrieves it:

    tic()
    STranspose = getExample('STranspose')
    toc()
    #> 0.001 sec elapsed

getExample() also retrieves package variables.

    smallXenium = getExample('smallXenium')

getExample() also supports the option toy, which is FALSE by default. Setting toy=TRUE will result in the initial Seurat objects being subset to smaller copies of themselves and all further computations being performed using these smaller objects. This is done to speed up the running of the code examples.

    exSeuratObj = getExample('exSeuratObj')
    toySeurat = getExample('exSeuratObj',toy=TRUE)
    dim(exSeuratObj)
    #> [1] 2000  540
    dim(toySeurat)
    #> [1] 100 270
    toyXenium = getExample('smallXenium',toy=TRUE)
    #> Warning: Not validating Centroids objects
    #> Not validating Centroids objects
    #> Warning: Not validating FOV objects
    #> Not validating FOV objects
    #> Not validating FOV objects
    #> Warning: Not validating Seurat objects
    dim(smallXenium)
    #> [1]  248 4261
    dim(toyXenium)
    #> [1]  248 1001

A complete list of the example objects available via the function exampleObjects(). Here we document some of the more prominent of these.

- exSeuratObj - A Seurat object of cells. It includes a UMAP of the cells and annotated clustering into cell types. This is a package variable.
- STranpose - A Seurat object of genes. This is created from S by transposeObject().
- S_sce - S as a SingleCellExperiment
- STranspose_sce - STranspose as a SingleCellExperiment
- NN - A nearest neighbours graph from STranspose. This is a data frame with columns nodeA, nodeB, and weight, where nodeA and nodeB are genes.
- smallXenium - A spatial Seurat object subset from the Xenium object used in https://satijalab.org/seurat/articles/seurat5_spatial_vignette_2. This is a package variable.
- clusters - Annotated cell type clustering for the cells of smallXenium.
- centroids - The centroids of the cells of smallXenium
- delaunayNeighbours - A data frame giving neighbour-neighbour relations for the cells of smallXenium as estimated by Delaunay triangulation with columns nodeA and nodeB.
- extendedNeighours - A data frame giving extended neighbour-neighbour relations for the cells of smallXenium. Here cells are “neighbours” if they are within four edges of each other in the Delaunay triangulation.
- euclideanNeighbours - Neighbour-neighbour relations between the cells of smallXenium based on the Euclidean distance of their centroids.
- NBHDByCTMatrix - For each neighbourhood, we count the number of cells it contains of each cell type. Neighbourhoods “express” cell types.
- NBHDByCTSeurat - A Seurat object whose underlying counts are NBHDByCTMatrix.
- cellTypesPerCellTypeMatrix - A matrix which reports on the Delaunay neighbourhoods. For each cell type, it examines the neighbourhoods around cells of that type and reports their average composition as to the cell types they contain.
- cellTypesPerCellTypePValues This gives the statistical significance for the enrichment of cell types in the neighbourhoods of each cell type, computed using randomiseBy = ‘cells’.

    sessionInfo()
    #> R version 4.6.0 RC (2026-04-17 r89917)
    #> Platform: x86_64-pc-linux-gnu
    #> Running under: Ubuntu 24.04.4 LTS
    #>
    #> Matrix products: default
    #> BLAS:   /home/biocbuild/bbs-3.24-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] stats     graphics  grDevices utils     datasets  methods   base
    #>
    #> other attached packages:
    #> [1] tictoc_1.2.1       pheatmap_1.0.13    ggplot2_4.0.3      Seurat_5.5.0
    #> [5] SeuratObject_5.4.0 sp_2.2-1           future_1.70.0      CatsCradle_1.7.0
    #>
    #> loaded via a namespace (and not attached):
    #>   [1] RcppAnnoy_0.0.23            splines_4.6.0
    #>   [3] later_1.4.8                 bitops_1.0-9
    #>   [5] tibble_3.3.1                polyclip_1.10-7
    #>   [7] fastDummies_1.7.6           lifecycle_1.0.5
    #>   [9] globals_0.19.1              lattice_0.22-9
    #>  [11] MASS_7.3-65                 magrittr_2.0.5
    #>  [13] plotly_4.12.0               sass_0.4.10
    #>  [15] rmarkdown_2.31              jquerylib_0.1.4
    #>  [17] yaml_2.3.12                 httpuv_1.6.17
    #>  [19] otel_0.2.0                  sctransform_0.4.3
    #>  [21] spam_2.11-3                 spatstat.sparse_3.1-0
    #>  [23] reticulate_1.46.0           cowplot_1.2.0
    #>  [25] pbapply_1.7-4               RColorBrewer_1.1-3
    #>  [27] abind_1.4-8                 Rtsne_0.17
    #>  [29] GenomicRanges_1.65.0        purrr_1.2.2
    #>  [31] BiocGenerics_0.59.0         msigdbr_26.1.0
    #>  [33] RCurl_1.98-1.18             pracma_2.4.6
    #>  [35] IRanges_2.47.0              S4Vectors_0.51.0
    #>  [37] data.tree_1.2.0             ggrepel_0.9.8
    #>  [39] irlba_2.3.7                 listenv_0.10.1
    #>  [41] spatstat.utils_3.2-2        BiocStyle_2.41.0
    #>  [43] goftest_1.2-3               RSpectra_0.16-2
    #>  [45] spatstat.random_3.4-5       fitdistrplus_1.2-6
    #>  [47] parallelly_1.47.0           codetools_0.2-20
    #>  [49] DelayedArray_0.39.0         tidyselect_1.2.1
    #>  [51] farver_2.1.2                matrixStats_1.5.0
    #>  [53] stats4_4.6.0                spatstat.explore_3.8-0
    #>  [55] Seqinfo_1.3.0               jsonlite_2.0.0
    #>  [57] progressr_0.19.0            ggridges_0.5.7
    #>  [59] survival_3.8-6              tools_4.6.0
    #>  [61] ica_1.0-3                   Rcpp_1.1.1-1.1
    #>  [63] glue_1.8.1                  gridExtra_2.3
    #>  [65] SparseArray_1.13.0          xfun_0.57
    #>  [67] MatrixGenerics_1.25.0       EBImage_4.55.0
    #>  [69] dplyr_1.2.1                 withr_3.0.2
    #>  [71] BiocManager_1.30.27         fastmap_1.2.0
    #>  [73] digest_0.6.39               R6_2.6.1
    #>  [75] mime_0.13                   networkD3_0.4.1
    #>  [77] scattermore_1.2             tensor_1.5.1
    #>  [79] jpeg_0.1-11                 dichromat_2.0-0.1
    #>  [81] spatstat.data_3.1-9         tidyr_1.3.2
    #>  [83] generics_0.1.4              data.table_1.18.2.1
    #>  [85] httr_1.4.8                  htmlwidgets_1.6.4
    #>  [87] S4Arrays_1.13.0             uwot_0.2.4
    #>  [89] pkgconfig_2.0.3             gtable_0.3.6
    #>  [91] rdist_0.0.5                 lmtest_0.9-40
    #>  [93] S7_0.2.2                    SingleCellExperiment_1.35.0
    #>  [95] XVector_0.53.0              htmltools_0.5.9
    #>  [97] dotCall64_1.2               fftwtools_0.9-11
    #>  [99] zigg_0.0.2                  scales_1.4.0
    #> [101] Biobase_2.73.0              png_0.1-9
    #> [103] SpatialExperiment_1.23.0    spatstat.univar_3.1-7
    #> [105] geometry_0.5.2              knitr_1.51
    #> [107] reshape2_1.4.5              rjson_0.2.23
    #> [109] nlme_3.1-169                magic_1.6-1
    #> [111] curl_7.1.0                  cachem_1.1.0
    #> [113] zoo_1.8-15                  stringr_1.6.0
    #> [115] KernSmooth_2.23-26          parallel_4.6.0
    #> [117] miniUI_0.1.2                pillar_1.11.1
    #> [119] grid_4.6.0                  vctrs_0.7.3
    #> [121] RANN_2.6.2                  promises_1.5.0
    #> [123] xtable_1.8-8                cluster_2.1.8.2
    #> [125] evaluate_1.0.5              magick_2.9.1
    #> [127] cli_3.6.6                   locfit_1.5-9.12
    #> [129] compiler_4.6.0              rlang_1.2.0
    #> [131] future.apply_1.20.2         labeling_0.4.3
    #> [133] plyr_1.8.9                  stringi_1.8.7
    #> [135] viridisLite_0.4.3           deldir_2.0-4
    #> [137] assertthat_0.2.1            babelgene_22.9
    #> [139] lazyeval_0.2.3              tiff_0.1-12
    #> [141] spatstat.geom_3.7-3         Matrix_1.7-5
    #> [143] RcppHNSW_0.6.0              patchwork_1.3.2
    #> [145] shiny_1.13.0                SummarizedExperiment_1.43.0
    #> [147] ROCR_1.0-12                 Rfast_2.1.5.2
    #> [149] igraph_2.3.0                RcppParallel_5.1.11-2
    #> [151] bslib_0.10.0