R/18_mzIdentify_mass_dataset.R
mzIdentify_mass_dataset.Rd
This function identifies potential metabolites in a `mass_dataset` object by matching MS1 data (m/z) with a reference spectral database. Optionally, retention time (RT) can also be used for more accurate matching.
A `mass_dataset` object that contains MS1 data.
A numeric value specifying the mass accuracy threshold for MS1 matching in parts per million (ppm). Defaults to `25`.
A numeric value specifying the retention time matching tolerance in seconds. Defaults to `30`. If set to a large value (e.g., greater than `10000`), RT matching will not be performed.
A character string specifying the ionization mode. It can be either `"positive"` or `"negative"`. Defaults to `"positive"`.
A character string specifying the chromatographic column type, either `"hilic"` (hydrophilic interaction) or `"rp"` (reverse phase). Defaults to `"hilic"`.
A numeric value specifying the number of top candidates to retain per feature. Defaults to `3`.
A `databaseClass` object containing the reference spectral database for annotation.
An integer specifying the number of threads to use for parallel processing. Defaults to `3`.
A data frame containing the metabolite identification results, including m/z error, RT error, matching scores, and information about the identified compounds.
This function performs MS1-based matching between the experimental data in the `mass_dataset` object and a reference spectral database. The matching process is based on mass-to-charge ratio (m/z) and optionally retention time (RT). The function supports both positive and negative ionization modes and can work with either HILIC or reverse-phase columns.
if (FALSE) { # \dontrun{
# Perform MS1-based metabolite identification in a mass_dataset object
identification_result <- mzIdentify_mass_dataset(
object = mass_object,
ms1.match.ppm = 20,
rt.match.tol = 30,
polarity = "positive",
database = reference_database,
threads = 4
)
} # }