CatsCradle Example Data

Anna Laddach and Michael Shapiro

2024-10-21

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.601 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.

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:   /media/volume/teran2_disk/biocbuild/bbs-3.20-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] 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_0.99.16
#> 
#> 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] rmarkdown_2.28              jquerylib_0.1.4            
#>  [17] yaml_2.3.10                 httpuv_1.6.15              
#>  [19] sctransform_0.4.1           spam_2.11-0                
#>  [21] spatstat.sparse_3.1-0       reticulate_1.39.0          
#>  [23] cowplot_1.1.3               pbapply_1.7-2              
#>  [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        BiocStyle_2.33.1           
#>  [43] goftest_1.2-3               RSpectra_0.16-2            
#>  [45] spatstat.random_3.3-2       fitdistrplus_1.2-1         
#>  [47] parallelly_1.38.0           leiden_0.4.3.1             
#>  [49] codetools_0.2-20            DelayedArray_0.31.14       
#>  [51] tidyselect_1.2.1            UCSC.utils_1.1.0           
#>  [53] farver_2.1.2                matrixStats_1.4.1          
#>  [55] stats4_4.4.1                spatstat.explore_3.3-2     
#>  [57] jsonlite_1.8.9              progressr_0.14.0           
#>  [59] ggridges_0.5.6              survival_3.7-0             
#>  [61] tools_4.4.1                 ica_1.0-3                  
#>  [63] Rcpp_1.0.13                 glue_1.8.0                 
#>  [65] gridExtra_2.3               SparseArray_1.5.45         
#>  [67] xfun_0.48                   MatrixGenerics_1.17.0      
#>  [69] GenomeInfoDb_1.41.2         EBImage_4.47.1             
#>  [71] dplyr_1.1.4                 withr_3.0.1                
#>  [73] BiocManager_1.30.25         fastmap_1.2.0              
#>  [75] fansi_1.0.6                 digest_0.6.37              
#>  [77] R6_2.5.1                    mime_0.12                  
#>  [79] colorspace_2.1-1            networkD3_0.4              
#>  [81] scattermore_1.2             tensor_1.5                 
#>  [83] jpeg_0.1-10                 spatstat.data_3.1-2        
#>  [85] utf8_1.2.4                  tidyr_1.3.1                
#>  [87] generics_0.1.3              data.table_1.16.2          
#>  [89] httr_1.4.7                  htmlwidgets_1.6.4          
#>  [91] S4Arrays_1.5.11             uwot_0.2.2                 
#>  [93] pkgconfig_2.0.3             gtable_0.3.5               
#>  [95] rdist_0.0.5                 lmtest_0.9-40              
#>  [97] SingleCellExperiment_1.27.2 XVector_0.45.0             
#>  [99] htmltools_0.5.8.1           dotCall64_1.2              
#> [101] fftwtools_0.9-11            scales_1.3.0               
#> [103] Biobase_2.65.1              png_0.1-8                  
#> [105] SpatialExperiment_1.15.1    spatstat.univar_3.0-1      
#> [107] geometry_0.5.0              knitr_1.48                 
#> [109] reshape2_1.4.4              rjson_0.2.23               
#> [111] nlme_3.1-166                magic_1.6-1                
#> [113] cachem_1.1.0                zoo_1.8-12                 
#> [115] stringr_1.5.1               KernSmooth_2.23-24         
#> [117] parallel_4.4.1              miniUI_0.1.1.1             
#> [119] RcppZiggurat_0.1.6          pillar_1.9.0               
#> [121] grid_4.4.1                  vctrs_0.6.5                
#> [123] RANN_2.6.2                  promises_1.3.0             
#> [125] xtable_1.8-4                cluster_2.1.6              
#> [127] evaluate_1.0.1              magick_2.8.5               
#> [129] cli_3.6.3                   locfit_1.5-9.10            
#> [131] compiler_4.4.1              rlang_1.1.4                
#> [133] crayon_1.5.3                future.apply_1.11.2        
#> [135] labeling_0.4.3              plyr_1.8.9                 
#> [137] stringi_1.8.4               viridisLite_0.4.2          
#> [139] deldir_2.0-4                babelgene_22.9             
#> [141] munsell_0.5.1               lazyeval_0.2.2             
#> [143] tiff_0.1-12                 spatstat.geom_3.3-3        
#> [145] Matrix_1.7-1                RcppHNSW_0.6.0             
#> [147] patchwork_1.3.0             future_1.34.0              
#> [149] shiny_1.9.1                 highr_0.11                 
#> [151] SummarizedExperiment_1.35.4 ROCR_1.0-11                
#> [153] Rfast_2.1.0                 igraph_2.1.1               
#> [155] RcppParallel_5.1.9          bslib_0.8.0