runLimmaBC: Apply Limma's batch effect correction method to...

View source: R/runBatchCorrection.R

runLimmaBCR Documentation

Apply Limma's batch effect correction method to SingleCellExperiment object

Description

Limma's batch effect removal function fits a linear model to the data, then removes the component due to the batch effects.

Usage

runLimmaBC(inSCE, useAssay = "logcounts", assayName = "LIMMA", batch = "batch")

Arguments

inSCE

Input SingleCellExperiment object

useAssay

A single character indicating the name of the assay requiring batch correction. Default "logcounts".

assayName

A single characeter. The name for the corrected assay. Will be saved to assay. Default "LIMMA".

batch

A single character indicating a field in colData that annotates the batches of each cell; or a vector/factor with the same length as the number of cells. Default "batch".

Value

The input SingleCellExperiment object with assay(inSCE, assayName) updated.

References

Gordon K Smyth, et al., 2003

Examples

data('sceBatches', package = 'singleCellTK')
logcounts(sceBatches) <- log1p(counts(sceBatches))
sceCorr <- runLimmaBC(sceBatches)

compbiomed/singleCellTK documentation built on Feb. 10, 2024, 3:32 a.m.