normalize_batches: Normalize batches

View source: R/batch_correction.R

normalize_batchesR Documentation

Normalize batches

Description

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

Usage

normalize_batches(object, batch, group, ref_label, population = "all", ...)

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

population

Identifier of population samples in group column (all (default) or any type of samples present in group)

...

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

# 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)

antonvsdata/notame documentation built on Sept. 14, 2024, 11:09 p.m.