pca_bhattacharyya_dist: Bhattacharyya distance between bathces in PCA space

Description Usage Arguments Value Examples

View source: R/batch_correction.R

Description

Computes Bhattacharyya distance between all pairs of batches after projecting the samples into PCA space with pcaMethods::pca

Usage

1
2
pca_bhattacharyya_dist(object, batch, all_features = FALSE,
  center = TRUE, scale = "uv", nPcs = 3, ...)

Arguments

object

a MetaboSet object

batch

column name of pData givinh the batch labels

Value

matrix of Bhattacharyya distances between batches

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.