MSbox

Common MS tools for analytical chemistry

Installation

## stable version
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, mz('C7H7O4', z = -1)) # with ion formula, 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
  1. Calculate tanimoto similarities of different compounds

example

x <- data.frame(Samp1=c(0,0,0,1,1,1,0,0,1), Samp2=c(1,1,1,1,1,1,0,0,1))
tanimoto(x)