Skip to contents

getExpectedDoublets

Usage

getExpectedDoublets(x, dbr = NULL, only.heterotypic = TRUE)

Arguments

x

A vector of cluster labels for each cell

dbr

The expected doublet rate.

only.heterotypic

Logical; whether to return expectations only for heterotypic doublets

Value

The expected number of doublets of each combination of clusters

Examples

# random cluster labels
cl <- sample(head(LETTERS,4), size=2000, prob=c(.4,.2,.2,.2), replace=TRUE)
getExpectedDoublets(cl)
#>     A+B     A+C     B+C     A+D     B+D     C+D 
#> 6.65532 6.19248 3.23592 6.33612 3.31098 3.08072