Description Usage Arguments Value Author(s) References See Also Examples
Two criteria are employed to assess the quality of a batch correction. The first is based on a PCA decomposition; the other on the variation between (biological) replicates. This function is a wrapper for the two underlying functions - use these if you want to have access to more specific arguments.
1 | evaluateCorrection(X, Y, what = c("duplo", "PCA"), ...)
|
X |
Data matrix, with samples in the rows and variables in the columns. |
Y |
A vector of batch labels. |
what |
Name of the quality criterion to be employed. |
... |
Further arguments to graphical functions. |
A number indicating the relative success of the batch correction. For the PCA criterion, the number is the average Bhattacharya distance between the batches - smaller is better. For the duplo criterion, the number means the relative fraction of variation accounted for by the sample (in our example the genotype): bigger is better.
Ron Wehrens
" @ArticleWehrens2016, author = Ron Wehrens and Jos.~A.~Hageman and Fred~van~Eeuwijk and Rik~Kooke and P\'adraic~J.~Flood and Erik Wijnker and Joost~J.B.~Keurentjes and Arjen~Lommen and Henri\"ette~D.L.M.~van~Eekelen and Robert~D.~Hall and Roland~Mumm and Ric~C.H.~de~Vos, title = Improved batch correction in untargeted MS-based metabolomics, journal = Metabolomics, year = 2016, volume = 12, DOI = 10.1007/s11306-016-1015-8, pages = 1–12
"
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | data(BC)
set.1.lod <- min(set.1[!is.na(set.1)])
## Figure 2 from the paper
par(mfrow = c(1,2))
## uncorrected data
huhnPCA <- evaluateCorrection(set.1, set.1.Y, what = "PCA",
plot = TRUE, legend.loc = "bottomright")
title(main = paste("Interbatch distance:", round(huhnPCA, 3)))
## do correction
set.1.corrected.Q <-
apply(set.1, 2, doBC, ref.idx = which(set.1.Y$SCode == "ref"),
batch.idx = set.1.Y$Batch, minBsamp = 4,
seq.idx = set.1.Y$SeqNr, method = "lm",
imputeVal = set.1.lod)
huhnPCA.A <- evaluateCorrection(set.1.corrected.Q, set.1.Y, what = "PCA",
plot = TRUE, legend.loc = "bottomright")
title(main = paste("Q: Interbatch distance:", round(huhnPCA.A, 3)))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.