Title: | Decomposition of Isotopic Patterns |
---|---|
Description: | In high resolution mass spectrometry (HR-MS), the measured masses can be decomposed into potential element combinations (chemical sum formulas). Where additional mass/intensity information of respective isotopic peaks is available, decomposition can take this information into account to better rank the potential candidate sum formulas. To compare measured mass/intensity information with the theoretical distribution of candidate sum formulas, the latter needs to be calculated. This package implements fast algorithms to address both tasks, the calculation of isotopic distributions for arbitrary sum formulas (assuming a HR-MS resolution of roughly 30,000), and the ranked list of sum formulas fitting an observed peak or isotopic peak set. |
Authors: | Anton Pervukhin [aut], Steffen Neumann [aut, cre] , Jan Lisec [ctb] , Miao Yu [ctb] |
Maintainer: | Steffen Neumann <[email protected]> |
License: | GPL-2 |
Version: | 1.67.3 |
Built: | 2024-11-19 03:06:52 UTC |
Source: | https://github.com/bioc/Rdisop |
Simple arithmetic modifications of sum formulas.
addMolecules(formula1, formula2, elements = NULL, maxisotopes = 10) subMolecules(formula1, formula2, elements = NULL, maxisotopes = 10)
addMolecules(formula1, formula2, elements = NULL, maxisotopes = 10) subMolecules(formula1, formula2, elements = NULL, maxisotopes = 10)
formula1 |
Sum formula (can be a vector). |
formula2 |
Sum formula. |
elements |
List of allowed chemical elements, defaults to full periodic system of elements. See |
maxisotopes |
Maximum number of isotopes shown in the resulting molecules. |
'addMolecules' adds the second argument to the first. 'subMolecules' subtracts the second argument from the first. This can be useful to revert e.g. adduct/fragment formation found in ESI mass spectrometry, or to mimic simple chemical reactions. No chemical checks are performed.
The input vector formula1 will be converted into molecule objects similar
to function getMolecule
. However, the results will be amended
or reduced by formula2.
# Remove the proton-adduct from Ethanol subMolecules("C2H7O", "H")
# Remove the proton-adduct from Ethanol subMolecules("C2H7O", "H")
Calculate the elementary compositions from an exact mass or isotope pattern, obtained e.g. by FTICR or TOF mass spectrometers.
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)
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)
masses |
A vector of masses (or m/z values) of an isotope cluster. |
intensities |
Absolute or relative intensities of the |
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 |
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. |
Sum formulas are calculated which explain the given mass or isotope pattern.
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.
Steffen Neumann <[email protected]>
For a description of the underlying IMS see citation("Rdisop")
# 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) # 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) isotopeScore(mol, m, i) # using a 5 mDa window, the number of potential candidates is increased to 26 getFormula(decomposeIsotopes(m, i, mzabs = 0.005)) # 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"))
# 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) # 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) isotopeScore(mol, m, i) # using a 5 mDa window, the number of potential candidates is increased to 26 getFormula(decomposeIsotopes(m, i, mzabs = 0.005)) # 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"))
Parse the sum formula and calculate the theoretical exact mass and the isotope distribution for an approximate MS resolution of 20,000 (i.e. not providing the isotopic fine structure).
getMolecule(formula, elements = NULL, z = 0, maxisotopes = 10) getMass(molecule) getMonoisotopic(molecule) getIsotope(molecule, index) getFormula(molecule) getScore(molecule) getValid(molecule)
getMolecule(formula, elements = NULL, z = 0, maxisotopes = 10) getMass(molecule) getMonoisotopic(molecule) getIsotope(molecule, index) getFormula(molecule) getScore(molecule) getValid(molecule)
formula |
Sum formula. |
elements |
List of allowed chemical elements, defaults to full periodic system of elements. See |
z |
Charge z of molecule for exact mass calculation. |
maxisotopes |
Maximum number of isotopes shown for the resulting molecule. |
molecule |
An initialized molecule as returned by getMolecule() or the decomposeMass() and decomposeIsotope() functions. |
index |
Return the n-th isotope mass/abundance pair(s) of the molecule |
getMolecule()
will parse the sum formula and calculate the
exact mass and the isotope distribution.
The exact mass is the mass of the most abundant isotope and is not
identical with the monoisotopic mass. The latter can be extracted using
the function 'getMonoisotopic()'. This function can also be supplied with
a vector of chemical formulas directly (in case that the isotopic
distribution is of no interest).
Since of version 1-65-3, if a charge is specified, the exact mass of the
molecule will be reduced or increased by n-times the electron mass
(depending on the sign). Also, isotopic masses will additionally be
divided by the charge specified to reflect what would be measured in HR-MS.
A list containing the elements 'formula' (repeated sum formula), 'mass' exact mass of molecule, 'score' probability, for given molecules a dummy value which is always 1.0, 'valid' result of neutrogen rule check, 'isotopes' a list of isotope masses and abundances.
Steffen Neumann <[email protected]>
For a description of the underlying IMS see citation("Rdisop")
# Ethanol getMolecule("C2H6O")
# Ethanol getMolecule("C2H6O")
Initialize the information about name, mass and isotopes. To reduce the number of decomposition hypotheses, subsets of elements can be created.
initializeElements(names) .getElement(name, elements = NULL) initializeCHNOPS() initializeCHNOPSMgKCaFe() initializeCHNOPSNaK() initializePSE() initializeCharges()
initializeElements(names) .getElement(name, elements = NULL) initializeCHNOPS() initializeCHNOPSMgKCaFe() initializeCHNOPSNaK() initializePSE() initializeCharges()
names |
Vector of element names within PSE. |
name |
Chemical element name (abbr.). |
elements |
Character vector of chemical element names. |
These functions return full, pre-defined or user-defined (sub-) lists of elements.
A list with the elements 'name' repeated sum formula, 'mass' nominal mass of molecule, 'isotope' a list of isotopes. The function 'initializeCharges' is special, since it allows to parse charges as shown in examples.
Steffen Neumann <[email protected]>
For a description of the underlying IMS see citation("Rdisop"). Isotope patterns were obtained through wikipedia.org
initializeCHNOPS() getMolecule("H3O+", elements=c(initializeCHNOPS(),initializeCharges()))
initializeCHNOPS() getMolecule("H3O+", elements=c(initializeCHNOPS(),initializeCharges()))
isotope information.
isotopes
isotopes
A data frame of 4 columns for 398 chemical isotopes.
The element name.
The isotope name.
The absolute mass of this isotope in Dalton.
The absolute abundance of this isotope.
Isotope patterns were obtained through wikipedia.org.
Monoisotopic mass information..
mono_masses
mono_masses
A named vector containing for each chemical element the most abundant isotope mass.
Isotope patterns were obtained through wikipedia.org.