Skip to contents

Run doublet-calling with scds

Usage

Runscds(
  srt,
  assay = "RNA",
  db_rate = ncol(srt)/1000 * 0.01,
  method = c("hybrid", "cxds", "bcds"),
  data_type = NULL,
  ...,
  verbose = TRUE
)

Arguments

srt

A Seurat object.

assay

Assay used for doublet calling.

db_rate

Expected doublet rate.

method

The method to be used for doublet-calling. Options are "hybrid", "cxds", or "bcds".

data_type

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

...

Additional arguments passed to the selected scds method.

verbose

Whether to print messages.

Examples

data(pancreas_sub)
pancreas_sub <- RunStandardWorkflow(pancreas_sub)
#>  [2026-08-30 05:54:11] Start standard processing workflow...
#>  [2026-08-30 05:54:11] Checking a list of <Seurat>...
#> ! [2026-08-30 05:54:11] Data 1/1 of the `srt_list` is "unknown"
#> Warning: Data 1/1 of the `srt_list` is "unknown"
#>  [2026-08-30 05:54:11] Perform `NormalizeData()` with `normalization.method = 'LogNormalize'` on 1/1 of `srt_list`...
#>  [2026-08-30 05:54:11] Perform `FindVariableFeatures()` on 1/1 of `srt_list`...
#>  [2026-08-30 05:54:11] Use the separate HVF from `srt_list`
#>  [2026-08-30 05:54:11] Number of available HVF: 2000
#>  [2026-08-30 05:54:11] Finished check
#>  [2026-08-30 05:54:11] Perform `ScaleData()`
#>  [2026-08-30 05:54:11] Perform pca linear dimension reduction
#>  [2026-08-30 05:54:12] Use stored estimated dimensions 1:23 for Standardpca
#>  [2026-08-30 05:54:12] Perform `Seurat::FindClusters()` with `cluster_algorithm = 'louvain'` and `cluster_resolution = 0.6`
#>  [2026-08-30 05:54:12] Reorder clusters...
#>  [2026-08-30 05:54:12] Skip `log1p()` because `layer = data` is not "counts"
#>  [2026-08-30 05:54:12] Perform umap nonlinear dimension reduction
#>  [2026-08-30 05:54:22] Standard processing workflow completed
pancreas_sub <- Runscds(pancreas_sub, method = "hybrid")
#>  [2026-08-30 05:54:22] Running scds with method "hybrid"
#>  [2026-08-30 05:54:22] Data type is raw counts
CellDimPlot(
  pancreas_sub,
  reduction = "umap",
  group.by = "db.scds_hybrid_class"
)


FeatureDimPlot(
  pancreas_sub,
  reduction = "umap",
  features = "db.scds_hybrid_score"
)