getFormula: Find possible formulas for a given m/z

Description Usage Arguments Value See Also Examples

View source: R/oxy-from_formula.R

Description

Using m/z and isotope distributions for each element, find possible molecular formulas within allowed error margin

Usage

1
2
3
4
5
6
7
getFormula(
  mz,
  add_name,
  adducts,
  ppm,
  elements = c("C", "H", "N", "O", "P", "S")
)

Arguments

mz

M/z of interest

add_name

Which adducts to consider

adducts

Full adduct table (data(adducts) loads it into memory)

ppm

Allowed error margin in parts per million

elements

Considered elements in formula generation, Default: c("C", "H", "N", "O", "P", "S")

Value

Table with found formulas, their adduct and isotope percentage.

See Also

str_match initializeCHNOPS

Examples

1
getFormula(170, "[M+H]1+", adducts, 3)

MetaDBparse documentation built on May 3, 2021, 5:09 p.m.