View source: R/batch_correction.R
normalize_batches | R Documentation |
Normalize bathces by either reference samples of population median. Uses normalizeBatches function from the batchCorr package
normalize_batches(object, batch, group, ref_label, population = "all", ...)
object |
a MetaboSet object |
batch , group |
character, column names of pData with batch labels and group labels |
ref_label |
the label of the reference group i.e. the group that is constant through batches |
population |
Identifier of population samples in group column (all (default) or any type of samples present in group) |
... |
additional parameters passed to batchCorr::normalizeBatches |
list, the object with normalized features and information on which features were corrected by ref samples in each batch.
# Batch correction
## Not run:
batch_corrected <- normalize_batches(merged_sample, batch = "Batch", group = "QC", ref_label = "QC")
# Evaluate batch correction
pca_bhattacharyya_dist(merged_sample, batch = "Batch")
pca_bhattacharyya_dist(batch_corrected, batch = "Batch")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.