msQualify: Quality Assessment of Mass Spectra Data

Description Usage Arguments Details Value S3 METHODS References See Also Examples

Description

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.

Usage

1
msQualify(x, FUN="princomp", ...)

Arguments

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".

Details

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.

Value

An object of class msQualify.

S3 METHODS

predict

Predict the quality of a set of spectra. This method supports the following optional arguments.

object

An object of class msQualify.

newdata

A matrix of peak intensities. It must have the same number of columns as the peak intensity matrix used to compute the msQualify object.

criterion

A character string indicating the criterion to be use. Possible choices are "Cattell" and "Kaiser". Default: "Cattell".

threshold

A numeric value representing the threshold to be used. Default: 0.9.

References

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.

See Also

princomp.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
## 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")

zeehio/msProcess documentation built on May 4, 2019, 10:15 p.m.