metIdentification: Metabolite Identification Using MS1 and MS2 Data

View source: R/14_tools4metaboliteIdentification.R

metIdentificationR Documentation

Metabolite Identification Using MS1 and MS2 Data

Description

This function performs metabolite identification by matching MS1 and MS2 data from a given experiment with a reference spectral database. The function supports matching based on mass-to-charge ratio (m/z), retention time (RT), and MS2 fragmentation patterns.

Usage

metIdentification(
  ms1.info,
  ms2.info,
  polarity = c("positive", "negative"),
  ce = "30",
  database,
  ms1.match.ppm = 25,
  ms2.match.ppm = 30,
  mz.ppm.thr = 400,
  ms2.match.tol = 0.5,
  rt.match.tol = 30,
  column = "rp",
  ms1.match.weight = 0.25,
  rt.match.weight = 0.25,
  ms2.match.weight = 0.5,
  total.score.tol = 0.5,
  candidate.num = 3,
  adduct.table,
  threads = 3,
  fraction.weight = 0.3,
  dp.forward.weight = 0.6,
  dp.reverse.weight = 0.1,
  remove_fragment_intensity_cutoff = 0
)

Arguments

ms1.info

A data frame containing MS1 information, including m/z, retention time (RT), and other relevant data.

ms2.info

A list containing MS2 fragmentation spectra corresponding to the MS1 data.

polarity

A character string specifying the ionization mode. It can be either '"positive"' or '"negative"'. Defaults to '"positive"'.

ce

A character string specifying the collision energy for MS2 matching. Defaults to ''30''. Can be set to '"all"' to use all available collision energies.

database

A 'databaseClass' object containing the reference spectral database.

ms1.match.ppm

A numeric value specifying the mass accuracy threshold for MS1 matching in parts per million (ppm). Defaults to '25'.

ms2.match.ppm

A numeric value specifying the mass accuracy threshold for MS2 matching in ppm. Defaults to '30'.

mz.ppm.thr

A numeric value specifying the m/z threshold in ppm for matching MS1 and MS2. Defaults to '400'.

ms2.match.tol

A numeric value specifying the tolerance for MS2 fragment ion matching. Defaults to '0.5'.

rt.match.tol

A numeric value specifying the retention time matching tolerance in seconds. Defaults to '30'.

column

A character string specifying the chromatographic column type, either '"hilic"' (hydrophilic interaction) or '"rp"' (reverse phase). Defaults to '"rp"'.

ms1.match.weight

A numeric value specifying the weight of MS1 matching in the total score calculation. Defaults to '0.25'.

rt.match.weight

A numeric value specifying the weight of RT matching in the total score calculation. Defaults to '0.25'.

ms2.match.weight

A numeric value specifying the weight of MS2 matching in the total score calculation. Defaults to '0.5'.

total.score.tol

A numeric value specifying the threshold for the total score. Defaults to '0.5'.

candidate.num

A numeric value specifying the number of top candidates to retain per feature. Defaults to '3'.

adduct.table

A data frame containing adduct information for metabolite matching.

threads

An integer specifying the number of threads to use for parallel processing. Defaults to '3'.

fraction.weight

A numeric value specifying the weight for the MS2 fragmentation score. Defaults to '0.3'.

dp.forward.weight

A numeric value specifying the weight for the forward dot product in MS2 matching. Defaults to '0.6'.

dp.reverse.weight

A numeric value specifying the weight for the reverse dot product in MS2 matching. Defaults to '0.1'.

remove_fragment_intensity_cutoff

A numeric value specifying the intensity cutoff for removing fragments in MS2 matching. Defaults to '0'.

Details

This function identifies metabolites by comparing the experimental MS1 and MS2 data with a reference spectral database. The matching process considers m/z, retention time, and MS2 fragmentation patterns. Collision energies (CE) can be specified, or all available CEs in the database can be used.

The function supports parallel processing using multiple threads to speed up the metabolite identification process.

Value

A list containing the metabolite identification results, including m/z error, RT error, MS2 matching scores, and information about the identified compounds.

Author(s)

Xiaotao Shen xiaotao.shen@outlook.com

Examples

## Not run: 
# Perform metabolite identification using MS1 and MS2 data
identification_result <- metIdentification(
  ms1.info = ms1_data,
  ms2.info = ms2_spectra,
  polarity = "positive",
  ce = "30",
  database = reference_database,
  ms1.match.ppm = 20,
  ms2.match.ppm = 25,
  threads = 4
)

## End(Not run)


tidymass/metid documentation built on Oct. 8, 2024, 10:32 p.m.