View source: R/runBatchCorrection.R
runFastMNN | R Documentation |
fastMNN is a variant of the classic MNN method, modified for speed and more
robust performance. For introduction of MNN, see runMNNCorrect
.
runFastMNN(
inSCE,
useAssay = "logcounts",
useReducedDim = NULL,
batch = "batch",
reducedDimName = "fastMNN",
k = 20,
propK = NULL,
ndist = 3,
minBatchSkip = 0,
cosNorm = TRUE,
nComponents = 50,
weights = NULL,
BPPARAM = BiocParallel::SerialParam()
)
inSCE |
Input SingleCellExperiment object |
useAssay |
A single character indicating the name of the assay requiring
batch correction. Default |
useReducedDim |
A single character indicating the dimension reduction
used for batch correction. Will ignore |
batch |
A single character indicating a field in |
reducedDimName |
A single character. The name for the corrected
low-dimensional representation. Default |
k |
An integer scalar specifying the number of nearest neighbors to
consider when identifying MNNs. See "See Also". Default |
propK |
A numeric scalar in (0, 1) specifying the proportion of cells in
each dataset to use for mutual nearest neighbor searching. See "See Also".
Default |
ndist |
A numeric scalar specifying the threshold beyond which
neighbours are to be ignored when computing correction vectors. See "See
Also". Default |
minBatchSkip |
Numeric scalar specifying the minimum relative magnitude
of the batch effect, below which no correction will be performed at a given
merge step. See "See Also". Default |
cosNorm |
A logical scalar indicating whether cosine normalization
should be performed on |
nComponents |
An integer scalar specifying the number of dimensions to
produce. See "See Also". Default |
weights |
The weighting scheme to use. Passed to
|
BPPARAM |
A BiocParallelParam object specifying whether the SVD should be parallelized. |
The input SingleCellExperiment object with
reducedDim(inSCE, reducedDimName)
updated.
Lun ATL, et al., 2016
fastMNN
for using useAssay
, and
reducedMNN
for using useReducedDim
data('sceBatches', package = 'singleCellTK')
logcounts(sceBatches) <- log1p(counts(sceBatches))
sceCorr <- runFastMNN(sceBatches, useAssay = 'logcounts')
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.