Element count checks based on Rule 6 of the Seven Golden Rules by Kind et al 2007.
Arguments
- element_frequencies
a tibble containing element frequencies as returned by
elementFrequencies()
Value
A tibble containing results of the element count 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
elementFrequencies(c('H2O','C12H22O11')) %>%
elementCountCheck()
#> # A tibble: 2 × 6
#> MF NOP all >= 3; N < 11, O < 22, P < …¹ NOPS …² NOS a…³ OPS a…⁴ PSN a…⁵
#> <chr> <lgl> <lgl> <lgl> <lgl> <lgl>
#> 1 H2O NA NA NA NA NA
#> 2 C12H22O11 NA NA NA NA NA
#> # … with abbreviated variable names ¹`NOP all >= 3; N < 11, O < 22, P < 6`,
#> # ²`NOPS all >= 1; N < 10, O < 20, P < 4, S < 3`,
#> # ³`NOS all >= 6; N < 19, O < 14, S < 8`,
#> # ⁴`OPS all >= 1; O < 14, P < 3, S < 3`, ⁵`PSN all >= 1; P < 3, S < 3, N < 4`