generateCompoundsLibrary | R Documentation |
Uses a MS library loaded by loadMSLibrary
for compound annotation.
generateCompoundsLibrary(fGroups, ...)
## S4 method for signature 'featureGroups'
generateCompoundsLibrary(
fGroups,
MSPeakLists,
MSLibrary,
minSim = 0.75,
minAnnSim = minSim,
absMzDev = 0.002,
adduct = NULL,
checkIons = "adduct",
spectrumType = "MS2",
specSimParams = getDefSpecSimParams(),
specSimParamsLib = getDefSpecSimParams()
)
## S4 method for signature 'featureGroupsSet'
generateCompoundsLibrary(
fGroups,
MSPeakLists,
MSLibrary,
minSim = 0.75,
minAnnSim = minSim,
absMzDev = 0.002,
adduct = NULL,
...,
setThreshold = 0,
setThresholdAnn = 0,
setAvgSpecificScores = FALSE
)
fGroups |
|
... |
\setsWF Further arguments passed to the non-sets workflow method. |
MSPeakLists |
A |
MSLibrary |
The |
minSim |
The minimum spectral similarity for candidate records. |
minAnnSim |
The minimum spectral similarity of a record for it to be used to find annotations (see the
|
absMzDev |
The maximum absolute m/z deviation between the feature group and library record m/z values for candidate selection. |
adduct |
An The |
checkIons |
A |
spectrumType |
A |
specSimParams |
A named |
specSimParamsLib |
Like |
setThreshold |
\setsWF Minimum abundance for a candidate among all sets (‘0-1’). For instance, a value of ‘1’ means that the candidate needs to be present in all the set data. |
setThresholdAnn |
\setsWF As |
setAvgSpecificScores |
\setsWF If |
This function uses MS library spectra to generate compound candidates. This function is called when calling generateCompounds
with
algorithm="library"
.
This method matches measured MS/MS data (peak lists) with those from an MS library to find candidate structures. Hence, only feature groups with MS/MS peak list data are annotated.
The library is searched for candidates with the following criteria:
Only records with ion m/z (PrecursorMZ
), SMILES, InChI, InChIKey
and formula
data are considered.
Depending on the value of the checkIons
argument, records with different adduct
(Precursor_type
) or polarity (Ion_mode
) may be ignored.
The m/z values of the candidate and feature group should match (tolerance set by absMzDev
argument).
The spectral similarity should not be lower than the value defined for the minSim
argument.
If multiple candidates with the same first-block InChIKey are found then only the candidate with the best spectral match is kept.
If the library contains annotations these will be added to the matched MS/MS peaks. However, since the candidate
selected from criterion #5 above may not contain all the annotation data available from the MS library, annotations
from other records are also considered (controlled by the minAnnSim
argument). If this leads to different
annotations for the same mass peak then only the most abundant annotation is kept.
generateCompounds
for more details and other algorithms.
loadMSLibrary
to obtain MS library data and the methods for MSLibrary
to treat
the data before using it for annotation.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.