Description Usage Arguments Value Examples
View source: R/runBatchCorrection.R
The ComBat batch adjustment approach assumes that batch effects represent non-biological but systematic shifts in the mean or variability of genomic features for all samples within a processing batch. It uses either parametric or non-parametric empirical Bayes frameworks for adjusting data for batch effects.
1 2 3 4 5 6 7 8 9 10 |
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
|
par.prior |
A logical scalar. TRUE indicates parametric adjustments
will be used, FALSE indicates non-parametric adjustments will be used.
Default |
covariates |
List of other column names in colData to be added to the
ComBat model as covariates. Default |
mean.only |
If TRUE ComBat only corrects the mean of the batch effect.
Default |
ref.batch |
If given, will use the selected batch as a reference for
batch adjustment. Default |
assayName |
A single characeter. The name for the corrected assay. Will
be saved to |
The input SingleCellExperiment object with
assay(inSCE, assayName)
updated.
1 2 3 4 5 6 7 8 9 10 | ## Not run:
data('sceBatches', package = 'singleCellTK')
# parametric adjustment
sceCorr <- runComBat(sceBatches)
# non-parametric adjustment, mean-only version
sceCorr <- runComBat(sceBatches, par.prior=FALSE, mean.only=TRUE)
# reference-batch version, with covariates
sceCorr <- runComBat(sceBatches, covariates = "cell_type", ref.batch = 'w')
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.