Learn R Programming

MetaDBparse (version 2.0.0)

checkAdductRule: Check for combined adduct rules

Description

Sometimes multiple rules apply - this function checks if they all apply as noted in the rule table.

Usage

checkAdductRule(adduct_rule_scores, adduct_table)

Arguments

adduct_rule_scores

Scores from countAdductRuleMatches.

adduct_table

Adduct table

Value

Table with TRUE/FALSE for each structure and adduct

See Also

as.data.table

Examples

Run this code
# NOT RUN {
 iatom = smiles.to.iatom(c('OC[C@H]1OC(O)[C@H](O)[C@H](O)[C@H]1O'))
 data(adduct_rules)
 data(adducts)
 addScore <- countAdductRuleMatches(iatom, adduct_rules = adduct_rules)
 checkAdductRule(addScore, adduct_table = adducts)
# }

Run the code above in your browser using DataLab