generateFormulasDA: Generate formula with Bruker DataAnalysis

generateFormulasDAR Documentation

Generate formula with Bruker DataAnalysis

Description

Uses Bruker DataAnalysis to generate chemical formulae.

Usage

generateFormulasDA(fGroups, ...)

## S4 method for signature 'featureGroups'
generateFormulasDA(
  fGroups,
  MSPeakLists,
  precursorMzSearchWindow = 0.002,
  MSMode = "both",
  adduct = NULL,
  featThreshold = 0,
  featThresholdAnn = 0.75,
  absAlignMzDev = 0.002,
  save = TRUE,
  close = save
)

## S4 method for signature 'featureGroupsSet'
generateFormulasDA(
  fGroups,
  MSPeakLists,
  precursorMzSearchWindow = 0.002,
  MSMode = "both",
  adduct = NULL,
  ...,
  setThreshold = 0,
  setThresholdAnn = 0,
  setAvgSpecificScores = FALSE
)

Arguments

fGroups

featureGroups object for which formulae should be generated. This should be the same or a subset of the object that was used to create the specified MSPeakLists. In the case of a subset only the remaining feature groups in the subset are considered.

... \setsWF

Further arguments passed to the non-sets workflow method.

MSPeakLists

An MSPeakLists object that was generated for the supplied fGroups.

precursorMzSearchWindow

Search window for m/z values (+/- the feature m/z) used to find back feature data of precursor/parent ions from MS/MS spectra (this data is not readily available from SmartFormula3D results).

MSMode

Whether formulae should be generated only from MS data ("ms"), MS/MS data ("msms") or both ("both"). Selecting "both" will calculate formulae from MS data and MS/MS data and combines the results (duplicated formulae are removed). This is useful when poor MS/MS data would exclude proper candidates.

adduct

An adduct object (or something that can be converted to it with as.adduct). Examples: "[M-H]-", "[M+Na]+". If the featureGroups object has adduct annotations then these are used if adducts=NULL.

\setsWF

The adduct argument is not supported for sets workflows, since the adduct annotations will then always be used.

featThreshold

If calculateFeatures=TRUE: minimum presence (‘⁠0-1⁠’) of a formula in all features before it is considered as a candidate for a feature group. For instance, featThreshold=0.75 dictates that a formula should be present in at least 75% of the features inside a feature group.

featThresholdAnn

As featThreshold, but only considers features with annotations. For instance, featThresholdAnn=0.75 dictates that a formula should be present in at least 75% of the features with annotations inside a feature group.

absAlignMzDev

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.

close, save

If TRUE then Bruker files are closed and saved after processing with DataAnalysis, respectively. Setting close=TRUE prevents that many analyses might be opened simultaneously in DataAnalysis, which otherwise may use excessive memory or become slow. By default save is TRUE when close is TRUE, which is likely what you want as otherwise any processed data is lost.

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 setThreshold, but only taking into account the set data that contain annotations for the feature group of the candidate.

setAvgSpecificScores \setsWF

If TRUE then set specific scorings (e.g. MS/MS match) are also averaged.

Details

This function uses bruker to generate formula candidates. This function is called when calling generateFormulas with algorithm="bruker".

This method supports scoring based on overlap between measured and theoretical isotopic patterns (both MS and MS/MS data) and the presence of 'fitting' MS/MS fragments. The method will iterate through all features (or "Compounds" in DataAnalysis terms) and call SmartFormula (and SmartFormula3D if MS/MS data is available) to generate all formulae. Parameters affecting formula calculation have to be set in advance within the DataAnalysis method for each analysis (e.g. by setDAMethod).

This method requires that features were obtained with findFeaturesBruker. It is recommended, but not mandatory, that the MSPeakLists are also generated by DataAnalysis.

Calculation of formulae with DataAnalysis always occurs with the 'feature approach' (see ⁠Candidate assignment⁠ in generateFormulas).

Value

A formulas object containing all generated formulae.

Note

If any errors related to DCOM appear it might be necessary to terminate DataAnalysis (note that DataAnalysis might still be running as a background process). The ProcessCleaner application installed with DataAnalayis can be used for this.

See Also

generateFormulas for more details and other algorithms.


rickhelmus/patRoon documentation built on Nov. 22, 2024, 3:11 p.m.