R/generics.R
, R/TP-logic.R
generateTPsLogic.Rd
Automatically calculate potential transformation products with metabolic logic.
generateTPsLogic(fGroups, minMass = 40, ...)
# S4 method for class 'featureGroups'
generateTPsLogic(fGroups, minMass = 40, adduct = NULL, transformations = NULL)
# S4 method for class 'featureGroupsSet'
generateTPsLogic(fGroups, minMass = 40, transformations = NULL)
A featureGroups
object for which TPs should be calculated.
A numeric
that specifies the minimum mass of calculated TPs. If below this mass it will be
removed.
Further arguments specified to the methods.
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
.
The adduct
argument is not supported for sets workflows, since the
adduct annotations will then always be used.
A data.frame
with transformation reactions to be used for calculating the TPs (see
details below). If NULL
, a default table from Schollee et al. is used (see references).
A transformationProducts
(derived) object containing all generated TPs.
This function uses metabolic logic to obtain transformation products. This function is called when calling generateTPs
with
algorithm="logic"
.
With this algorithm TPs are predicted from common (environmental) chemical reactions, such as hydroxylation, demethylation etc. The generated TPs result from calculating the mass differences between a parent feature after it underwent the reaction. While this only results in little information on chemical properties of the TP, an advantage of this method is that it does not rely on structural information of the parent, which may be unknown in a full non-target analysis.
The transformations
argument specifies custom rules to calculate
transformation products. This should be a data.frame
with the following columns:
transformation
The name of the chemical transformation
add
The elements that are added by this reaction (e.g. "O"
).
sub
The elements that are removed by this reaction (e.g. "H2O"
).
retDir
The expected retention time direction relative to the parent (assuming a reversed phase like LC
separation). Valid values are: -1 (elutes before the parent), 1 (elutes after the parent) or 0
(no significant change or unknown).
The algorithms using transformation reactions are directly based on the work done by Schollee et al. (see references).
Scholle2015patRoon
generateTPs
for more details and other algorithms.