GreenleafLab / ArchR

ArchR : Analysis of Regulatory Chromatin in R (www.ArchRProject.com)
MIT License
387 stars 140 forks source link

Error runing DoubletScores #2229

Closed eblchen closed 19 hours ago

eblchen commented 1 week ago

Error running DoubletScores, have tried various solutions from https://github.com/GreenleafLab/ArchR/issues/218, like running with one thread, which haven't seem to have worked.

> doublet.scores <- addDoubletScores(
+   input = arrow.files,
+   k = 10, ## Refers to how many cells near a "pseudo-doublet" to count.
+   knnMethod = "UMAP", ## Refers to the embedding to use for nearest neighbor search.
+   LSIMethod = 1,
+   threads = 1
+ )
ArchR logging to : ArchRLogs/ArchR-addDoubletScores-63852ec5d85c-Date-2024-11-06_Time-19-49-46.898364.log
If there is an issue, please report to github with logFile!
2024-11-06 19:49:47.786942 : Batch Execution w/ safelapply!, 0 mins elapsed.
2024-11-06 19:49:47.795338 : UT_B (1 of 4) :  Computing Doublet Statistics, 0 mins elapsed.

************************************************************
2024-11-06 19:50:13.637474 : ERROR Found in .computeLSI for  
LogFile = ArchRLogs/ArchR-addDoubletScores-63852ec5d85c-Date-2024-11-06_Time-19-49-46.898364.log

<simpleError in irlba::irlba(mat, nDimensions, nDimensions): function 'as_cholmod_sparse' not provided by package 'Matrix'>

************************************************************

************************************************************
2024-11-06 19:50:13.960573 : ERROR Found in .LSIPartialMatrix for  
LogFile = ArchRLogs/ArchR-addDoubletScores-63852ec5d85c-Date-2024-11-06_Time-19-49-46.898364.log

<simpleError in .logError(e, fn = ".computeLSI", info = "", errorList = errorList,     logFile = logFile): Exiting See Error Above>

************************************************************

************************************************************
2024-11-06 19:50:14.023024 : ERROR Found in addIterativeLSI for UT_B (1 of 4) :  
LogFile = ArchRLogs/ArchR-addDoubletScores-63852ec5d85c-Date-2024-11-06_Time-19-49-46.898364.log

<simpleError in .logError(e, fn = ".LSIPartialMatrix", info = "", errorList = errorList,     logFile = logFile): Exiting See Error Above>

************************************************************

Error in .logError(e, fn = "addIterativeLSI", info = prefix, errorList = list(ArrowFile = ArrowFile),  : 
  Exiting See Error Above

Log file: ArchR-addDoubletScores-63852ec5d85c-Date-2024-11-06_Time-19-49-46.898364.log

> sessionInfo()
R version 4.3.3 (2024-02-29)
Platform: aarch64-apple-darwin20 (64-bit)
Running under: macOS Sonoma 14.7.1

Matrix products: default
BLAS:   /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib 
LAPACK: /Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/lib/libRlapack.dylib;  LAPACK version 3.11.0

Random number generation:
 RNG:     L'Ecuyer-CMRG 
 Normal:  Inversion 
 Sample:  Rejection 

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

time zone: Europe/London
tzcode source: internal

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

other attached packages:
 [1] Rsamtools_2.18.0                  BSgenome.Hsapiens.UCSC.hg38_1.4.5 BSgenome_1.70.2                  
 [4] rtracklayer_1.62.0                BiocIO_1.12.0                     Biostrings_2.70.3                
 [7] XVector_0.42.0                    SeuratObject_4.1.4                Seurat_4.3.0                     
[10] rhdf5_2.46.1                      SummarizedExperiment_1.32.0       Biobase_2.62.0                   
[13] MatrixGenerics_1.14.0             Rcpp_1.0.13-1                     Matrix_1.6-4                     
[16] GenomicRanges_1.54.1              GenomeInfoDb_1.38.8               IRanges_2.36.0                   
[19] S4Vectors_0.40.2                  BiocGenerics_0.48.1               matrixStats_1.4.1                
[22] data.table_1.16.2                 stringr_1.5.1                     plyr_1.8.9                       
[25] magrittr_2.0.3                    ggplot2_3.4.2                     gtable_0.3.6                     
[28] gtools_3.9.5                      gridExtra_2.3                     ArchR_1.0.2                      

loaded via a namespace (and not attached):
  [1] RColorBrewer_1.1-3       rstudioapi_0.17.1        jsonlite_1.8.9           spatstat.utils_3.1-1    
  [5] farver_2.1.2             zlibbioc_1.48.2          vctrs_0.6.5              ROCR_1.0-11             
  [9] Cairo_1.6-2              spatstat.explore_3.3-3   RCurl_1.98-1.16          RcppRoll_0.3.1          
 [13] htmltools_0.5.8.1        S4Arrays_1.2.1           Rhdf5lib_1.24.2          SparseArray_1.2.4       
 [17] sctransform_0.4.1        parallelly_1.38.0        KernSmooth_2.23-22       htmlwidgets_1.6.4       
 [21] ica_1.0-3                plotly_4.10.4            zoo_1.8-12               GenomicAlignments_1.38.2
 [25] igraph_2.1.1             mime_0.12                lifecycle_1.0.4          pkgconfig_2.0.3         
 [29] R6_2.5.1                 fastmap_1.2.0            GenomeInfoDbData_1.2.11  fitdistrplus_1.2-1      
 [33] future_1.34.0            shiny_1.9.1              digest_0.6.37            colorspace_2.1-1        
 [37] patchwork_1.3.0          tensor_1.5               irlba_2.3.5.1            labeling_0.4.3          
 [41] progressr_0.15.0         fansi_1.0.6              spatstat.sparse_3.1-0    httr_1.4.7              
 [45] polyclip_1.10-7          abind_1.4-8              compiler_4.3.3           withr_3.0.2             
 [49] BiocParallel_1.36.0      MASS_7.3-60.0.1          DelayedArray_0.28.0      rjson_0.2.23            
 [53] tools_4.3.3              lmtest_0.9-40            httpuv_1.6.15            future.apply_1.11.3     
 [57] goftest_1.2-3            glue_1.8.0               restfulr_0.0.15          nlme_3.1-164            
 [61] rhdf5filters_1.14.1      promises_1.3.0           Rtsne_0.17               cluster_2.1.6           
 [65] reshape2_1.4.4           generics_0.1.3           spatstat.data_3.1-2      tidyr_1.3.1             
 [69] sp_2.1-4                 utf8_1.2.4               spatstat.geom_3.3-3      RcppAnnoy_0.0.22        
 [73] ggrepel_0.9.6            RANN_2.6.2               pillar_1.9.0             spam_2.11-0             
 [77] later_1.3.2              splines_4.3.3            dplyr_1.1.4              lattice_0.22-5          
 [81] survival_3.5-8           deldir_2.0-4             tidyselect_1.2.1         miniUI_0.1.1.1          
 [85] pbapply_1.7-2            scattermore_1.2          stringi_1.8.4            yaml_2.3.10             
 [89] lazyeval_0.2.2           codetools_0.2-19         tibble_3.2.1             cli_3.6.3               
 [93] uwot_0.1.16              xtable_1.8-4             reticulate_1.39.0        munsell_0.5.1           
 [97] spatstat.random_3.3-2    globals_0.16.3           png_0.1-8                XML_3.99-0.17           
[101] spatstat.univar_3.1-1    dotCall64_1.2            bitops_1.0-9             listenv_0.9.1           
[105] viridisLite_0.4.2        scales_1.3.0             ggridges_0.5.6           leiden_0.4.3.1          
[109] purrr_1.0.2              crayon_1.5.3             rlang_1.1.4              cowplot_1.1.3      
rcorces commented 1 week ago

Hi @eblchen! Thanks for using ArchR! Lately, it has been very challenging for me to keep up with maintenance of this package and all of my other responsibilities as a PI. I have not been responding to issue posts and I have not been pushing updates to the software. We are actively searching to hire a computational biologist to continue to develop and maintain ArchR and related tools. If you know someone who might be a good fit, please let us know! In the meantime, your issue will likely go without a reply. Most issues with ArchR right not relate to compatibility. Try reverting to R 4.1 and Bioconductor 3.15. Newer versions of Seurat and Matrix also are causing issues. Sorry for not being able to provide active support for this package at this time.

immanuelazn commented 5 days ago

Hi Emilia, I think this is an issue specific to latent semantic indexing, rather than doublet score computation. Can you confirm that you are having this issue with ArchR 1.0.3? This version has a bunch of bug fixes, and I recall some changes specific to LSI. We are looking to get this merged to main momentarily, after a few more checks.

You can do so by doing: devtools::install_github("GreenleafLab/ArchR", ref= "dev", repos = BiocManager::repositories())

If that doesn't work, I saw a lot of people having similar issues with stale Matrix / downstream packages.

You could try doing: install.packages("Matrix", type = "source") install.packages("irlba", type = "source")

eblchen commented 1 day ago

Hi, Thanks for the help! That seems to have done the trick - updating ArchR alone didn't work but then reinstalling Matrix and irlba after seemed to sort it. Thank you!

immanuelazn commented 19 hours ago

My pleasure!