ruvs_qc: Remove Unwanted Variation

View source: R/batch_correction.R

ruvs_qcR Documentation

Remove Unwanted Variation

Description

An interface for the RUVs method in RUVSeq package.

Usage

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

# Batch correction
## Not run: 
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")

## End(Not run)

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