formula_adduct_calculator {IDSL.UFA}R Documentation

Formula Adduct Calculator

Description

This function takes a formula and a vector of ionization pathways and returns the adduct formulas.

Usage

formula_adduct_calculator(molecular_formula, IonPathways)

Arguments

molecular_formula

molecular formula

IonPathways

A vector of ionization pathways. Pathways should be like [Coeff*M+ADD1-DED1+...] where "Coeff" should be an integer between 1-9 and ADD1 and DED1 may be ionization pathways. ex: 'IonPathways <- c("[M]+", "[M+H]+", "[2M-Cl]-", "[3M+CO2-H2O+Na-KO2+HCl-NH4]-")'

Value

A vector of adduct formulas

Examples

molecular_formula = "C15H10O7"
IonPathways = c("[M+]","[M+H]","[M+H20+H]","[M+Na]")
Formula_adducts <- formula_adduct_calculator(molecular_formula, IonPathways)

[Package IDSL.UFA version 2.0 Index]