Skip to contents

Run doublet-calling with Scrublet

Usage

db_Scrublet(
  srt,
  assay = "RNA",
  db_rate = ncol(srt)/1000 * 0.01,
  data_type = NULL,
  scrublet_backend = c("python", "r"),
  ...,
  verbose = TRUE
)

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.

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.

scrublet_backend

Backend used for Scrublet scoring. "python" uses the original scrublet.Scrublet implementation. "r" uses a native approximate doublet simulation, PCA, and KNN scoring workflow.

...

Additional arguments to be passed to scrublet.Scrublet.

verbose

Whether to print the message. Default is TRUE.

Examples

if (FALSE) { # \dontrun{
data(pancreas_sub)
pancreas_sub <- standard_scop(pancreas_sub)
pancreas_sub <- db_Scrublet(pancreas_sub)
CellDimPlot(
  pancreas_sub,
  reduction = "umap",
  group.by = "db.Scrublet_class"
)

FeatureDimPlot(
  pancreas_sub,
  reduction = "umap",
  features = "db.Scrublet_score"
)
} # }