R/14_tools4metaboliteIdentification.R
identify_peak.Rd
This function identifies a potential metabolite peak in a mass spectrometry dataset by matching MS1 and MS2 data to a reference spectral database.
identify_peak(
idx,
ms1.info,
ms2.info,
spectra.info,
spectra.data,
ppm.ms1match = 25,
ppm.ms2match = 30,
mz.ppm.thr = 400,
ms2.match.tol = 0.5,
rt.match.tol = 30,
ms1.match.weight = 0.25,
rt.match.weight = 0.25,
ms2.match.weight = 0.5,
total.score.tol = 0.5,
adduct.table,
candidate.num = 3,
fraction.weight = 0.3,
dp.forward.weight = 0.6,
dp.reverse.weight = 0.1,
remove_fragment_intensity_cutoff = 0,
...
)
The index of the peak to identify.
A data frame containing MS1 information such as m/z and retention time (RT).
A list containing MS2 spectra data for each peak.
A data frame containing metadata about the reference spectra in the database.
A list containing the MS2 spectra data from the reference database.
Numeric, mass accuracy threshold for MS1 matching in parts per million (ppm). Defaults to `25`.
Numeric, mass accuracy threshold for MS2 matching in ppm. Defaults to `30`.
Numeric, m/z threshold in ppm for matching MS1 and MS2. Defaults to `400`.
Numeric, tolerance for MS2 fragment ion matching. Defaults to `0.5`.
Numeric, retention time matching tolerance in seconds. Defaults to `30`.
Numeric, weight of MS1 matching in total score calculation. Defaults to `0.25`.
Numeric, weight of RT matching in total score calculation. Defaults to `0.25`.
Numeric, weight of MS2 matching in total score calculation. Defaults to `0.5`.
Numeric, threshold for the total score. Defaults to `0.5`.
A data frame containing the list of adducts to be considered for matching.
Numeric, the number of top candidates to retain for each peak. Defaults to `3`.
Numeric, weight for the MS2 fragmentation score. Defaults to `0.3`.
Numeric, weight for the forward dot product in MS2 matching. Defaults to `0.6`.
Numeric, weight for the reverse dot product in MS2 matching. Defaults to `0.1`.
Numeric, intensity cutoff for removing low-intensity MS2 fragments. Defaults to `0`.
Additional arguments passed to other methods.
A data frame containing the identified peak and its matching results, including total score, m/z error, RT error, and matching scores.
This function matches experimental MS1 and MS2 data with reference spectra in a spectral database. It calculates matching scores based on m/z, RT, and MS2 fragmentation pattern similarities. The function supports matching multiple adducts and considers weights for MS1, MS2, and RT matching in the total score calculation.
if (FALSE) { # \dontrun{
identified_peak <- identify_peak(
idx = 1,
ms1.info = ms1_data,
ms2.info = ms2_spectra,
spectra.info = reference_spectra_info,
spectra.data = reference_spectra_data
)
} # }