View source: R/batch_correction.R
ruvs_qc | R Documentation |
An interface for the RUVs method in RUVSeq package.
ruvs_qc(object, batch, replicates, k = 3, ...)
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 |
a MetaboSet object with the normalized data
# 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.