Learn R Programming

metaMS (version 1.8.0)

matchExpSpec: Match a GC-MS pseudospectrum to a database with a weighted crossproduct criterion.

Description

Function matchExpSpec calculates match factors for a pseudospectrum with all entries in the database. A plot of the best match can be provided. Function mzmatch is an auxiliary function, not meant to be called directly, that provides the match factor, given two appropriately scaled patterns.

Usage

matchExpSpec(pspec, DB, DB.treated, plotIt = FALSE, scale.p = c("sqrt", "none"), mass.weight = TRUE, ...) mzmatch(spec1, spec2)

Arguments

pspec
The pseudospectrum, a two- or three-column matrix where the third column (the retention time) will be ignored.
DB
Database of standards.
DB.treated
Logical, indicating whether the database has already been scaled (TRUE) or not.
plotIt
Logical: show best match?
scale.p
indicates whether "sqrt" scaling or no scaling ("none") is to be applied. This should usually be "sqrt".
mass.weight
Logical, indicating whether heavier masses receive higher weight. Should usually be TRUE.
...
Further arguments for the pseudospectrum plot (if shown).
spec1, spec2
Preprocessed pseudospectra, here two-column matrices where the first column is the (integer) m/z value, and the second column the (scaled) intensity.

Value

Examples

Run this code
data(threeStdsNIST) ## gives smallDB, containing 78 patterns
data(threeStdsDB)   ## gives DB, containing 3 patterns :-D

matchExpSpec(DB[[1]]$pspectrum, smallDB, DB.treated = FALSE, plotIt = TRUE)

Run the code above in your browser using DataLab