runBcds: Find doublets/multiplets using bcds.

View source: R/scds_doubletdetection.R

runBcdsR Documentation

Find doublets/multiplets using bcds.

Description

A wrapper function for bcds. Annotate doublets/multiplets using a binary classification approach to discriminate artificial doublets from original data. Generate a doublet score for each cell. Infer doublets if estNdbl is TRUE.

Usage

runBcds(
  inSCE,
  sample = NULL,
  seed = 12345,
  ntop = 500,
  srat = 1,
  verb = FALSE,
  retRes = FALSE,
  nmax = "tune",
  varImp = FALSE,
  estNdbl = FALSE,
  useAssay = "counts"
)

Arguments

inSCE

A SingleCellExperiment object.

sample

Character vector or colData variable name. Indicates which sample each cell belongs to. Default NULL.

seed

Seed for the random number generator, can be NULL. Default 12345.

ntop

See bcds for more information. Default 500.

srat

See bcds for more information. Default 1.

verb

See bcds for more information. Default FALSE.

retRes

See bcds for more information. Default FALSE.

nmax

See bcds for more information. Default "tune".

varImp

See bcds for more information. Default FALSE.

estNdbl

See bcds for more information. Default FALSE.

useAssay

A string specifying which assay in inSCE to use. Default "counts"

Details

When the argument sample is specified, bcds will be run on cells from each sample separately. If sample = NULL, then all cells will be processed together.

Value

A SingleCellExperiment object with bcds output appended to the colData slot. The columns include bcds_score and optionally bcds_call. Please refer to the documentation of bcds for details.

See Also

bcds, plotBcdsResults, runCellQC

Examples

data(scExample, package = "singleCellTK")
sce <- subsetSCECols(sce, colData = "type != 'EmptyDroplet'")
sce <- runBcds(sce)

compbiomed/singleCellTK documentation built on Oct. 27, 2024, 3:26 a.m.