matching-funs: Functions to match a peak-intensity table to KEGG database

Description Usage Arguments Value Examples

Description

Function mass.range.format builds mz ranges for a peak-intensity table using mz.ppm.converter if required.

Function matchingStage performs a fast matching of the peak-intensity table to KEGG database using adducts and fragments knowledge.

Function mz.ppm.converter transforms the user-defined tolerance from ppm to mz uncertainty or viceversa.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
mass.range.format(
  Peak.List,
  force.mass.range = TRUE,
  mass.range.type = "ppm.mode",
  mz.range,
  ppm = 10
)

matchingStage(
  Peak.List,
  force.mass.range = TRUE,
  mass.range.type = "ppm.mode",
  mz.range = NULL,
  ppm = 10,
  polarity = "positive",
  Add.List = NULL,
  Cpd.Add,
  do.Par = TRUE,
  nClust = 2
)

mz.ppm.converter(
  tol = 10,
  mzrange = 0.001,
  mz,
  conversion = c("ppm.to.mz", "mz.to.ppm")
)

Arguments

Peak.List

Data frame containing the LC-MS features. Columns should contain:

  • Peak.Id for a peak identifier

  • mz for a mass-to-charge ratio value

  • rt for the retention time

  • Intensities for each sample

force.mass.range

Logical. If TRUE, the m/z range is computed using the user-defined ppm tolerance or mz.range (Def: TRUE).

mass.range.type

A character indicating if the m/z range computation is performed using tolerance in ppm ("ppm.mode"). or m/z uncertainty ("mz.range") (Def: "ppm.mode").

mz.range

If mass.range.type = "mz.range", it indicates the m/z range uncertainty (i.e. mz.range = 0.001).

ppm

If mass.range.type = "ppm.mode", it indicates the tolerance in ppm (i.e. ppm = 10).

polarity

Acquisition mode of the study. It can be "positive" or "negative".

Add.List

List of adducts or fragments to consider.

Cpd.Add

Compound to adduct matrix. It can be built using CpdaddPreparation function. If NULL, the default information will be used.

do.Par

Logical. If parallel computing is required (Def: TRUE).

nClust

Number of clusters that may be used (Def: 2)

tol

Tolerance in ppm. Def: 10

mzrange

mz uncertainty. Def: 0.001

mz

mass-to-charge ratio for which the conversion is performed.

conversion

Direction of the conversion. Character vector containing some of: "ppm.to.mz", "mz.to.ppm"

Value

Function mass.range.format returns the input peak list with two additional columns containing the mzmin and mzmax values.

Function matchingStage returns a list containing the input peak list and the table of annotated peaks, containing all the potential KEGG candidates for each LC-MS feature.

Function mz.ppm.converter returns a vector of values containing uncertainty (if conversion="ppm.to.mz") or tolerance in ppm (if conversion="mz.to.ppm")

Examples

1
2
3
4
5
6
7
8
9
data("sample.keggDB")
Cpd.Add <- CpdaddPreparation(KeggDB = sample.keggDB, 
do.Par = FALSE)
data(sample.dataset)
Peak.List <- sample.dataset$Positive$Input
Annotated.List <- matchingStage(Peak.List = Peak.List, 
                                Cpd.Add = Cpd.Add,
                                polarity = "positive", 
                                do.Par = FALSE)

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