Run emptyDrops on the count matrix in the provided \linkS4classSingleCellExperiment object. Distinguish between droplets containing cells and ambient RNA in a droplet-based single-cell RNA sequencing experiment.

runEmptyDrops(
  inSCE,
  sample = NULL,
  useAssay = "counts",
  lower = 100,
  niters = 10000,
  testAmbient = FALSE,
  ignore = NULL,
  alpha = NULL,
  retain = NULL,
  barcodeArgs = list(),
  BPPARAM = BiocParallel::SerialParam()
)

Arguments

inSCE

A SingleCellExperiment object. Must contain a raw counts matrix before empty droplets have been removed.

sample

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

useAssay

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

lower

See emptyDrops for more information. Default 100.

niters

See emptyDrops for more information. Default 10000.

testAmbient

See emptyDrops for more information. Default FALSE.

ignore

See emptyDrops for more information. Default NULL.

alpha

See emptyDrops for more information. Default NULL.

retain

See emptyDrops for more information. Default NULL.

barcodeArgs

See emptyDrops for more information. Default list().

BPPARAM

See emptyDrops for more information. Default BiocParallel::SerialParam().

Value

A SingleCellExperiment object with the emptyDrops output table appended to the colData slot. The columns include emptyDrops_total, emptyDrops_logprob, emptyDrops_pvalue, emptyDrops_limited, emptyDrops_fdr. Please refer to the documentation of emptyDrops for details.

Examples

data(scExample, package = "singleCellTK")
sce <- runEmptyDrops(inSCE = sce)
#> Sat Mar 18 10:30:52 2023 ... Running 'emptyDrops'