View source: R/runBatchCorrection.R
runMNNCorrect | R Documentation |
MNN is designed for batch correction of single-cell RNA-seq data where the batches are partially confounded with biological conditions of interest. It does so by identifying pairs of MNN in the high-dimensional log-expression space. For each MNN pair, a pairwise correction vector is computed by applying a Gaussian smoothing kernel with bandwidth 'sigma'.
runMNNCorrect(
inSCE,
useAssay = "logcounts",
batch = "batch",
assayName = "MNN",
k = 20L,
propK = NULL,
sigma = 0.1,
cosNormIn = TRUE,
cosNormOut = TRUE,
varAdj = TRUE,
BPPARAM = BiocParallel::SerialParam()
)
inSCE |
Input SingleCellExperiment object |
useAssay |
A single character indicating the name of the assay requiring
batch correction. Default |
batch |
A single character indicating a field in |
assayName |
A single characeter. The name for the corrected assay. Will
be saved to |
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 |
sigma |
A numeric scalar specifying the bandwidth of the Gaussian
smoothing kernel used to compute the correction vector for each cell. See
"See Also". Default |
cosNormIn |
A logical scalar indicating whether cosine normalization
should be performed on the input data prior to calculating distances between
cells. See "See Also". Default |
cosNormOut |
A logical scalar indicating whether cosine normalization
should be performed prior to computing corrected expression values. See "See
Also". Default |
varAdj |
A logical scalar indicating whether variance adjustment should
be performed on the correction vectors. See "See Also". Default |
BPPARAM |
A BiocParallelParam object specifying whether the PCA and nearest-neighbor searches should be parallelized. |
The input SingleCellExperiment object with
assay(inSCE, assayName)
updated.
Haghverdi L, Lun ATL, et. al., 2018
mnnCorrect
data('sceBatches', package = 'singleCellTK')
logcounts(sceBatches) <- log1p(counts(sceBatches))
sceCorr <- runMNNCorrect(sceBatches)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.