runFastMNN: Apply a fast version of the mutual nearest neighbors (MNN)...

Description Usage Arguments Value References Examples

View source: R/runBatchCorrection.R

Description

fastMNN is a variant of the classic MNN method, modified for speed and more robust performance. For introduction of MNN, see runMNNCorrect.

Usage

1
2
3
4
5
6
7
runFastMNN(
  inSCE,
  useAssay = "logcounts",
  reducedDimName = "fastMNN",
  batch = "batch",
  pcInput = FALSE
)

Arguments

inSCE

inherited object. Required.

useAssay

A single character indicating the name of the assay requiring batch correction. Default "logcounts". Alternatively, see pcInput parameter.

reducedDimName

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

batch

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

pcInput

A logical scalar. Whether to use a low-dimension matrix for batch effect correction. If TRUE, useAssay will be searched from reducedDimNames(inSCE). Default FALSE.

Value

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

References

Lun ATL, et al., 2016

Examples

1
2
3
4
5
## Not run: 
data('sceBatches', package = 'singleCellTK')
sceCorr <- runFastMNN(sceBatches, useAssay = 'logcounts', pcInput = FALSE)

## End(Not run)

singleCellTK documentation built on Nov. 8, 2020, 5:21 p.m.