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

runBarcodeRankDrops(
  inSCE,
  sample = NULL,
  useAssay = "counts",
  lower = 100,
  fitBounds = NULL,
  df = 20
)

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 barcodeRanks for more information. Default 100.

fitBounds

See barcodeRanks for more information. Default NULL.

df

See barcodeRanks for more information. Default 20.

Value

A SingleCellExperiment object with the barcodeRanks output table appended to the colData slot. The columns include dropletUtils_BarcodeRank_Knee and dropletUtils_barcodeRank_inflection. Please refer to the documentation of barcodeRanks for details.

Examples

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