Skip to contents

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

MassSpecSettings_GenerateFormulas_genform(
  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

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 a list with parameters (see the filter method for MSPeakLists for more details), TRUE for default parameters or FALSE for no isolation (e.g. when you already performed isolation with the filter method). The z parameter (charge) is automatically deduced from the adduct used for annotation (unless isolatePrec is FALSE), hence any custom z 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.

Value

A MassSpecSettings_GenerateFormulas_genform object.

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.