Skip to contents

Doublet calling

Usage

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

Arguments

srt

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.

...

Passed to the selected doublet method.

verbose

Whether to print messages.

Value

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

Examples

data(pancreas_sub)
pancreas_sub <- RunStandardWorkflow(pancreas_sub)
#>  [2026-08-30 04:57:02] Start standard processing workflow...
#>  [2026-08-30 04:57:02] Checking a list of <Seurat>...
#> ! [2026-08-30 04:57:02] Data 1/1 of the `srt_list` is "unknown"
#> Warning: Data 1/1 of the `srt_list` is "unknown"
#>  [2026-08-30 04:57:02] Perform `NormalizeData()` with `normalization.method = 'LogNormalize'` on 1/1 of `srt_list`...
#>  [2026-08-30 04:57:02] Perform `FindVariableFeatures()` on 1/1 of `srt_list`...
#>  [2026-08-30 04:57:02] Use the separate HVF from `srt_list`
#>  [2026-08-30 04:57:03] Number of available HVF: 2000
#>  [2026-08-30 04:57:03] Finished check
#>  [2026-08-30 04:57:03] Perform `ScaleData()`
#>  [2026-08-30 04:57:03] Perform pca linear dimension reduction
#>  [2026-08-30 04:57:03] Use stored estimated dimensions 1:23 for Standardpca
#>  [2026-08-30 04:57:03] Perform `Seurat::FindClusters()` with `cluster_algorithm = 'louvain'` and `cluster_resolution = 0.6`
#>  [2026-08-30 04:57:03] Reorder clusters...
#>  [2026-08-30 04:57:04] Skip `log1p()` because `layer = data` is not "counts"
#>  [2026-08-30 04:57:04] Perform umap nonlinear dimension reduction
#>  [2026-08-30 04:57:11] Standard processing workflow completed
pancreas_sub <- RunDoubletCalling(
  pancreas_sub,
  db_method = "scDblFinder"
)
#>  [2026-08-30 04:57:12] Data type is raw counts
#>  [2026-08-30 04:57:12] Running scDblFinder
#>  [2026-08-30 04:57:12] Data type is raw counts
#> Warning: Layer ‘data’ is empty
#> Warning: Layer ‘scale.data’ is empty
table(pancreas_sub$db.scDblFinder_class)
#> 
#> singlet doublet 
#>     973      27 
head(pancreas_sub@meta.data[, c(
  "db.scDblFinder_class", "db.scDblFinder_score"
)])
#>                  db.scDblFinder_class db.scDblFinder_score
#> AAACCTGAGCCTTGAT              singlet          0.001370679
#> AAACCTGGTAAGTGGC              singlet          0.108680919
#> AAACGGGAGATATGGT              singlet          0.008711043
#> AAACGGGCAAAGAATC              singlet          0.019803654
#> AAACGGGGTACAGTTC              singlet          0.032615695
#> AAACGGGTCAGCTCTC              singlet          0.012556195