chem_formula_2_adducts: Get adducts and isotopes for chemical formulas

Description Usage Arguments Value Examples

View source: R/chem_formula_2_adducts.R

Description

Calculates chemical formulas, mz values and theoretical abundances of isotope peaks of adducts of chemical formulas. Based on functions in R package enviPat.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
chem_formula_2_adducts(
  chem.forms,
  isotopes,
  adducts,
  adduct.names = NULL,
  ion.mode = "positive",
  rel_to = 0,
  threshold = 20,
  verbose = TRUE
)

Arguments

chem.forms

Vector of character strings with chemical formulas.

isotopes

dataframe with stable isotopes (see isotopes)

adducts

dataframe with common adducts (see adducts).

adduct.names

Character vector with adducts to be calculated (see adducts for common adducts). If set to NULL, ion.mode needs to be specified.

ion.mode

Character of ionisation mode ("positive", "negative"). If positive adduct.names is set to c("M+H", "M+Na", "M+K"), if negative adduct.names is set to c("M-H", "M+Cl").

rel_to

Integer (0, 1, 2, 3 or 4). Probability definition (see isopattern).

threshold

Numeric (1-100). Probability below which isotope peaks can be omitted (see isopattern).

verbose

Logical. Print out additional information.

Value

data frame with the following information about each feature:

Examples

1
2
3
4
5
6
7
8
9
library(enviPat)
data("isotopes")
data("adducts")

chem_formula_2_adducts(chem.forms = "C6H12O6",
                       adduct.names = c("M+H", "M+Na", "M+2H"),
                       adducts = adducts,
                       isotopes = isotopes,
                       threshold = 5)

szymczak-lab/preprocessHighResMS documentation built on Oct. 6, 2020, 12:50 a.m.