Skip to contents

Doublet calling

Usage

RunDoubletCalling(
  object,
  assay = "RNA",
  db_rate = ncol(object)/1000 * 0.01,
  db_method = "scDblFinder",
  data_type = NULL,
  verbose = TRUE,
  srt = NULL,
  ...
)

Arguments

object

A Seurat object.

assay

Assay used for doublet calling.

db_rate

Expected doublet rate.

db_method

"scDblFinder", "Scrublet", "DoubletDetection", "scds_cxds", "scds_bcds", or "scds_hybrid".

data_type

Optional CheckDataType result, used internally to avoid rescanning the count matrix.

verbose

Whether to print messages.

srt

Deprecated alias for object; supply exactly one of the two. It will be removed in scop 1.0.0.

...

Arguments passed to other functions.

Value

A Seurat object with doublet class and score columns in meta.data.

Examples

data(pancreas_sub)
pancreas_sub <- RunStandardWorkflow(pancreas_sub)
#> ℹ [2026-11-12 05:33:37] Start standard processing workflow...
#> ℹ [2026-11-12 05:33:37] Checking a list of <Seurat>...
#> ! [2026-11-12 05:33:37] Data 1/1 of the `srt_list` is "unknown"
#> ℹ [2026-11-12 05:33:37] Perform `NormalizeData()` with `normalization.method = 'LogNormalize'` on 1/1 of `srt_list`...
#> ℹ [2026-11-12 05:33:37] Perform `FindVariableFeatures()` on 1/1 of `srt_list`...
#> ℹ [2026-11-12 05:33:37] Use the separate HVF from `srt_list`
#> ℹ [2026-11-12 05:33:37] Number of available HVF: 2000
#> ℹ [2026-11-12 05:33:37] Finished check
#> ℹ [2026-11-12 05:33:37] Perform `ScaleData()`
#> ℹ [2026-11-12 05:33:37] Perform pca linear dimension reduction
#> ℹ [2026-11-12 05:33:38] Use stored estimated dimensions 1:23 for Standardpca
#> ℹ [2026-11-12 05:33:38] Perform `Seurat::FindClusters()` with `cluster_algorithm = 'louvain'` and `cluster_resolution = 0.6`
#> ℹ [2026-11-12 05:33:38] Reorder clusters...
#> ℹ [2026-11-12 05:33:38] Skip `log1p()` because `layer = data` is not "counts"
#> ℹ [2026-11-12 05:33:38] Perform umap nonlinear dimension reduction
#> ✔ [2026-11-12 05:33:48] Standard processing workflow completed
set.seed(11)
pancreas_sub <- RunDoubletCalling(
  pancreas_sub,
  db_method = "scDblFinder",
  iter = 2L
)
#> ℹ [2026-11-12 05:33:48] Data type is raw counts
#> ℹ [2026-11-12 05:33:48] Running scDblFinder
table(pancreas_sub$db.scDblFinder_class)
#> 
#> singlet doublet 
#>     982      18 
head(pancreas_sub@meta.data[, c(
  "db.scDblFinder_class", "db.scDblFinder_score"
)])
#>                  db.scDblFinder_class db.scDblFinder_score
#> AAACCTGAGCCTTGAT              singlet          0.002995771
#> AAACCTGGTAAGTGGC              singlet          0.038485114
#> AAACGGGAGATATGGT              singlet          0.005931634
#> AAACGGGCAAAGAATC              singlet          0.036854196
#> AAACGGGGTACAGTTC              singlet          0.065175354
#> AAACGGGTCAGCTCTC              singlet          0.001594166