normalize_batches: Normalize batches

Description Usage Arguments Value Examples

View source: R/batch_correction.R

Description

Normalize bathces by either reference samples of population median. Uses normalizeBatches function from the batchCorr package

Usage

1
normalize_batches(object, batch, group, ref_label, ...)

Arguments

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

...

additional parameters passed to batchCorr::normalizeBatches

Value

list, the object with normalized features and information on which features were corrected by ref samples in each batch.

Examples

1
2
3
4
5
# Batch correction
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")

antonvsdata/amp documentation built on Jan. 8, 2020, 3:15 a.m.