addDoublets: addDoublets

Description Usage Arguments Value Examples

View source: R/getArtificialDoublets.R

Description

Adds artificial doublets to an existing dataset

Usage

1
2
3
4
5
6
7
8
9
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

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

scDblFinder documentation built on Nov. 8, 2020, 5:48 p.m.