runDoubletFinder: Doublet detection with DoubletFinder

View source: R/DoubletFinder.R

runDoubletFinderR Documentation

Doublet detection with DoubletFinder

Description

Detect doublet with DoubletFinder. Package "Seurat" and "DoubletFinder" would be required to run this function.

This wrapper runs Seurat PCA workflow (NormalizeData, FindVariableFeatures, ScaleData, RunPCA) with all default settings on each dataset, and then calls DoubletFinder::doubletFinder. Users that prefer having more control on the preprocessing part might consider creating single-sample Seurat object with CreateSeuratObject(rawData(object, "datasetName")).

Usage

runDoubletFinder(
  object,
  useDatasets = NULL,
  PCs = 1:10,
  nNeighbors = 20,
  nExp = NULL,
  verbose = getOption("ligerVerbose", TRUE),
  ...
)

Arguments

object

A liger object.

useDatasets

A character vector of the names, a numeric or logical vector of the index of the datasets to run DoubletFinder::doubletFinder with. Default NULL applies to all datasets.

PCs

Specific principal components to use. Default 1:10.

nNeighbors

Number of the PC neighborhood size used to compute pANN. See "See Also". Scalar for all used datasets or vector for each. Default 20.

nExp

The total number of doublet predictions produced. Scalar for all used datasets or vector for each. Default NULL sets a 0.15 proportion.

verbose

Logical. Whether to show information of the progress. Default getOption("ligerVerbose") or TRUE if users have not set.

...

Additional arguments passed to DoubletFinder::doubletFinder.

Value

Updated object with variables DoubletFinder_pANN and DoubletFinder_classification updated in cellMeta slot

Examples

if (requireNamespace("DoubletFinder", quietly = TRUE)) {
    pbmc <- runDoubletFinder(pbmc)
    print(cellMeta(pbmc))
}

rliger documentation built on Oct. 30, 2024, 1:07 a.m.