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')
#> # A tibble: 2 × 7
#> MF `H/C > 0.2` `H/C < 3.1` `N/C < 1.3` `O/C < 1.2` `P/C < 0.3` S/C < …¹
#> <chr> <lgl> <lgl> <lgl> <lgl> <lgl> <lgl>
#> 1 H2O NA NA NA NA NA NA
#> 2 C12H22O11 TRUE TRUE NA TRUE NA NA
#> # … with abbreviated variable name ¹`S/C < 0.8`
## Using the 'extreme' ratio ranges
c('H2O','C12H22O11') %>%
elementFrequencies() %>%
elementRatios() %>%
elementRatioCheck(range = 'extreme')
#> # A tibble: 2 × 7
#> MF `H/C < 0.1` `H/C > 6` `N/C > 1.3` `O/C > 1.2` `P/C > 0.3` S/C > 0.…¹
#> <chr> <lgl> <lgl> <lgl> <lgl> <lgl> <lgl>
#> 1 H2O NA NA NA NA NA NA
#> 2 C12H22O11 FALSE FALSE NA FALSE NA NA
#> # … with abbreviated variable name ¹`S/C > 0.8`