MassSpecMethod_GenerateFormulas_genform S7 class
Source:R/class_MassSpecMethod_GenerateFormulas.R
MassSpecMethod_GenerateFormulas_genform.Rd
Settings for generating formulas using the algorithm GenForm. The algorithm is used via the function generateFormulas from the package patRoon. Therefore, it is highly recommended to check the original documentation of the function in patRoon for more details.
Usage
MassSpecMethod_GenerateFormulas_genform(
MSPeakListsClusterMzWindow = 0.005,
MSPeakListsTopMost = 100,
MSPeakListsMinIntensityPre = 50,
MSPeakListsMinIntensityPost = 50,
MSPeakListsAvgFun = "mean",
MSPeakListsMethod = "distance",
relMzDev = 5,
elements = "CHNOP",
hetero = TRUE,
oc = FALSE,
thrMS = numeric(),
thrMSMS = numeric(),
thrComb = numeric(),
maxCandidates = Inf,
extraOpts = character(),
calculateFeatures = TRUE,
featThreshold = 0,
featThresholdAnn = 0.75,
absAlignMzDev = 0.002,
MSMode = "both",
isolatePrec = TRUE,
timeout = 120,
topMost = 50,
batchSize = 8
)
Arguments
- MSPeakListsClusterMzWindow
m/z window (in Da) used for clustering m/z values when spectra are averaged. For method="hclust" this corresponds to the cluster height, while for method="distance" this value is used to find nearby masses (+/- window). Too small windows will prevent clustering m/z values (thus erroneously treating equal masses along spectra as different), whereas too big windows may cluster unrelated m/z values from different or even the same spectrum together.
- MSPeakListsTopMost
Only retain this maximum number of MS peaks when generating averaged spectra. Lowering this number may exclude more irrelevant (noisy) MS peaks and decrease processing time, whereas higher values may avoid excluding lower intense MS peaks that may still be of interest.
- MSPeakListsMinIntensityPre
MS peaks with intensities below this value will be removed (applied prior to selection by
topMost
) before averaging.- MSPeakListsMinIntensityPost
MS peaks with intensities below this value will be removed after averaging.
- MSPeakListsAvgFun
Character with the function name that is used to calculate average m/z values.
- MSPeakListsMethod
Method used for producing averaged MS spectra. Valid values are "hclust", used for hierarchical clustering (using the fastcluster package), and "distance", to use the between peak distance. The latter method may reduces processing time and memory requirements, at the potential cost of reduced accuracy.
- relMzDev
Numeric (length 1) with the relative mass deviation, in ppm.
- elements
Character vector with the elements to use for formulae annotation. Always try to work with a minimal set by excluding elements you don't expect.
- hetero
Logical (length 1) indicating if heteroatoms are allowed in the formulae.
- oc
Logical (length 1) indicating presence of at least one carbon in the formulae.
- thrMS
Numeric (length 1) Sets the thresholds for the GenForm MS score (isoScore). Sets the thms command line options, respectively. Set to NULL for no threshold.
- thrMSMS
Numeric (length 1) Sets the thresholds for the GenForm MS/MS score (MSMSScore). Sets the thmsms command line options, respectively. Set to NULL for no threshold.
- thrComb
Numeric (length 1) Sets the thresholds for the GenForm combined score (combMatch). Sets the thcomb command line options, respectively. Set to NULL for no threshold.
- maxCandidates
Numeric (length 1) with the maximum number of candidates to be generated.
- extraOpts
Character (length 1) with extra CLI options to be passed to the GenForm algorithm.
- calculateFeatures
Logical (length 1) indicating if features should be calculated.
- featThreshold
Numeric (length 1). If
calculateFeatures
is TRUE the minimum presence (from 0 to 1) of features with formula annotation to be considered for the respective feature group.- featThresholdAnn
Numeric (length 1). As
featThreshold
, but only considers features with annotations.- absAlignMzDev
Numeric (length 1). When the group formula annotation consensus is made from feature annotations, the m/z values of annotated MS/MS fragments may slightly deviate from those of the corresponding group MS/MS peak list. The
absAlignMzDev
argument specifies the maximum m/z window used to re-align the mass peaks.- MSMode
Character (length 1) with the MS mode to be used. Possible values are "MS", "MSMS", or "both".
- isolatePrec
Settings used for isolation of precursor mass peaks and their isotopes. This isolation is highly important for accurate isotope scoring of candidates, as non-relevant mass peaks will dramatically decrease the score. The value of
isolatePrec
should either be alist
with parameters (see thefilter
method forMSPeakLists
for more details),TRUE
for default parameters orFALSE
for no isolation (e.g. when you already performed isolation with the filter method). Thez
parameter (charge) is automatically deduced from the adduct used for annotation (unlessisolatePrec
is FALSE), hence any customz
setting is ignored.- timeout
Numeric (length 1) with the maximum time in seconds to wait for the GenForm algorithm to finish.
- topMost
Numeric (length 1) with the maximum number of top candidates to be returned.
- batchSize
Maximum number of
GenForm
commands that should be run sequentially in each parallel process.
References
Helmus R, ter Laak TL, van Wezel AP, de Voogt P, Schymanski EL (2021). “patRoon: open source software platform for environmental mass spectrometry based non-target screening.” Journal of Cheminformatics, 13(1). doi:10.1186/s13321-020-00477-w .
Helmus R, van de Velde B, Brunner AM, ter Laak TL, van Wezel AP, Schymanski EL (2022). “patRoon 2.0: Improved non-target analysis workflows including automated transformation product screening.” Journal of Open Source Software, 7(71), 4029. doi:10.21105/joss.04029 .
Meringer M, Reinker S, Zhang J, Muller A (2011). “MS/MS data improves automated determination of molecular formulas by mass spectrometry.” MATCH Commun. Math. Comput. Chem, 65(2), 259–290.