compound_calcs: Wrapper function to calculate values associated with...

View source: R/compound_calcs.R

compound_calcsR Documentation

Wrapper function to calculate values associated with individual peaks/compounds

Description

Calculate a variety of typical values for FT-MS data associated with each peak/compound where empirical formula is available

Usage

compound_calcs(
  ftmsObj,
  calc_fns = c("calc_aroma", "calc_dbe", "calc_gibbs", "calc_kendrick", "calc_nosc",
    "calc_element_ratios"),
  calc_args = NULL
)

Arguments

ftmsObj

an object of class 'peakData' or 'compoundData', typically a result of as.peakData or mapPeaksToCompounds.

calc_fns

a character string specifying which calculations to perform. Available options are: calc_aroma, calc_dbe, calc_gibbs, calc_kendrick, calc_nosc, and calc_vankrev.

calc_args

a list with names corresponding to the available calc_fns. Each element is a named sub-list of extra arguments for the specified function. See examples for how to pass extra arguments.

Details

The calculations are as follows for each of the 'calc_fns':

calc_aroma calculates aromaticity index (AI) and modified aromaticity index (AI_Mod)
AI = \frac{1 + C - O - S - 0.5(N + P + H)}{C - O - S - N - P}
AI_Mod = \frac{1 + C - 0.5O - S - 0.5(N + P + H)}{C - 0.5*O - S - N - P}
calc_dbe calculates double bond equivalent (DBE) and double bond equivalent minux Oxygent (DBE_O)
DBE = 1 + C - O - S - 0.5*(N + P + H)
DBE_0 = 1 + C - O - S - 0.5(N + P + H) - O
calc_gibbs calculates Cox Gibbs Free Energy (GFE)
GFE = = 60.3 - 28.5NOSC
calc_kendrick calculates Kendrick Mass and Kendrick Defect
Kendrick-mass = (Observed-Mass)*(Nominal-Mass(base)/Exact-Mass(base))
Kendrick-defect = ceiling(Kendrick-mass) - Kendrick-mass
calc_nosc calculates nominal oxidation state of Carbon (NOSC)
NOSC = -(\frac{4C + H - 3N - 2O + 5P - 2S}{C}) + 4
calc_element_ratios calculates O:C, H:C, P:C, N:C, and N:P ratios

Value

an object of the same class as ftmsData with columns in e_meta giving the newly calculated values

Author(s)

Kelly Stratton

References

Koch, B. P., & Dittmar, T. (2006). From mass to structure: an aromaticity index for high‐resolution mass data of natural organic matter. Rapid communications in mass spectrometry, 20(5), 926-932.

Errata: Koch, B. P., & Dittmar, T. (2016). From mass to structure: an aromaticity index for high-resolution mass data of natural organic matter. Rapid communications in mass spectrometery, 30(1), 250. DOI: 10.1002/rcm.7433

LaRowe and Van Cappellen, 2011, "Degradation of natural organic matter: A thermodynamic analysis". Geochimica et Cosmochimica Acta. 75.

Hughey, C. A., Hendrickson, C. L., Rodgers, R. P., Marshall, A. G., & Qian, K. (2001). Kendrick mass defect spectrum: a compact visual analysis for ultrahigh-resolution broadband mass spectra. Analytical Chemistry, 73(19), 4676-4681.

Examples

library(ftmsRanalysis)

# default arguments
peakdata_processed = compound_calcs(examplePeakData)

# only calculate aromaticity and kendrick mass/defect
peakdata_processed = compound_calcs(examplePeakData, calc_fns = c("calc_aroma", "calc_kendrick"))

# Specify extra arguments for calc_kendrick and calc_dbe.  
calc_args = list('calc_kendrick' = list('base_compounds' = c('CH2', 'CO2', 'H2')), 
                 'calc_dbe' = list('valences' = data.frame('C'=5, 'H' = 4, 'S' = 5)))

peakdata_processed <- compound_calcs(examplePeakData, calc_args = calc_args)


EMSL-Computing/fticRanalysis documentation built on Dec. 18, 2024, 9:51 p.m.