13308204545 / Chord

remove single cells Doublets by integrating tools!
18 stars 4 forks source link

'doubletCells' is defunct #1

Open shahrozeabbas opened 3 years ago

shahrozeabbas commented 3 years ago

I am running Chord on a single cell data set with the default parameters, but am getting the following error.

Error: 'doubletCells' is defunct.
Use 'scDblFinder::computeDoubletDensity' instead.
See help("Defunct")
In addition: Warning message:
In is.na(seu) : is.na() applied to non-(list or vector) of type 'S4'

I have scDblFinder installed, but the error still persists.

> sessionInfo()
R version 4.1.0 (2021-05-18)
Platform: x86_64-conda-linux-gnu (64-bit)
Running under: CentOS Linux 7 (Core)

Matrix products: default
BLAS/LAPACK: /gpfs/gsfs12/users/xxxxxxx/Apps/conda/envs/chord/lib/libopenblasp-r0.3.15.so

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

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

other attached packages:
 [1] scDblFinder_1.6.0           adabag_4.2                 
 [3] doParallel_1.0.16           iterators_1.0.13           
 [5] foreach_1.5.1               caret_6.0-88               
 [7] lattice_0.20-44             rpart_4.1-15               
 [9] scran_1.20.1                cowplot_1.1.1              
[11] Rtsne_0.15                  rsvd_1.0.5                 
[13] scater_1.20.0               scuttle_1.2.0              
[15] SingleCellExperiment_1.14.1 SummarizedExperiment_1.22.0
[17] Biobase_2.52.0              GenomicRanges_1.44.0       
[19] GenomeInfoDb_1.28.0         IRanges_2.26.0             
[21] S4Vectors_0.30.0            BiocGenerics_0.38.0        
[23] MatrixGenerics_1.4.0        matrixStats_0.59.0         
[25] scds_1.8.0                  DoubletFinder_2.0.3        
[27] wesanderson_0.3.6           reticulate_1.20            
[29] future_1.21.0               ggplot2_3.3.3              
[31] dplyr_1.0.6                 SeuratObject_4.0.1         
[33] Seurat_4.0.2                data.table_1.14.0          
[35] Chord_1.0.0                

loaded via a namespace (and not attached):
  [1] plyr_1.8.6                igraph_1.2.6             
  [3] lazyeval_0.2.2            splines_4.1.0            
  [5] BiocParallel_1.26.0       listenv_0.8.0            
  [7] scattermore_0.7           digest_0.6.27            
  [9] htmltools_0.5.1.1         viridis_0.6.1            
 [11] fansi_0.4.2               magrittr_2.0.1           
 [13] ScaledMatrix_1.0.0        tensor_1.5               
 [15] cluster_2.1.2             ROCR_1.0-11              
 [17] limma_3.48.0              recipes_0.1.16           
 [19] globals_0.14.0            gower_0.2.2              
 [21] spatstat.sparse_2.0-0     colorspace_2.0-1         
 [23] ggrepel_0.9.1             crayon_1.4.1             
 [25] RCurl_1.98-1.3            jsonlite_1.7.2           
 [27] spatstat.data_2.1-0       survival_3.2-11          
 [29] zoo_1.8-9                 glue_1.4.2               
 [31] polyclip_1.10-0           gtable_0.3.0             
 [33] ipred_0.9-11              zlibbioc_1.38.0          
 [35] XVector_0.32.0            leiden_0.3.8             
 [37] DelayedArray_0.18.0       BiocSingular_1.8.0       
 [39] future.apply_1.7.0        abind_1.4-5              
 [41] scales_1.1.1              edgeR_3.34.0             
 [43] DBI_1.1.1                 miniUI_0.1.1.1           
 [45] Rcpp_1.0.6                viridisLite_0.4.0        
 [47] xtable_1.8-4              dqrng_0.3.0              
 [49] spatstat.core_2.1-2       bit_4.0.4                
 [51] lava_1.6.9                prodlim_2019.11.13       
 [53] metapod_1.0.0             htmlwidgets_1.5.3        
 [55] httr_1.4.2                RColorBrewer_1.1-2       
 [57] ellipsis_0.3.2            ica_1.0-2                
 [59] pkgconfig_2.0.3           nnet_7.3-16              
 [61] uwot_0.1.10               deldir_0.2-10            
 [63] locfit_1.5-9.4            utf8_1.2.1               
 [65] tidyselect_1.1.1          rlang_0.4.11             
 [67] reshape2_1.4.4            later_1.2.0              
 [69] munsell_0.5.0             tools_4.1.0              
 [71] xgboost_1.4.0.1           generics_0.1.0           
 [73] ggridges_0.5.3            stringr_1.4.0            
 [75] fastmap_1.1.0             goftest_1.2-2            
 [77] bit64_4.0.5               ModelMetrics_1.2.2.2     
 [79] fitdistrplus_1.1-5        purrr_0.3.4              
 [81] RANN_2.6.1                sparseMatrixStats_1.4.0  
 [83] pbapply_1.4-3             nlme_3.1-152             
 [85] mime_0.10                 hdf5r_1.3.3              
 [87] compiler_4.1.0            beeswarm_0.4.0           
 [89] plotly_4.9.3              png_0.1-7                
 [91] spatstat.utils_2.1-0      statmod_1.4.36           
 [93] tibble_3.1.2              stringi_1.6.2            
 [95] bluster_1.2.1             Matrix_1.3-4             
 [97] vctrs_0.3.8               pillar_1.6.1             
 [99] lifecycle_1.0.0           spatstat.geom_2.1-0      
[101] lmtest_0.9-38             BiocNeighbors_1.10.0     
[103] RcppAnnoy_0.0.18          bitops_1.0-7             
[105] irlba_2.3.3               httpuv_1.6.1             
[107] patchwork_1.1.1           R6_2.5.0                 
[109] promises_1.2.0.1          KernSmooth_2.23-20       
[111] gridExtra_2.3             vipor_0.4.5              
[113] parallelly_1.25.0         codetools_0.2-18         
[115] MASS_7.3-54               assertthat_0.2.1         
[117] withr_2.4.2               sctransform_0.3.2        
[119] GenomeInfoDbData_1.2.6    mgcv_1.8-36              
[121] beachmat_2.8.0            grid_4.1.0               
[123] timeDate_3043.102         tidyr_1.1.3              
[125] class_7.3-19              DelayedMatrixStats_1.14.0
[127] pROC_1.17.0.1             shiny_1.6.0              
[129] lubridate_1.7.10          ggbeeswarm_0.6.0         

Any help is appreciated, thanks.

AlexWeinreb commented 3 years ago

I seem able to circumvent that by editing the file R/3scran.R. I haven't verified the results against test data.

More details: create a local copy of this repository. Then edit the file "R/3scran.R" and change this line:

dbl<-doubletCells(seu@assays$RNA@counts)

into that line (requires scDblFinder to be installed):

dbl <- scDblFinder::computeDoubletDensity(seu@assays$RNA@counts)

Save the modified file, use devtools::install() to install this modified version rather than the official one. In a new R session, run View(Chord:::scranDB) to ensure you're loading the modified version.

13308204545 commented 3 years ago

The reason of the problem is the newest R package "scran" delete the function "DoubletCells". Installing "scran" use BiocManager::install("scran",version="3.11") will solve it. Maybe I should have paid close attention to version management and check github more frequently... Thanks for your issue!