Common mass spectrometry tools for minimalist MS users.
## minimal version
install.packages('MSbox')
- Check element isotopes
examples:
E_iso('C') # element symbol, case insensitive
E_iso('Carbon') # element full name, case insensitive
E_iso('carBon') # element full name, case insensitive
- Get extra molecular information based on compound name
If the queried information is not found for a compounds, it will assign "unknown" to that compound information:
describe('malic acid') # get formula by default
describe(c('malic acid', 'citric acid', 'tartaric acid'), representation = "smiles") # get smiles
- Calculate monoisitopic mass
example:
mass('C7H6O1') # case insensitive
mass(c('K1', 'C5H8', 'nA20')) # vector input
- Calculate exact m/z values
example:
mz('C7H7O4', z = -1) # case insensitive
mz(c('C7H7O4', 'c1'), z = -1) # vector input
- Calculate the mass accuracy of measured m/z
examples:
ppm(155.03383, 155.03388) # with m/z value
ppm(155.03383, .03388) # lazy input when the integer parts of m and t are the same
ppm(155.03383, .03388, lazy = F) # lazy input disabled
ppm(155.03384, mz('C7H7O4', z = 1)) # with ion formula
- Calculate isotope labelled molecular mass
example
Iso_mass(F = 'C7H6O4', iso = '[13]C2[2]H3') # Two 13C and three 2H are labled. Case insensitive.
- Calculate isotope labelled m/z
example
Iso_mz(F = 'C7H6O4', iso = '[13]C2[2]H3', z = 1) # Two 13C and three 2H are labled. Case insensitive.
- Check if an m/z value originates from possible contaminant
examples
contam(33.0335, ppm = 10, mode = '+')
contam(44.998, ppm = 10, mode = '-')
- Calculate common adduct ions in pos or neg ion mode
examples
adduct('C1H4', mode = '-') # case insensitive
adduct('C1H4', mode = '+') # case insensitive
- Annotate the m/z values according to m/z value matching
what(1034.556, mode = "+", ppm = 3) # single m/z value
mzs <- rep(133.014, 300)
what(mzs, "-") # multiple m/z values, default ppm = 5