construction: Consensus structural classifications for putative ionisation...

constructionR Documentation

Consensus structural classifications for putative ionisation products

Description

Perform consensus structural classification for molecular formulas assigned to m/z features from electrospray ionisation mass spectrometry approaches.

Usage

construction(
  x,
  library_path = tempdir(),
  db = "kegg",
  organism = character(),
  threshold = 66,
  adduct_rules_table = adduct_rules(),
  classyfireR_cache = NULL
)

## S4 method for signature 'tbl_df'
construction(
  x,
  library_path = paste0(tempdir(), "/construction_library"),
  db = "kegg",
  organism = character(),
  threshold = 66,
  adduct_rules_table = adduct_rules(),
  classyfireR_cache = NULL
)

## S4 method for signature 'Assignment'
construction(
  x,
  library_path = tempdir(),
  db = "kegg",
  organism = character(),
  threshold = 66,
  classyfireR_cache = NULL
)

Arguments

x

The molecular formulas and adducts to search. This should either be a tibble containing two character columns named MF and Adduct or and S4 object of class Assignment.

library_path

the target file path for the classification library in which to store consensus classification data

db

the databases to search. This can either be kegg and/or pubchem.

organism

the KEGG organism ID. This is Ignored if argument db is set to pubchem

threshold

the percentage majority threshold for consensus classification

adduct_rules_table

a data frame containing the adduct formation rules. The defaults is mzAnnotation::adduct_rules().

classyfireR_cache

the file path for a classyfireR cache. See the documentation of classyfireR::get_classification for more details.

Value

If argument x is a tibble, then a tibble is returned containing the consensus structural classifications. If argument x is an object of S4 class Assignment, and object of S4 class Construction is returned.

Examples

x <- tibble::tibble(MF = c('C12H22O11','C4H6O5'),
                    Adduct = c('[M+Cl]1-','[M-H]1-'))
structural_classifications <- construction(x)

structural_classifications

jasenfinch/construction documentation built on Sept. 2, 2023, 8:14 a.m.