Description Usage Arguments Value References Examples
View source: R/runBatchCorrection.R
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'.
1 2 3 4 5 6 7 8 | runMNNCorrect(
inSCE,
useAssay = "logcounts",
batch = "batch",
assayName = "MNN",
k = 20L,
sigma = 0.1
)
|
inSCE |
SingleCellExperiment inherited object. Required. |
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. Specifies the number of nearest neighbours to
consider when defining MNN pairs. This should be interpreted as the minimum
frequency of each cell type or state in each batch. Larger values will
improve the precision of the correction by increasing the number of MNN
pairs, at the cost of reducing accuracy by allowing MNN pairs to form between
cells of different type. Default |
sigma |
A Numeric scalar. Specifies how much information is
shared between MNN pairs when computing the batch effect. Larger values will
share more information, approaching a global correction for all cells in the
same batch. Smaller values allow the correction to vary across cell types,
which may be more accurate but comes at the cost of precision. Default
|
The input SingleCellExperiment object with
assay(inSCE, assayName)
updated.
Lun ATL, et al., 2016 & 2018
1 2 3 4 5 | data('sceBatches', package = 'singleCellTK')
## Not run:
sceCorr <- runMNNCorrect(sceBatches)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.