elementRatioCheck: Element ratio checks

View source: R/golden_rules.R

elementRatioCheckR Documentation

Element ratio checks

Description

Element ratio checks based on Rules 4 and 5 of the Seven Golden Rules by Kind et al 2007.

Usage

elementRatioCheck(element_ratios, range = c("common", "extended", "extreme"))

Arguments

element_ratios

a tibble containing molecular formula elemental ratios

range

the ratio threshold ranges as defined by Rules 4 and 5 of the Seven Golden Rules by Kind et al 2007

Value

A tibble containing results of the element ratio checks. The column headers specify the check criteria. TRUE is returned where relevant checks are passed and FALSE where not. NA is returned where the check is not relevant.

References

Kind, T. and Fiehn, O., 2007. Seven Golden Rules for heuristic filtering of molecular formulas obtained by accurate mass spectrometry. BMC bioinformatics, 8(1), pp.1-20.

Examples

## Using the 'common' ratio ranges
c('H2O','C12H22O11') %>% 
  elementFrequencies() %>% 
  elementRatios() %>% 
  elementRatioCheck(range = 'common')

## Using the 'extreme' ratio ranges
c('H2O','C12H22O11') %>% 
  elementFrequencies() %>% 
  elementRatios() %>% 
  elementRatioCheck(range = 'extreme')

jasenfinch/mzAnnotation documentation built on Feb. 25, 2023, 1:27 a.m.