msQualify {msProcess} | R Documentation |
Creates a data quality object using a set of spectra from a quality control (QC) sample. The result can be used to assess the quality of other spectra generated from the same QC sample.
msQualify(x, FUN="princomp", ...)
x |
A matrix of peak intensity values with spectra as rows and
peak classes as columns. The peak intensity matrix can be
estimated via the msAlign function (with measure="intensity" )
whose output contains (in part) a peak.matrix object. |
... |
Additional arguments for the specified principal component analysis
FUN . See the specific function for details. |
FUN |
A character string specifying the method for principal component analysis.
Possible choices are "princomp" , "princompRob" .
Default: "princomp" . |
The user is expected to provide a (training) peak intensity matrix
that has been derived from a set of pooled quality control samples.
The output of msQualify
contains the
projection of this matrix onto its principal
components (PCs) via the princomp
or princompRob
function.
The user can subsequently
assess the quality of another (test) peak intensity matrix generated from the
same QC sample via the predict
method, which compares the training PCs
to the test PCs.
An object of class msQualify
.
msQualify
.msQualify
object.
Coombes KR, Fritsche HA Jr., Clarke C, Chen JN, Baggerly KA, Morris JS, Xiao LC, Hung MC, and Kuerer HM, ``Quality control and peak finding for proteomics data collected from nipple aspirate fluid by surface-enhanced laser desorption and ionization," Clinical Chemistry, 49(10), pp. 1615–23, 2003.
## create multiple reference samples with multiple ## peaks set.seed(10) nrs <- 240 nv <- 35 my.mean <- 10 my.sd <- rnorm(nv) my.sd <- my.sd - min(my.sd) + 1 rsam <- splus2R::rmvnorm(n=nrs, d=nv, mean=rep(my.mean, nv), cov=diag(nv), sd=my.sd) ## run msQualify pca <- msQualify(rsam, FUN="princompRob", estim="auto") ## create multiple reference samples with multiple ## peaks from the same distribution nts <- 72 tsam <- splus2R::rmvnorm(n=nts, d=nv, mean=rep(my.mean, nv), cov=diag(nv), sd=my.sd) ## predict the quality of the test samples quality <- predict(pca, tsam) quality$pass if (!is.R()) assign("quality", quality, frame=1) ## check if the distances truly follow ## chisq(nkeep) distribution qqmath(~quality$dist, distribution=function(p, df=quality$df) qchisq(p, df), panel = function(x, y) { panel.grid() panel.abline(0, 1) panel.qqmath(x, y) }, aspect=1, xlab=paste("Chisq(", quality$df, ") Quantile"), ylab="mahalanobis distance")