CpdaddPreparation: Function to compute a compound to adduct matrix

Description Usage Arguments Value Examples

View source: R/CpdaddPreparation.R

Description

Function CpdaddPreparation computes a matrix that allows the fast matching of a peak list to KEGG database from a data frame containing adducts and fragments information.

Usage

1
CpdaddPreparation(KeggDB = NULL, Info.Add = NULL, do.Par = TRUE, nClust = 2)

Arguments

KeggDB

Data frame containing a column named Compound with KEGG identifiers and a column named exact_mass with the corresponding exact masses. If NULL, the database available in mWISE will be used.

Info.Add

Data frame with adducts and in source fragments information. The columns should be:

  • name with the name of the adduct or fragment

  • nmol with the number of molecules (i.e., 2M+H: nmol=2 )

  • charge with the charge of the adduct or fragment (i.e., M+3H: charge=3)

  • massdiff with the mass difference (i.e., M+H: massdiff=1.007276)

  • quasi with a 1 if the adduct should be considered as quasi-molecular and a 0, otherwise (Optional)

  • polarity with a character vector indicating the polarity of the adduct or fragment. The options are "positive" or "negative"

do.Par

TRUE if parallel computing is required. Def: TRUE.

nClust

Number of clusters that may be used. Def: Number of clusters - 1.

Value

Function CpdaddPreparation returns a data frame with the mass-to-charge ratio of all the KEGG compounds and adducts or fragments provided in Info.Add.

Examples

1
2
data("sample.keggDB")
Cpd.Add <- CpdaddPreparation(KeggDB = sample.keggDB, do.Par = FALSE)

b2slab/mWISE documentation built on Feb. 2, 2022, 12:24 a.m.