Skip to contents

Run doublet-calling for single cell RNA-seq data.

Usage

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

Arguments

srt

A Seurat object.

assay

The name of the assay to be used for doublet-calling. Default is "RNA".

db_rate

The expected doublet rate. Default is calculated as ncol(srt) / 1000 * 0.01.

db_method

Method used for doublet-calling. Can be one of "scDblFinder", "Scrublet", "DoubletDetection", "scds_cxds", "scds_bcds", "scds_hybrid".

data_type

Optional precomputed result from CheckDataType() for the input assay. Primarily used internally to avoid repeated scans of the same count matrix across nested QC calls.

...

Additional arguments to be passed to the corresponding doublet-calling method.

Value

Returns a Seurat object with the doublet prediction results and prediction scores stored in the meta.data.

Examples

data(pancreas_sub)
pancreas_sub <- standard_scop(pancreas_sub)
#>  [2026-04-26 02:05:10] Start standard processing workflow...
#>  [2026-04-26 02:05:11] Checking a list of <Seurat>...
#> ! [2026-04-26 02:05:11] Data 1/1 of the `srt_list` is "unknown"
#>  [2026-04-26 02:05:11] Perform `NormalizeData()` with `normalization.method = 'LogNormalize'` on 1/1 of `srt_list`...
#>  [2026-04-26 02:05:13] Perform `Seurat::FindVariableFeatures()` on 1/1 of `srt_list`...
#>  [2026-04-26 02:05:14] Use the separate HVF from `srt_list`
#>  [2026-04-26 02:05:14] Number of available HVF: 2000
#>  [2026-04-26 02:05:14] Finished check
#>  [2026-04-26 02:05:14] Perform `Seurat::ScaleData()`
#>  [2026-04-26 02:05:15] Perform pca linear dimension reduction
#>  [2026-04-26 02:05:15] Use stored estimated dimensions 1:20 for Standardpca
#>  [2026-04-26 02:05:16] Perform `Seurat::FindClusters()` with `cluster_algorithm = 'louvain'` and `cluster_resolution = 0.6`
#>  [2026-04-26 02:05:16] Reorder clusters...
#>  [2026-04-26 02:05:16] Skip `log1p()` because `layer = data` is not "counts"
#>  [2026-04-26 02:05:16] Perform umap nonlinear dimension reduction
#>  [2026-04-26 02:05:16] Perform umap nonlinear dimension reduction using Standardpca (1:20)
#>  [2026-04-26 02:05:21] Perform umap nonlinear dimension reduction using Standardpca (1:20)
#>  [2026-04-26 02:05:27] Standard processing workflow completed
pancreas_sub <- RunDoubletCalling(
  pancreas_sub,
  db_method = "scDblFinder"
)
#>  [2026-04-26 02:05:27] Data type is raw counts
#>  [2026-04-26 02:05:27] Running scDblFinder
#>  [2026-04-26 02:05:27] Data type is raw counts
#> Warning: Layer ‘data’ is empty
#> Warning: Layer ‘scale.data’ is empty
#> Warning: 'normalizeCounts' is deprecated.
#> Use 'scrapper::normalizeCounts' instead.
#> See help("Deprecated")
#> Warning: 'librarySizeFactors' is deprecated.
#> Use 'scrapper::centerSizeFactors' instead.
#> See help("Deprecated")
CellDimPlot(
  pancreas_sub,
  reduction = "umap",
  group.by = "db.scDblFinder_class"
)
#> Error in DefaultReduction(srt, pattern = reduction): Unable to find any reductions

FeatureDimPlot(
  pancreas_sub,
  reduction = "umap",
  features = "db.scDblFinder_score"
)
#> Error in DefaultReduction(srt, pattern = reduction): Unable to find any reductions