Skip to content

BUG: Error in LeverageScore(): ! too slow -- only after upgrading to Seurat 5.3.0 #9857

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
lhoranportelance opened this issue Apr 28, 2025 · 5 comments
Labels
bug Something isn't working

Comments

@lhoranportelance
Copy link

Issue Description

Running SketchData on my data no longer works after upgrading from Seurat 5.2.1 to 5.3.0. The same code (see below) ran fine on 5.2.1 but is now producing an error on 5.3.0.

Reproducing Code Example

seurat[["RNA"]] <- split(seurat[["RNA"]], f = seurat$dataset_region)
seurat <- NormalizeData(seurat)
seurat <- FindVariableFeatures(seurat)
seurat_sketched <- SketchData(object = seurat, ncells = 10000, method = "LeverageScore", sketched.assay = "sketch")

Error Message

Error in `LeverageScore()`:
! too slow

Additional Comments

No response

Session Info

R version 4.4.3 (2025-02-28)
Platform: x86_64-pc-linux-gnu
Running under: Rocky Linux 8.7 (Green Obsidian)

Matrix products: default
BLAS/LAPACK: /usr/local/intel/2022.1.2.146/mkl/2022.0.2/lib/intel64/libmkl_rt.so.2;  LAPACK version 3.9.0

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C               LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8     LC_MONETARY=en_US.UTF-8   
 [6] LC_MESSAGES=en_US.UTF-8    LC_PAPER=en_US.UTF-8       LC_NAME=C                  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] harmony_1.2.3      Rcpp_1.0.14        lubridate_1.9.4    forcats_1.0.0      stringr_1.5.1      dplyr_1.1.4        purrr_1.0.4       
 [8] readr_2.1.5        tidyr_1.3.1        tibble_3.2.1       ggplot2_3.5.1      tidyverse_2.0.0    scCustomize_3.0.1  Seurat_5.3.0      
[15] SeuratObject_5.1.0 sp_2.2-0          

loaded via a namespace (and not attached):
  [1] RColorBrewer_1.1-3     rstudioapi_0.17.1      jsonlite_2.0.0         shape_1.4.6.1          magrittr_2.0.3         spatstat.utils_3.1-3  
  [7] ggbeeswarm_0.7.2       farver_2.1.2           GlobalOptions_0.1.2    vctrs_0.6.5            ROCR_1.0-11            spatstat.explore_3.4-2
 [13] paletteer_1.6.0        janitor_2.2.1          htmltools_0.5.8.1      sctransform_0.4.1      parallelly_1.43.0      KernSmooth_2.23-26    
 [19] htmlwidgets_1.6.4      ica_1.0-3              plyr_1.8.9             plotly_4.10.4          zoo_1.8-13             igraph_2.1.4          
 [25] mime_0.13              lifecycle_1.0.4        pkgconfig_2.0.3        Matrix_1.7-2           R6_2.6.1               fastmap_1.2.0         
 [31] fitdistrplus_1.2-2     future_1.34.0          shiny_1.10.0           snakecase_0.11.1       digest_0.6.37          colorspace_2.1-1      
 [37] rematch2_2.1.2         patchwork_1.3.0        tensor_1.5             RSpectra_0.16-2        irlba_2.3.5.1          progressr_0.15.1      
 [43] spatstat.sparse_3.1-0  timechange_0.3.0       httr_1.4.7             polyclip_1.10-7        abind_1.4-8            compiler_4.4.3        
 [49] withr_3.0.2            fastDummies_1.7.5      MASS_7.3-65            tools_4.4.3            vipor_0.4.7            lmtest_0.9-40         
 [55] beeswarm_0.4.0         httpuv_1.6.15          future.apply_1.11.3    goftest_1.2-3          glue_1.8.0             nlme_3.1-167          
 [61] promises_1.3.2         grid_4.4.3             Rtsne_0.17             cluster_2.1.8          reshape2_1.4.4         generics_0.1.3        
 [67] gtable_0.3.6           spatstat.data_3.1-6    tzdb_0.5.0             hms_1.1.3              data.table_1.17.0      spatstat.geom_3.3-6   
 [73] RcppAnnoy_0.0.22       ggrepel_0.9.6          RANN_2.6.2             pillar_1.10.1          spam_2.11-1            RcppHNSW_0.6.0        
 [79] ggprism_1.0.5          later_1.4.1            circlize_0.4.16        splines_4.4.3          lattice_0.22-6         survival_3.8-3        
 [85] deldir_2.0-4           tidyselect_1.2.1       miniUI_0.1.1.1         pbapply_1.7-2          gridExtra_2.3          scattermore_1.2       
 [91] matrixStats_1.5.0      stringi_1.8.4          lazyeval_0.2.2         codetools_0.2-20       cli_3.6.4              uwot_0.2.3            
 [97] xtable_1.8-4           reticulate_1.40.0      munsell_0.5.1          globals_0.16.3         spatstat.random_3.3-3  png_0.1-8             
[103] ggrastr_1.0.2          spatstat.univar_3.1-1  parallel_4.4.3         dotCall64_1.2          listenv_0.9.1          viridisLite_0.4.2     
[109] scales_1.3.0           ggridges_0.5.6         crayon_1.5.3           rlang_1.1.4            cowplot_1.1.3
@lhoranportelance lhoranportelance added the bug Something isn't working label Apr 28, 2025
@lima1
Copy link

lima1 commented Apr 28, 2025

#7171

@lhoranportelance
Copy link
Author

#7171

Already looked at this when troubleshooting. I just downgraded from 5.3.0 back to 5.2.1 and the exact same code seen above works. It is a version issue.

@lima1
Copy link

lima1 commented Apr 28, 2025

Try adding features = VariableFeatures(object) to SketchData() as a workaround. Looks like a bug.

@lhoranportelance
Copy link
Author

Try adding features = VariableFeatures(object) to SketchData() as a workaround. Looks like a bug.

Tried this too -- doesn't work on 5.3.0

@lima1
Copy link

lima1 commented Apr 28, 2025

FWIW, I encountered this bug after upgrading to 5.3.0 and explicitely specifying the features solved it for me, but I'm gonna shut up now since I'm not involved with Seurat.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants