Reads mzXML files and extracts relevant MS2 spectra information.

read_mzxml(file, threads = 3, mode = c("inMemory", "onDisk"))

Arguments

file

A character vector specifying the path(s) to the mzXML file(s).

threads

An integer, indicating the number of cores to use (default: 3).

mode

A character string, either "inMemory" or "onDisk" specifying the mode of reading data. Default is "inMemory".

Value

A list containing processed MS2 spectra information for each provided mzXML file. Each element of the list contains two components:

  • info: A data frame with columns for the name (composed of m/z and retention time), m/z, retention time, and file name.

  • spec: A data frame where each row represents a fragment ion peak, with columns for m/z and intensity values.

Examples

# Assuming 'sample.mzXML' is the path to your mzXML file.
# mzxml_data <- read_mzxml('sample.mzXML')