GreenleafLab / ArchR

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

Easy bug fix for addClusters to support Leiden igraph implementation #2155

Open AmosFong1 opened 7 months ago

AmosFong1 commented 7 months ago

Describe the bug Currently, the addClusters parameter 'method' which can be specified as Seurat or Scran, is the same parameter name as FindClusters parameter method, which is used to specify whether the matrix or igraph method should be used for running leiden (defaults to matrix which is fast for small datasets). It is recommended to set method = 'igraph' to avoid casting large data to a dense matrix, as R does not support long vectors. If you simply renamed the parameter 'method', you could avoid this parameter conflict, allowing us to use the Leiden algorithm, which has been widely adopted in single-cell analysis.

Session Info

R version 4.3.2 (2023-10-31)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 22.04.4 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.20.so;  LAPACK version 3.10.0

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

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C               LC_TIME=en_US.UTF-8       
 [4] LC_COLLATE=en_US.UTF-8     LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8   
 [7] LC_PAPER=en_US.UTF-8       LC_NAME=C                  LC_ADDRESS=C              
[10] LC_TELEPHONE=C             LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       

time zone: Etc/UTC
tzcode source: system (glibc)

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

other attached packages:
 [1] uwot_0.1.16                       nabor_0.5.0                       viridis_0.6.5                    
 [4] viridisLite_0.4.2                 UpSetR_1.4.0                      TFBSTools_1.40.0                 
 [7] SoupX_1.6.2                       SLOcatoR_0.0.0.9000               SingleR_2.4.1                    
[10] Signac_1.13.0                     SeuratWrappers_0.3.5              SeuratDisk_0.0.0.9021            
[13] SeuratData_0.2.2.9001             Seurat_5.0.1                      SeuratObject_5.0.1               
[16] sp_2.1-3                          sceasy_0.0.7                      scDblFinder_1.16.0               
[19] SingleCellExperiment_1.24.0       scales_1.3.0                      rstatix_0.7.2                    
[22] RSQLite_2.3.5                     RColorBrewer_1.1-3                patchwork_1.2.0                  
[25] JASPAR2024_0.99.6                 BiocFileCache_2.10.2              dbplyr_2.4.0                     
[28] infercnv_1.18.1                   HCATonsilData_1.0.0               harmony_1.2.0                    
[31] ggrepel_0.9.5                     ggpubr_0.6.0                      ggbeeswarm_0.7.2                 
[34] ggalluvial_0.12.5                 GAMBLR.data_1.1.1                 EnsDb.Hsapiens.v86_2.99.0        
[37] ensembldb_2.26.0                  AnnotationFilter_1.26.0           GenomicFeatures_1.54.4           
[40] AnnotationDbi_1.64.1              edgeR_4.0.16                      limma_3.58.1                     
[43] ComplexHeatmap_2.18.0             circlize_0.4.16                   chromVAR_1.24.0                  
[46] BiocParallel_1.36.0               Azimuth_0.5.0                     shinyBS_0.61.1                   
[49] BSgenome.Hsapiens.UCSC.hg38_1.4.5 BSgenome_1.70.2                   rtracklayer_1.62.0               
[52] BiocIO_1.12.0                     Biostrings_2.70.3                 XVector_0.42.0                   
[55] lubridate_1.9.3                   forcats_1.0.0                     dplyr_1.1.4                      
[58] purrr_1.0.2                       readr_2.1.5                       tidyr_1.3.1                      
[61] tibble_3.2.1                      tidyverse_2.0.0                   reticulate_1.35.0                
[64] rhdf5_2.46.1                      SummarizedExperiment_1.32.0       Biobase_2.62.0                   
[67] MatrixGenerics_1.14.0             Rcpp_1.0.12                       Matrix_1.6-5                     
[70] GenomicRanges_1.54.1              GenomeInfoDb_1.38.8               IRanges_2.36.0                   
[73] S4Vectors_0.40.2                  BiocGenerics_0.48.1               matrixStats_1.2.0                
[76] data.table_1.15.0                 stringr_1.5.1                     plyr_1.8.9                       
[79] magrittr_2.0.3                    ggplot2_3.5.0                     gtable_0.3.4                     
[82] gtools_3.9.5                      gridExtra_2.3                     ArchR_1.0.2                      

loaded via a namespace (and not attached):
  [1] igraph_2.0.2                  ica_1.0-3                     plotly_4.10.4                
  [4] scater_1.30.1                 zlibbioc_1.48.2               tidyselect_1.2.0             
  [7] bit_4.0.5                     doParallel_1.0.17             clue_0.3-65                  
 [10] lattice_0.21-9                rjson_0.2.21                  blob_1.2.4                   
 [13] S4Arrays_1.2.1                caret_6.0-94                  seqLogo_1.68.0               
 [16] png_0.1-8                     cli_3.6.2                     ProtGenerics_1.34.0          
 [19] goftest_1.2-3                 gargle_1.5.2                  bluster_1.12.0               
 [22] BiocNeighbors_1.20.2          curl_5.2.0                    mime_0.12                    
 [25] evaluate_0.23                 leiden_0.4.3.1                coin_1.4-3                   
 [28] stringi_1.8.3                 pROC_1.18.5                   backports_1.4.1              
 [31] rjags_4-15                    parallelDist_0.2.6            XML_3.99-0.16.1              
 [34] httpuv_1.6.14                 rappdirs_0.3.3                splines_4.3.2                
 [37] RcppRoll_0.3.0                prodlim_2023.08.28            DT_0.32                      
 [40] sctransform_0.4.1             DBI_1.2.2                     HDF5Array_1.30.1             
 [43] withr_3.0.0                   class_7.3-22                  xgboost_1.7.7.1              
 [46] lmtest_0.9-40                 formatR_1.14                  BiocManager_1.30.22          
 [49] htmlwidgets_1.6.4             fs_1.6.3                      biomaRt_2.58.2               
 [52] labeling_0.4.3                SparseArray_1.2.4             cellranger_1.1.0             
 [55] annotate_1.80.0               zoo_1.8-12                    JASPAR2020_0.99.10           
 [58] knitr_1.45                    TFMPvalue_0.0.9               timechange_0.3.0             
 [61] foreach_1.5.2                 fansi_1.0.6                   caTools_1.18.2               
 [64] timeDate_4032.109             R.oo_1.26.0                   poweRlaw_0.80.0              
 [67] RSpectra_0.16-1               irlba_2.3.5.1                 fastDummies_1.7.3            
 [70] ellipsis_0.3.2                lazyeval_0.2.2                yaml_2.3.8                   
 [73] phyclust_0.1-34               survival_3.5-7                SpatialExperiment_1.12.0     
 [76] scattermore_1.2               BiocVersion_3.18.1            crayon_1.5.2                 
 [79] RcppAnnoy_0.0.22              progressr_0.14.0              later_1.3.2                  
 [82] ggridges_0.5.6                codetools_0.2-19              base64enc_0.1-3              
 [85] GlobalOptions_0.1.2           KEGGREST_1.42.0               Rtsne_0.17                   
 [88] shape_1.4.6.1                 Rsamtools_2.18.0              filelock_1.0.3               
 [91] pkgconfig_2.0.3               xml2_1.3.6                    GenomicAlignments_1.38.2     
 [94] spatstat.sparse_3.0-3         ape_5.7-1                     xtable_1.8-4                 
 [97] car_3.1-2                     fastcluster_1.2.6             httr_1.4.7                   
[100] tools_4.3.2                   globals_0.16.2                hardhat_1.3.1                
[103] beeswarm_0.4.0                broom_1.0.5                   nlme_3.1-163                 
[106] futile.logger_1.4.3           lambda.r_1.2.4                hdf5r_1.3.9                  
[109] ExperimentHub_2.10.0          shinyjs_2.1.0                 digest_0.6.34                
[112] farver_2.1.1                  tzdb_0.4.0                    reshape2_1.4.4               
[115] ModelMetrics_1.2.2.2          rpart_4.1.21                  DirichletMultinomial_1.44.0  
[118] glue_1.7.0                    cachem_1.0.8                  polyclip_1.10-6              
[121] generics_0.1.3                mvtnorm_1.2-4                 googledrive_2.1.1            
[124] presto_1.0.0                  parallelly_1.37.0             pkgload_1.3.4                
[127] statmod_1.5.0                 RcppHNSW_0.6.0                ScaledMatrix_1.10.0          
[130] carData_3.0-5                 pbapply_1.7-2                 spam_2.10-0                  
[133] dqrng_0.3.2                   utf8_1.2.4                    gower_1.0.1                  
[136] ggsignif_0.6.4                lava_1.7.3                    shiny_1.8.0                  
[139] GenomeInfoDbData_1.2.11       R.utils_2.12.3                rhdf5filters_1.14.1          
[142] RCurl_1.98-1.14               memoise_2.0.1                 rmarkdown_2.25               
[145] R.methodsS3_1.8.2             googlesheets4_1.1.1           future_1.33.1                
[148] RANN_2.6.1                    Cairo_1.6-2                   spatstat.data_3.0-4          
[151] rstudioapi_0.15.0             cluster_2.1.4                 spatstat.utils_3.0-4         
[154] hms_1.1.3                     fitdistrplus_1.1-11           munsell_0.5.0                
[157] cowplot_1.1.3                 colorspace_2.1-0              rlang_1.1.3                  
[160] DelayedMatrixStats_1.24.0     sparseMatrixStats_1.14.0      ipred_0.9-14                 
[163] dotCall64_1.1-1               shinydashboard_0.7.2          scuttle_1.12.0               
[166] xfun_0.42                     coda_0.19-4.1                 TH.data_1.1-2                
[169] CNEr_1.38.0                   recipes_1.0.10                remotes_2.4.2.1              
[172] iterators_1.0.14              modeltools_0.2-23             abind_1.4-5                  
[175] interactiveDisplayBase_1.40.0 libcoin_1.0-10                Rhdf5lib_1.24.2              
[178] futile.options_1.0.1          bitops_1.0-7                  promises_1.2.1               
[181] sandwich_3.1-0                DelayedArray_0.28.0           GO.db_3.18.0                 
[184] compiler_4.3.2                prettyunits_1.2.0             beachmat_2.18.1              
[187] listenv_0.9.1                 AnnotationHub_3.10.1          BiocSingular_1.18.0          
[190] tensor_1.5                    MASS_7.3-60                   progress_1.2.3               
[193] spatstat.random_3.2-2         R6_2.5.1                      fastmap_1.1.1                
[196] multcomp_1.4-25               fastmatch_1.1-4               vipor_0.4.7                  
[199] ROCR_1.0-11                   nnet_7.3-19                   rsvd_1.0.5                   
[202] KernSmooth_2.23-22            miniUI_0.1.1.1                deldir_2.0-2                 
[205] htmltools_0.5.7               RcppParallel_5.1.7            bit64_4.0.5                  
[208] spatstat.explore_3.2-6        lifecycle_1.0.4               restfulr_0.0.15              
[211] vctrs_0.6.5                   spatstat.geom_3.2-8           scran_1.30.2                 
[214] future.apply_1.11.1           pracma_2.4.4                  pillar_1.9.0                 
[217] gplots_3.1.3.1                magick_2.8.3                  metapod_1.10.1               
[220] locfit_1.5-9.8                jsonlite_1.8.8                argparse_2.2.2               
[223] GetoptLong_1.0.5  
rcorces commented 7 months ago

Hi @AmosFong1! 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.