adduct-utils | R Documentation |
Several utility functions to work with adducts.
GenFormAdducts()
MetFragAdducts()
as.adduct(x, format = "generic", isPositive = NULL, charge = NULL, err = TRUE)
calculateIonFormula(formula, adduct)
calculateNeutralFormula(formula, adduct)
x |
The object that should be converted. Should be a |
format |
A
|
isPositive |
A logical that specifies whether the adduct should be
positive. Should only be set when |
charge |
The final charge. Only needs to be set when |
err |
If |
formula |
A |
adduct |
An |
GenFormAdducts
returns a table with information on adducts
supported by GenForm
.
MetFragAdducts
returns a table with information on adducts
supported by MetFrag
.
as.adduct
Converts an object in to an adduct
object.
calculateIonFormula
Converts one or more neutral formulae to
adduct ions.
calculateNeutralFormula
Converts one or more adduct ions to
neutral formulae.
as.adduct("[M+H]+")
as.adduct("[M+H2]2+")
as.adduct("[2M+H]+")
as.adduct("[M-H]-")
as.adduct("+H", format = "genform")
as.adduct(1, isPositive = TRUE, format = "metfrag") # MetFrag adduct ID 1 --> returns [M+H]+
calculateIonFormula("C2H4O", "[M+H]+") # C2H5O
calculateNeutralFormula("C2H5O", "[M+H]+") # C2H4O
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.