DecomposeMass | R Documentation |
DecomposeMass
calculates possible sum formulas from a list of fragment
masses.
DecomposeMass(
targetMass,
tolerance,
atomMass,
atomLabel,
elementIndex1,
elementIndex2,
filterMinVal,
filterMaxVal
)
targetMass |
Target mass. |
tolerance |
Tolerance of target mass. |
atomMass |
Numeric vector with fragment masses. |
atomLabel |
String Vector of fragment labels. |
elementIndex1 |
Element index for count filters, first element index for ratio filters. |
elementIndex2 |
-1 for count filters, second element for ratio filters. |
filterMinVal |
Counts or ratios that are smaller than this value are filtered out. |
filterMaxVal |
Counts or ratios that are larger than this value are filtered out. |
Calculates possible sum formulas that amount to target mass +/- tolerance given a target mass, mass tolerance and a list of fragment masses. Filters specifying min/max values for absolute counts of a fragment or for ratios between fragments can be specified in order to reduce the amount of results and restrict hits to chemically reasonable sum formulae. Typically atomMass and atomLabels are the masses/labels of elements but you are free to use whatever you like (isotopes, amino acids, common fragments etc.).
List with sum formula strings and the mass and mass errors of the sum formulas.
Other Chemistry functions:
DecomposeMass2()
,
GetIsotopePattern2()
,
GetIsotopePattern()
,
GetMoleculeMass()
targetMass = 314
tolerance = 0.5
atomLabel = c("C", "H", "O")
n = length(atomLabel)
atomMass = rep(0, n)
for (i in 1:n) {
atomMass[i] = GetMoleculeMass(atomLabel[i])
}
elementIndex1 = seq(along.with = atomLabel)-1
elementIndex2 = rep(-1, n)
filterMinVal = c(20, 20, 0)
filterMaxVal = c(22, 40, 5)
DecomposeMass(targetMass, tolerance, atomMass, atomLabel, elementIndex1,
elementIndex2, filterMinVal, filterMaxVal)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.