runScDblFinder: Detect doublet cells using scDblFinder.

View source: R/scDblFinder_doubletDetection.R

runScDblFinderR Documentation

Detect doublet cells using scDblFinder.

Description

A wrapper function for scDblFinder. Identify potential doublet cells based on simulations of putative doublet expression profiles. Generate a doublet score for each cell.

Usage

runScDblFinder(
  inSCE,
  sample = NULL,
  useAssay = "counts",
  nNeighbors = 50,
  simDoublets = max(10000, ncol(inSCE)),
  seed = 12345,
  BPPARAM = BiocParallel::SerialParam()
)

Arguments

inSCE

A SingleCellExperiment object.

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".

nNeighbors

Number of nearest neighbors used to calculate density for doublet detection. Default 50.

simDoublets

Number of simulated doublets created for doublet detection. Default 10000.

seed

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

BPPARAM

A BiocParallelParam-class object specifying whether the neighbour searches should be parallelized. Default BiocParallel::SerialParam().

Details

This function is a wrapper function for scDblFinder. runScDblFinder runs scDblFinder for each sample within inSCE iteratively. The resulting doublet scores for all cells will be appended to the colData of inSCE.

Value

A SingleCellExperiment object with the scDblFinder QC outputs added to the colData slot.

References

Lun ATL (2018). Detecting doublet cells with scran. https://ltla.github.io/SingleCellThoughts/software/doublet_detection/bycell.html

See Also

scDblFinder, plotScDblFinderResults, runCellQC

Examples

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

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