drieslab / Giotto

Spatial omics analysis toolbox
https://drieslab.github.io/Giotto_website/
Other
240 stars 94 forks source link

binSpect function error on large datasets #956

Open rocketeer1998 opened 1 month ago

rocketeer1998 commented 1 month ago

Hi @gcyuan @bernard2012 @wwang-chcn @RubD @pacificma , thanks for your contribution to Giotto and Binspect! I used Binspect-rank to analyze the spatially variable genes in my spatial data (~40000 cells and 15 genes). But it threw me an error when I ran binSpect function,

Error in .calc_spatial_enrichment_dt(bin_matrix = bin_matrix, spatial_network = spatial_network,  : 
  With group size = 2 you have a single gene in a group. Manually pick another group size

Do you know why? Do you make any improvements on large datasets that have > 10000 cells and > 10000 genes? Below is my session info.

> sessionInfo()
R version 4.3.0 (2023-04-21 ucrt)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 18363)

Matrix products: default

locale:
[1] LC_COLLATE=Chinese (Simplified)_China.utf8  LC_CTYPE=Chinese (Simplified)_China.utf8   
[3] LC_MONETARY=Chinese (Simplified)_China.utf8 LC_NUMERIC=C                               
[5] LC_TIME=Chinese (Simplified)_China.utf8    

time zone: Asia/Shanghai
tzcode source: internal

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] Matrix_1.6-5      anndata_0.7.5.6   Giotto_4.0.5      GiottoClass_0.2.3 pheatmap_1.0.12  
[6] tidyr_1.3.1       ggplot2_3.5.0     dplyr_1.1.4      

loaded via a namespace (and not attached):
 [1] SummarizedExperiment_1.32.0 gtable_0.3.4                rjson_0.2.21               
 [4] Biobase_2.62.0              lattice_0.22-6              vctrs_0.6.5                
 [7] tools_4.3.0                 bitops_1.0-7                generics_0.1.3             
[10] stats4_4.3.0                parallel_4.3.0              tibble_3.2.1               
[13] fansi_1.0.6                 colorRamp2_0.1.0            pkgconfig_2.0.3            
[16] data.table_1.15.4           checkmate_2.3.1             RColorBrewer_1.1-3         
[19] S4Vectors_0.40.2            assertthat_0.2.1            lifecycle_1.0.4            
[22] GenomeInfoDbData_1.2.11     compiler_4.3.0              GiottoUtils_0.1.6          
[25] munsell_0.5.1               terra_1.7-71                codetools_0.2-20           
[28] GenomeInfoDb_1.38.8         RCurl_1.98-1.14             pillar_1.9.0               
[31] crayon_1.5.2                SingleCellExperiment_1.24.0 DelayedArray_0.28.0        
[34] dbscan_1.1-12               magick_2.8.3                abind_1.4-5                
[37] gtools_3.9.5                tidyselect_1.2.1            purrr_1.0.2                
[40] grid_4.3.0                  colorspace_2.1-0            cli_3.6.2                  
[43] SparseArray_1.2.4           magrittr_2.0.3              S4Arrays_1.2.1             
[46] utf8_1.2.4                  withr_3.0.0                 rappdirs_0.3.3             
[49] scales_1.3.0                backports_1.4.1             XVector_0.42.0             
[52] matrixStats_1.2.0           igraph_2.0.3                reticulate_1.35.0          
[55] png_0.1-8                   GiottoVisuals_0.1.6         SpatialExperiment_1.12.0   
[58] GenomicRanges_1.54.1        IRanges_2.36.0              rlang_1.1.3                
[61] Rcpp_1.0.12                 glue_1.7.0                  BiocGenerics_0.48.1        
[64] jsonlite_1.8.8              rstudioapi_0.16.0           R6_2.5.1                   
[67] MatrixGenerics_1.14.0       zlibbioc_1.48.2