R/runBatchCorrection.R
runFastMNN.RdfastMNN 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()
)Input SingleCellExperiment object
A single character indicating the name of the assay requiring
batch correction. Default "logcounts".
A single character indicating the dimension reduction
used for batch correction. Will ignore useAssay when using.
Default NULL.
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".
A single character. The name for the corrected
low-dimensional representation. Default "fastMNN".
An integer scalar specifying the number of nearest neighbors to
consider when identifying MNNs. See "See Also". Default 20.
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 NULL.
A numeric scalar specifying the threshold beyond which
neighbours are to be ignored when computing correction vectors. See "See
Also". Default 3.
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 0.
A logical scalar indicating whether cosine normalization
should be performed on useAssay prior to PCA. See "See Also". Default
TRUE.
An integer scalar specifying the number of dimensions to
produce. See "See Also". Default 50.
The weighting scheme to use. Passed to
multiBatchPCA. Default NULL.
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