MSbox

CRAN status CRAN downloads

Common mass spectrometry tools for minimalist MS user (short function names, less paramers, and ease to use).

Installation

## stable version v1.0
install.packages('MSbox')

Functions

  1. 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
  1. Calculate monoisitopic mass

example:

M_mass('C7H6O1') # case insensitive
  1. Calculate exact m/z values

example:

mz('C7H7O4', z = -1) # case insensitive
  1. 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
  1. Calculate isotope labelled molecular mass

example

Iso_mass(F = 'C7H6O4', iso = '[13]C2[2]H3') # Two 13C and three 2H are labled. Case insensitive.
  1. 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.
  1. Check if an m/z value originates from possible contaminant

examples

contam(33.0335, ppm = 10, mode = '+')
contam(44.998, ppm = 10, mode = '-')
  1. Calculate common adduct ions in pos or neg ion mode

examples

adduct('C1H4',mode = '-') # case insensitive
adduct('C1H4',mode = '+') # case insensitive