A general and flexible zero-inflated negative binomial model that can be used to provide a low-dimensional representations of scRNAseq data. The model accounts for zero inflation (dropouts), over-dispersion, and the count nature of the data. The model also accounts for the difference in library sizes and optionally for batch effects and/or other covariates.

runZINBWaVE(
  inSCE,
  useAssay = "counts",
  batch = "batch",
  nHVG = 1000L,
  nComponents = 50L,
  epsilon = 1000,
  nIter = 10L,
  reducedDimName = "zinbwave",
  BPPARAM = BiocParallel::SerialParam()
)

Arguments

inSCE

Input SingleCellExperiment object

useAssay

A single character indicating the name of the assay requiring batch correction. Note that ZINBWaVE works for counts (integer) input rather than logcounts that other methods prefer. Default "counts".

batch

A single character indicating a field in colData that annotates the batches. Default "batch".

nHVG

An integer. Number of highly variable genes to use when fitting the model. Default 1000L.

nComponents

An integer. The number of principle components or dimensionality to generate in the resulting matrix. Default 50L.

epsilon

An integer. Algorithmic parameter. Empirically, a high epsilon is often required to obtained a good low-level representation. Default 1000L.

nIter

An integer, The max number of iterations to perform. Default 10L.

reducedDimName

A single character. The name for the corrected low-dimensional representation. Will be saved to reducedDim(inSCE). Default "zinbwave".

BPPARAM

A BiocParallelParam object specifying whether should be parallelized. Default BiocParallel::SerialParam().

Value

The input SingleCellExperiment object with reducedDim(inSCE, reducedDimName) updated.

References

Pollen, Alex A et al., 2014

Examples

data('sceBatches', package = 'singleCellTK')
if (FALSE) {
    sceCorr <- runZINBWaVE(sceBatches, nIter = 5)
}