Skip to contents

Calculate the molecular mass for a given mass to charge ratio, adduct, isotope and transformation.

Usage

calcM(
  mz,
  adduct = "[M+H]1+",
  isotope = NA,
  transformation = NA,
  adduct_rules_table = adduct_rules(),
  isotope_rules_table = isotope_rules(),
  transformation_rules_table = transformation_rules()
)

Arguments

mz

mass to charge ratio

adduct

adduct to apply

isotope

isotope to apply

transformation

transformation to apply

adduct_rules_table

tibble containing available adduct formation rules. Defaults to adduct_rules().

isotope_rules_table

tibble containing available isotopic rules. Defaults to isotope_rules().

transformation_rules_table

tibble containing available transformation rules. Defaults to transformation_rules().

Examples

calcM(
  mz = 118.08626,
  adduct = '[M+H]1+',
  isotope = '13C',
  transformation = 'M - [O] + [NH2]')
#> [1] 116.05182