Calculate the elementary compositions from an exact mass or isotope pattern, obtained e.g. by FTICR or TOF mass spectrometers.
Usage
decomposeIsotopes(
masses,
intensities,
ppm = 2,
mzabs = 1e-04,
elements = NULL,
filter = NULL,
z = 0,
maxisotopes = 10,
minElements = "C0",
maxElements = "C999999"
)
decomposeMass(
mass,
ppm = 2,
mzabs = 1e-04,
elements = NULL,
filter = NULL,
z = 0,
maxisotopes = 10,
minElements = "C0",
maxElements = "C999999"
)
isotopeScore(molecule, masses, intensities)
Arguments
- masses
A vector of masses (or m/z values) of an isotope cluster.
- intensities
Absolute or relative intensities of the
masses
peaks.- ppm
Allowed deviation of hypotheses from given mass.
- mzabs
Absolute deviation in Dalton (mzabs and ppm will be added).
- elements
List of allowed chemical elements, defaults to CHNOPS. See
initializeElements
.- filter
NYI, will be a selection of DU, DBE and Nitrogen rules.
- z
Charge z of m/z peaks for calculation of real mass, keep z=0 for auto-detection.
- maxisotopes
Maximum number of isotopes shown in the resulting molecules.
- minElements
Molecular formula, defining lower boundaries of allowed elements.
- maxElements
Molecular formula, defining upper boundaries of allowed elements.
- mass
A single mass (or m/z value).
- molecule
An initialized molecule as returned by getMolecule() or the decomposeMass() and decomposeIsotopes() functions.
Value
A list of molecules, which contain the sub-lists `formulas` potential formulas, `exactmass` exact mass of each hypothesis (not monoisotopic), `score` calculated score, `isotopes` a list of isotopes.
Examples
# query some measurement values from a Glutamate peak which will return two
# suggested/potential sum formulas
m <- c(147.0529, 148.0563, 149.0612)
i <- c(0.91, 0.06, 0.01)
mol <- decomposeIsotopes(m, i, maxisotopes = 3)
getFormula(mol)
#> [1] "C5H9NO4" "C3H17P2S"
# Rdisop returns the scores (how well does the exact data match the measured
# data) in a normalized fashion, but you can calculate the raw scores
getScore(mol)
#> [1] 1.000000e+00 1.911174e-73
isotopeScore(mol, m, i)
#> [[1]]
#> [1] 3.799128e-10
#>
# using a 5 mDa window, the number of potential candidates is increased to 26
getFormula(decomposeIsotopes(m, i, mzabs = 0.005))
#> [1] "C5H9NO4" "C3H7N4O3" "C6H5N5" "C3H17P2S" "C8H7N2O"
#> [6] "CH12N2O4P" "C2H11O7" "C3H15O2S2" "C4H10N3OP" "C6H13P2"
#> [11] "C2H8N6P" "C6H12O2P" "C2H13NO4S" "CH5N7O2" "C2H16NP3"
#> [16] "H19O2S3" "CH13N3OS2" "C2H15NO2P2" "C6H11O2S" "C2H14NO2PS"
#> [21] "CH134" "H21P2S2" "C3H9N5S" "H9N3O6" "H11N4O3S"
#> [26] "H13N4OP2"
# elemental ranges can be specified to affect the result
# use maxElements to exclude all of the above suggestions containing more
# than one S and/or one P.
getFormula(decomposeIsotopes(m, i, mzabs = 0.005, maxElements = "S1P1"))
#> [1] "C5H9NO4" "C3H7N4O3" "C6H5N5" "C8H7N2O" "CH12N2O4P"
#> [6] "C2H11O7" "C4H10N3OP" "C2H8N6P" "C6H12O2P" "C2H13NO4S"
#> [11] "CH5N7O2" "C6H11O2S" "C2H14NO2PS" "CH134" "C3H9N5S"
#> [16] "H9N3O6" "H11N4O3S"