addDoublets: addDoublets

View source: R/getArtificialDoublets.R

addDoubletsR Documentation

addDoublets

Description

Adds artificial doublets to an existing dataset

Usage

addDoublets(
  x,
  clusters,
  dbr = (0.01 * ncol(x)/1000),
  only.heterotypic = TRUE,
  adjustSize = FALSE,
  prefix = "doublet.",
  ...
)

Arguments

x

A count matrix of singlets, or a SummarizedExperiment-class

clusters

A vector of cluster labels for each column of 'x'

dbr

The doublet rate

only.heterotypic

Whether to add only heterotypic doublets.

adjustSize

Whether to adjust the library sizes of the doublets.

prefix

Prefix for the colnames generated.

...

Any further arguments to createDoublets.

Value

A 'SingleCellExperiment' with the colData columns 'cluster' and 'type' (indicating whether the cell is a singlet or doublet).

Examples

sce <- mockDoubletSCE(dbl.rate=0)
sce <- addDoublets(sce, clusters=sce$cluster)

plger/scDblFinder documentation built on March 20, 2024, 9:46 p.m.