runFastMNN {singleCellTK} | R Documentation

## Apply a fast version of the mutual nearest neighbors (MNN) batch effect correction method to SingleCellExperiment object

### Description

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

### Usage

    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

    data('sceBatches', package = 'singleCellTK')
    logcounts(sceBatches) <- log(counts(sceBatches) + 1)
    sceCorr <- runFastMNN(sceBatches, useAssay = 'logcounts', pcInput = FALSE)

[Package singleCellTK version 2.2.0 Index]