runEmptyDrops: Identify empty droplets using emptyDrops.

Description Usage Arguments Value Examples

View source: R/dropletUtils_emptyDrops.R

Description

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

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
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

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

sample

Character vector. Indicates which sample each cell belongs to. emptyDrops will be run on cells from each sample separately. If NULL, then all cells will be processed together. Default NULL.

useAssay

A string specifying which assay in the SCE to use.

lower

See emptyDrops for more information.

niters

See emptyDrops for more information.

testAmbient

See emptyDrops for more information.

ignore

See emptyDrops for more information.

alpha

See emptyDrops for more information.

retain

See emptyDrops for more information.

barcodeArgs

See emptyDrops for more information.

BPPARAM

See emptyDrops for more information.

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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
# The following unfiltered PBMC_1k_v3 data were downloaded from
# https://support.10xgenomics.com/single-cell-gene-expression/datasets/3.0.0
# /pbmc_1k_v3
# Only the top 10 cells with most counts and the last 10 cells with non-zero
# counts are included in this example.
# This example only serves as an proof of concept and a tutorial on how to
# run the function. The results should not be
# used for drawing scientific conclusions.
data(scExample, package = "singleCellTK")
sce <- runEmptyDrops(inSCE = sce)

singleCellTK documentation built on Nov. 8, 2020, 5:21 p.m.