CatsCradle Example Data

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()
#> 6.265 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.
sessionInfo()
#> R version 4.4.1 (2024-06-14)
#> Platform: x86_64-pc-linux-gnu
#> Running under: Ubuntu 24.04.1 LTS
#> 
#> Matrix products: default
#> BLAS:   /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3 
#> LAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.26.so;  LAPACK version 3.12.0
#> 
#> locale:
#>  [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C              
#>  [3] LC_TIME=en_US.UTF-8        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: Etc/UTC
#> 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.12    ggplot2_3.5.1      Seurat_5.1.0      
#> [5] SeuratObject_5.0.2 sp_2.1-4           CatsCradle_1.1.0   rmarkdown_2.28    
#> 
#> loaded via a namespace (and not attached):
#>   [1] RcppAnnoy_0.0.22            splines_4.4.1              
#>   [3] later_1.3.2                 bitops_1.0-9               
#>   [5] tibble_3.2.1                polyclip_1.10-7            
#>   [7] fastDummies_1.7.4           lifecycle_1.0.4            
#>   [9] globals_0.16.3              lattice_0.22-6             
#>  [11] MASS_7.3-61                 magrittr_2.0.3             
#>  [13] plotly_4.10.4               sass_0.4.9                 
#>  [15] jquerylib_0.1.4             yaml_2.3.10                
#>  [17] httpuv_1.6.15               sctransform_0.4.1          
#>  [19] spam_2.11-0                 spatstat.sparse_3.1-0      
#>  [21] reticulate_1.39.0           cowplot_1.1.3              
#>  [23] pbapply_1.7-2               buildtools_1.0.0           
#>  [25] RColorBrewer_1.1-3          abind_1.4-8                
#>  [27] zlibbioc_1.51.2             Rtsne_0.17                 
#>  [29] GenomicRanges_1.57.2        purrr_1.0.2                
#>  [31] BiocGenerics_0.51.3         msigdbr_7.5.1              
#>  [33] RCurl_1.98-1.16             pracma_2.4.4               
#>  [35] GenomeInfoDbData_1.2.13     IRanges_2.39.2             
#>  [37] S4Vectors_0.43.2            ggrepel_0.9.6              
#>  [39] irlba_2.3.5.1               listenv_0.9.1              
#>  [41] spatstat.utils_3.1-0        maketools_1.3.1            
#>  [43] BiocStyle_2.33.1            goftest_1.2-3              
#>  [45] RSpectra_0.16-2             spatstat.random_3.3-2      
#>  [47] fitdistrplus_1.2-1          parallelly_1.38.0          
#>  [49] leiden_0.4.3.1              codetools_0.2-20           
#>  [51] DelayedArray_0.31.14        tidyselect_1.2.1           
#>  [53] UCSC.utils_1.1.0            farver_2.1.2               
#>  [55] matrixStats_1.4.1           stats4_4.4.1               
#>  [57] spatstat.explore_3.3-3      jsonlite_1.8.9             
#>  [59] progressr_0.15.0            ggridges_0.5.6             
#>  [61] survival_3.7-0              tools_4.4.1                
#>  [63] ica_1.0-3                   Rcpp_1.0.13                
#>  [65] glue_1.8.0                  gridExtra_2.3              
#>  [67] SparseArray_1.5.45          xfun_0.48                  
#>  [69] MatrixGenerics_1.17.1       GenomeInfoDb_1.41.2        
#>  [71] EBImage_4.47.1              dplyr_1.1.4                
#>  [73] withr_3.0.2                 BiocManager_1.30.25        
#>  [75] fastmap_1.2.0               fansi_1.0.6                
#>  [77] digest_0.6.37               R6_2.5.1                   
#>  [79] mime_0.12                   networkD3_0.4              
#>  [81] colorspace_2.1-1            scattermore_1.2            
#>  [83] tensor_1.5                  jpeg_0.1-10                
#>  [85] spatstat.data_3.1-2         utf8_1.2.4                 
#>  [87] tidyr_1.3.1                 generics_0.1.3             
#>  [89] data.table_1.16.2           httr_1.4.7                 
#>  [91] htmlwidgets_1.6.4           S4Arrays_1.5.11            
#>  [93] uwot_0.2.2                  pkgconfig_2.0.3            
#>  [95] gtable_0.3.6                rdist_0.0.5                
#>  [97] lmtest_0.9-40               SingleCellExperiment_1.27.2
#>  [99] XVector_0.45.0              sys_3.4.3                  
#> [101] htmltools_0.5.8.1           dotCall64_1.2              
#> [103] fftwtools_0.9-11            scales_1.3.0               
#> [105] Biobase_2.65.1              png_0.1-8                  
#> [107] SpatialExperiment_1.15.1    spatstat.univar_3.0-1      
#> [109] geometry_0.5.0              knitr_1.48                 
#> [111] reshape2_1.4.4              rjson_0.2.23               
#> [113] nlme_3.1-166                magic_1.6-1                
#> [115] cachem_1.1.0                zoo_1.8-12                 
#> [117] stringr_1.5.1               KernSmooth_2.23-24         
#> [119] parallel_4.4.1              miniUI_0.1.1.1             
#> [121] RcppZiggurat_0.1.6          pillar_1.9.0               
#> [123] grid_4.4.1                  vctrs_0.6.5                
#> [125] RANN_2.6.2                  promises_1.3.0             
#> [127] xtable_1.8-4                cluster_2.1.6              
#> [129] evaluate_1.0.1              magick_2.8.5               
#> [131] cli_3.6.3                   locfit_1.5-9.10            
#> [133] compiler_4.4.1              rlang_1.1.4                
#> [135] crayon_1.5.3                future.apply_1.11.3        
#> [137] labeling_0.4.3              plyr_1.8.9                 
#> [139] stringi_1.8.4               viridisLite_0.4.2          
#> [141] deldir_2.0-4                babelgene_22.9             
#> [143] munsell_0.5.1               lazyeval_0.2.2             
#> [145] tiff_0.1-12                 spatstat.geom_3.3-3        
#> [147] Matrix_1.7-1                RcppHNSW_0.6.0             
#> [149] patchwork_1.3.0             future_1.34.0              
#> [151] shiny_1.9.1                 highr_0.11                 
#> [153] SummarizedExperiment_1.35.5 ROCR_1.0-11                
#> [155] Rfast_2.1.0                 igraph_2.1.1               
#> [157] RcppParallel_5.1.9          bslib_0.8.0