ruvs_qc: Remove Unwanted Variation

Description Usage Arguments Value Examples

View source: R/batch_correction.R

Description

An interface for the RUVs method in RUVSeq package.

Usage

1
ruvs_qc(object, batch, replicates, k = 3, ...)

Arguments

object

a MetaboSet object

batch

the column name for batch labels

replicates

list of numeric vectors, indexes of replicates

k

The number of factors of unwanted variation to be estimated from the data.

...

other parameters passed to RUVSeq::RUVs

Value

a MetaboSet object with the normalized data

Examples

1
2
3
4
5
6
# Batch correction
replicates <- list(which(merged_sample$QC == "QC"))
batch_corrected <- ruvs_qc(merged_sample, batch = "Batch", replicates = replicates)
# 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.