plger / scDblFinder

Methods for detecting doublets in single-cell sequencing data
https://plger.github.io/scDblFinder/
GNU General Public License v3.0
163 stars 17 forks source link

BiocParallel error - could not find symbol 'useNames' in environment of the generic function #50

Closed dpcook closed 3 years ago

dpcook commented 3 years ago

Hi there,

I realize this may be an issue external to scDblFinder, but I figured I would post it in case you had an insight. Feel free to close if you're not sure.

When running scDblFinder with multiple samples, I'm getting a BiocParallel error that I can't seem to figure out. Any help is appreciated!

sce <- scDblFinder(sce, samples="orig.ident", BPPARAM=MulticoreParam(2))
Error: BiocParallel errors
  element index: 1, 2, 3, 4
  first error: An error occured while processing sample 'Control':
Error in rowVars(DelayedArray(x)): could not find symbol "useNames" in environment of the generic function
> sessionInfo()
R version 4.1.1 (2021-08-10)
Platform: x86_64-apple-darwin17.0 (64-bit)
Running under: macOS Big Sur 11.1

Matrix products: default
LAPACK: /Library/Frameworks/R.framework/Versions/4.1/Resources/lib/libRlapack.dylib

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

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

other attached packages:
 [1] scran_1.20.1                scuttle_1.2.1               BiocParallel_1.26.2        
 [4] forcats_0.5.1               stringr_1.4.0               dplyr_1.0.7                
 [7] purrr_0.3.4                 readr_2.0.2                 tidyr_1.1.4                
[10] tibble_3.1.5                ggplot2_3.3.5               tidyverse_1.3.1            
[13] SingleCellExperiment_1.14.1 SummarizedExperiment_1.22.0 Biobase_2.52.0             
[16] GenomicRanges_1.44.0        GenomeInfoDb_1.28.4         IRanges_2.26.0             
[19] S4Vectors_0.30.2            BiocGenerics_0.38.0         MatrixGenerics_1.5.1       
[22] matrixStats_0.61.0          scDblFinder_1.6.0           SeuratObject_4.0.2         
[25] Seurat_4.0.5               

loaded via a namespace (and not attached):
  [1] utf8_1.2.2                reticulate_1.22           tidyselect_1.1.1         
  [4] htmlwidgets_1.5.4         grid_4.1.1                Rtsne_0.15               
  [7] munsell_0.5.0             ScaledMatrix_1.0.0        codetools_0.2-18         
 [10] ica_1.0-2                 statmod_1.4.36            xgboost_1.4.1.1          
 [13] future_1.22.1             miniUI_0.1.1.1            withr_2.4.2              
 [16] colorspace_2.0-2          knitr_1.36                rstudioapi_0.13          
 [19] ROCR_1.0-11               tensor_1.5                listenv_0.8.0            
 [22] GenomeInfoDbData_1.2.6    polyclip_1.10-0           parallelly_1.28.1        
 [25] vctrs_0.3.8               generics_0.1.0            xfun_0.27                
 [28] R6_2.5.1                  ggbeeswarm_0.6.0          rsvd_1.0.5               
 [31] locfit_1.5-9.4            bitops_1.0-7              spatstat.utils_2.2-0     
 [34] DelayedArray_0.18.0       assertthat_0.2.1          promises_1.2.0.1         
 [37] scales_1.1.1              beeswarm_0.4.0            gtable_0.3.0             
 [40] beachmat_2.8.1            globals_0.14.0            goftest_1.2-3            
 [43] rlang_0.4.12              splines_4.1.1             lazyeval_0.2.2           
 [46] spatstat.geom_2.3-0       broom_0.7.9               yaml_2.2.1               
 [49] reshape2_1.4.4            abind_1.4-5               modelr_0.1.8             
 [52] backports_1.2.1           httpuv_1.6.3              tools_4.1.1              
 [55] ellipsis_0.3.2            spatstat.core_2.3-0       RColorBrewer_1.1-2       
 [58] ggridges_0.5.3            Rcpp_1.0.7                plyr_1.8.6               
 [61] sparseMatrixStats_1.4.2   zlibbioc_1.38.0           RCurl_1.98-1.5           
 [64] rpart_4.1-15              deldir_1.0-5              pbapply_1.5-0            
 [67] viridis_0.6.2             cowplot_1.1.1             zoo_1.8-9                
 [70] haven_2.4.3               ggrepel_0.9.1             cluster_2.1.2            
 [73] fs_1.5.0                  magrittr_2.0.1            data.table_1.14.2        
 [76] scattermore_0.7           lmtest_0.9-38             reprex_2.0.1             
 [79] RANN_2.6.1                fitdistrplus_1.1-6        hms_1.1.1                
 [82] patchwork_1.1.1           mime_0.12                 evaluate_0.14            
 [85] xtable_1.8-4              readxl_1.3.1              gridExtra_2.3            
 [88] compiler_4.1.1            scater_1.20.1             KernSmooth_2.23-20       
 [91] crayon_1.4.1              htmltools_0.5.2           mgcv_1.8-36              
 [94] later_1.3.0               tzdb_0.1.2                lubridate_1.8.0          
 [97] DBI_1.1.1                 dbplyr_2.1.1              MASS_7.3-54              
[100] Matrix_1.3-4              cli_3.0.1                 metapod_1.0.0            
[103] igraph_1.2.7              pkgconfig_2.0.3           plotly_4.10.0            
[106] spatstat.sparse_2.0-0     xml2_1.3.2                vipor_0.4.5              
[109] dqrng_0.3.0               XVector_0.32.0            rvest_1.0.2              
[112] digest_0.6.28             sctransform_0.3.2         RcppAnnoy_0.0.19         
[115] spatstat.data_2.1-0       rmarkdown_2.11            cellranger_1.1.0         
[118] leiden_0.3.9              uwot_0.1.10               edgeR_3.34.1             
[121] DelayedMatrixStats_1.14.3 shiny_1.7.1               lifecycle_1.0.1          
[124] nlme_3.1-152              jsonlite_1.7.2            BiocNeighbors_1.10.0     
[127] viridisLite_0.4.0         limma_3.48.3              fansi_0.5.0              
[130] pillar_1.6.4              lattice_0.20-44           fastmap_1.1.0            
[133] httr_1.4.2                survival_3.2-11           glue_1.4.2               
[136] png_0.1-7                 bluster_1.2.1             stringi_1.7.5            
[139] BiocSingular_1.8.1        irlba_2.3.3               future.apply_1.8.1   
LTLA commented 3 years ago

I notice that your MatrixGenerics installation is from the devel branch (odd middle number) while all other BioC packages are release branch (even middle number). This may or may not be the cause, but it doesn't help matters.

I vaguely recall that there was some recent-ish work in matrixStats and MatrixGenerics with respect to consistently adding names to the output. The thing with updates to S4 definitions is that they need to be applied at install time, so perhaps try forcibly re-installing MatrixGenerics, sparseMatrixStats and then DelayedMatrixStats.

dpcook commented 3 years ago

Thanks, Aaron--I appreciate it.

Forcibly reinstalled those and it resolved the error. All works well now. Thanks again!