doubletPairwiseEnrichment {scDblFinder}R Documentation

doubletPairwiseEnrichment

Description

Calculates enrichment in any type of doublet (i.e. specific combination of clusters) over random expectation. Note that when applied to an multisample object, this functions assumes that the cluster labels match across samples.

Usage

doubletPairwiseEnrichment(
  x,
  lower.tail = FALSE,
  sampleWise = FALSE,
  type = c("poisson", "binomial", "chisq", "nbinom1")
)

Arguments

x

A table of double statistics, or a SingleCellExperiment on which scDblFinder was run.

lower.tail

Logical; defaults to FALSE to test enrichment (instead of depletion).

sampleWise

Logical; whether to perform tests sample-wise in multi-sample datasets. If FALSE (default), will aggregate counts before testing.

type

Type of test to use.

Value

A table of significances for each combination.

Examples

sce <- mockDoubletSCE()
sce <- scDblFinder(sce, artificialDoublets=500)
doubletPairwiseEnrichment(sce)

[Package scDblFinder version 1.6.0 Index]