Contents

1 Introduction

The scDblFinder package gathers various methods for the detection and handling of doublets/multiplets in single-cell sequencing data (i.e. multiple cells captured within the same droplet or reaction volume). This vignette provides a brief overview of the different approaches (which are each covered in their own vignettes) for single-cell RNA sequencing. For doublet detection in genomic data, see the scATACseq vignette. For a more general introduction to the topic of doublets, refer to the OCSA book.

All methods require as an input either a matrix of counts or a SingleCellExperiment containing count data. With the exception of findDoubletClusters, which operates at the level of clusters (and consequently requires clustering information), all methods try to assign each cell a score indicating its likelihood (broadly understood) of being a doublet.

The approaches described here are complementary to doublets identified via cell hashes and SNPs in multiplexed samples: while hashing/genotypes can identify doublets formed by cells of the same type (homotypic doublets) from two samples, which are often nearly undistinguishable from real cells transcriptionally (and hence generally unidentifiable through the present package), it cannot identify doublets made by cells of the same sample, even if they are heterotypic (formed by different cell types). Instead, the methods presented here are primarily geared towards the identification of heterotypic doublets, which for most purposes are also the most critical ones.


1.1 computeDoubletDensity

The computeDoubletDensity method (formerly scran::doubletCells) generates random artificial doublets from the real cells, and tries to identify cells whose neighborhood has a high local density of articial doublets. See computeDoubletDensity for more information.

1.2 recoverDoublets

The recoverDoublets method is meant to be used when some doublets are already known, for instance through genotype-based calls or cell hashing in multiplexed experiments. The function then tries to identify intra-sample doublets that are neighbors to the known inter-sample doublets. See recoverDoublets for more information.

1.3 scDblFinder

The scDblFinder method combines both known doublets (if available) and cluster-based artificial doublets to identify doublets. The approach builds and improves on a variety of earlier efforts, and is at present the most accurate approach included in this package. See scDblFinder for more information.

1.4 directDblClassification

The directDblClassification method identifies doublets by training a classifier directly on gene expression. This follows the same procedure as scDblFinder for doublet generation and iterative training, but skips the k-nearest neighbor step and directly uses the matrix of real cells and artificial doublets. This is computationally more intensive and generally leads to worse predictions than scDblFinder, and it is included chiefly for comparative purposes. See ?directDblClassification for more information.

1.5 findDoubletClusters

The findDoubletClusters method identifies clusters that are likely to be composed of doublets by estimating whether their expression profile lies between two other clusters. See findDoubletClusters for more information.


2 Installation

if (!requireNamespace("BiocManager", quietly = TRUE))
    install.packages("BiocManager")
BiocManager::install("scDblFinder")

# or, to get that latest developments:
BiocManager::install("plger/scDblFinder")

3 Which method to choose?

A benchmark of the main methods available in the package is presented in the scDblFinder paper. While the different methods included here have their values, overall the scDblFinder method had the best performance (also superior to other methods not included in this package), and should be used by default.

Session information

sessionInfo()
## R version 4.3.0 RC (2023-04-13 r84269)
## Platform: x86_64-pc-linux-gnu (64-bit)
## Running under: Ubuntu 22.04.2 LTS
## 
## Matrix products: default
## BLAS:   /home/biocbuild/bbs-3.17-bioc/R/lib/libRblas.so 
## LAPACK: /usr/lib/x86_64-linux-gnu/lapack/liblapack.so.3.10.0
## 
## locale:
##  [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C              
##  [3] LC_TIME=en_GB              LC_COLLATE=C              
##  [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       
## 
## time zone: America/New_York
## tzcode source: system (glibc)
## 
## attached base packages:
## [1] stats4    stats     graphics  grDevices utils     datasets  methods  
## [8] base     
## 
## other attached packages:
##  [1] bluster_1.10.0              scDblFinder_1.14.0         
##  [3] scater_1.28.0               ggplot2_3.4.2              
##  [5] scran_1.28.0                scuttle_1.10.0             
##  [7] ensembldb_2.24.0            AnnotationFilter_1.24.0    
##  [9] GenomicFeatures_1.52.0      AnnotationDbi_1.62.0       
## [11] scRNAseq_2.13.0             SingleCellExperiment_1.22.0
## [13] SummarizedExperiment_1.30.0 Biobase_2.60.0             
## [15] GenomicRanges_1.52.0        GenomeInfoDb_1.36.0        
## [17] IRanges_2.34.0              S4Vectors_0.38.0           
## [19] BiocGenerics_0.46.0         MatrixGenerics_1.12.0      
## [21] matrixStats_0.63.0          BiocStyle_2.28.0           
## 
## loaded via a namespace (and not attached):
##   [1] jsonlite_1.8.4                magrittr_2.0.3               
##   [3] magick_2.7.4                  ggbeeswarm_0.7.1             
##   [5] farver_2.1.1                  rmarkdown_2.21               
##   [7] BiocIO_1.10.0                 zlibbioc_1.46.0              
##   [9] vctrs_0.6.2                   memoise_2.0.1                
##  [11] Rsamtools_2.16.0              DelayedMatrixStats_1.22.0    
##  [13] RCurl_1.98-1.12               htmltools_0.5.5              
##  [15] progress_1.2.2                AnnotationHub_3.8.0          
##  [17] curl_5.0.0                    BiocNeighbors_1.18.0         
##  [19] xgboost_1.7.5.1               sass_0.4.5                   
##  [21] bslib_0.4.2                   cachem_1.0.7                 
##  [23] GenomicAlignments_1.36.0      igraph_1.4.2                 
##  [25] mime_0.12                     lifecycle_1.0.3              
##  [27] pkgconfig_2.0.3               rsvd_1.0.5                   
##  [29] Matrix_1.5-4                  R6_2.5.1                     
##  [31] fastmap_1.1.1                 GenomeInfoDbData_1.2.10      
##  [33] shiny_1.7.4                   digest_0.6.31                
##  [35] colorspace_2.1-0              dqrng_0.3.0                  
##  [37] irlba_2.3.5.1                 ExperimentHub_2.8.0          
##  [39] RSQLite_2.3.1                 beachmat_2.16.0              
##  [41] labeling_0.4.2                filelock_1.0.2               
##  [43] fansi_1.0.4                   httr_1.4.5                   
##  [45] compiler_4.3.0                bit64_4.0.5                  
##  [47] withr_2.5.0                   BiocParallel_1.34.0          
##  [49] viridis_0.6.2                 DBI_1.1.3                    
##  [51] highr_0.10                    biomaRt_2.56.0               
##  [53] MASS_7.3-59                   rappdirs_0.3.3               
##  [55] DelayedArray_0.26.0           rjson_0.2.21                 
##  [57] tools_4.3.0                   vipor_0.4.5                  
##  [59] beeswarm_0.4.0                interactiveDisplayBase_1.38.0
##  [61] httpuv_1.6.9                  glue_1.6.2                   
##  [63] restfulr_0.0.15               promises_1.2.0.1             
##  [65] grid_4.3.0                    Rtsne_0.16                   
##  [67] cluster_2.1.4                 generics_0.1.3               
##  [69] gtable_0.3.3                  data.table_1.14.8            
##  [71] hms_1.1.3                     BiocSingular_1.16.0          
##  [73] ScaledMatrix_1.8.0            metapod_1.8.0                
##  [75] xml2_1.3.3                    utf8_1.2.3                   
##  [77] XVector_0.40.0                ggrepel_0.9.3                
##  [79] BiocVersion_3.17.1            pillar_1.9.0                 
##  [81] stringr_1.5.0                 limma_3.56.0                 
##  [83] later_1.3.0                   dplyr_1.1.2                  
##  [85] BiocFileCache_2.8.0           lattice_0.21-8               
##  [87] rtracklayer_1.60.0            bit_4.0.5                    
##  [89] tidyselect_1.2.0              locfit_1.5-9.7               
##  [91] Biostrings_2.68.0             knitr_1.42                   
##  [93] gridExtra_2.3                 bookdown_0.33                
##  [95] ProtGenerics_1.32.0           edgeR_3.42.0                 
##  [97] xfun_0.39                     statmod_1.5.0                
##  [99] stringi_1.7.12                lazyeval_0.2.2               
## [101] yaml_2.3.7                    evaluate_0.20                
## [103] codetools_0.2-19              tibble_3.2.1                 
## [105] BiocManager_1.30.20           cli_3.6.1                    
## [107] xtable_1.8-4                  munsell_0.5.0                
## [109] jquerylib_0.1.4               Rcpp_1.0.10                  
## [111] dbplyr_2.3.2                  png_0.1-8                    
## [113] XML_3.99-0.14                 parallel_4.3.0               
## [115] ellipsis_0.3.2                blob_1.2.4                   
## [117] prettyunits_1.1.1             sparseMatrixStats_1.12.0     
## [119] bitops_1.0-7                  viridisLite_0.4.1            
## [121] scales_1.2.1                  purrr_1.0.1                  
## [123] crayon_1.5.2                  rlang_1.1.0                  
## [125] cowplot_1.1.1                 KEGGREST_1.40.0