getPredicted: Get predicted formulas and adducts from m/z value

Description Usage Arguments Value See Also Examples

View source: R/oxy-from_formula.R

Description

Wrapper function to predict formulas and then consider adducts as well.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
getPredicted(
  mz,
  ppm = 2,
  mode = "positive",
  rules = c("senior", "lewis", "hc", "chnops", "nops"),
  elements = c("C", "H", "N", "O", "P", "S"),
  search = c("PubChem", "ChemSpider"),
  detailed = TRUE,
  calc_adducts = adducts[Ion_mode == mode, ]$Name,
  adduct_table = adducts
)

Arguments

mz

M/z of interest

ppm

Error margin in parts per million, Default: 2

mode

M/z found in positive or negative mode?, Default: 'positive'

rules

Which golden rules to apply?, Default: c("senior", "lewis", "hc", "chnops", "nops")

elements

Which elements to consider?, Default: c("C", "H", "N", "O", "P", "S")

search

Check the found formulas on PubChem or ChemSpider?, Default: c("PubChem", "ChemSpider")

detailed

Look up details like description etc. if hit found? Makes things slower!, Default: TRUE

calc_adducts

Which adducts to consider?, Default: adducts[Ion_mode == mode, ]$Name

adduct_table

Adduct table to use, referred to by 'calc_adducts'. Allows use for custom 'adducts' such as in-source fragments etc.

Value

Table of found matches and associated info

See Also

rbindlist check_chemform

Examples

1
2
3
4
## Not run: getPredicted(mz = 170, ppm = 2, mode = "positive",
rules = c("hc", "chnops", "nops"),
elements = c("C","H","O"))
## End(Not run)

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