extractMS2spectra {CluMSID} | R Documentation

## Extract MS2 spectra from raw data files

### Description

`extractMS2spectra()` is used to extract MS2 spectra from raw data files, e.g. mzXML files.

### Usage

    extractMS2spectra(MSfile, min_peaks = 2, recalibrate_precursor = FALSE,
        RTlims = NULL)

### Arguments

`MSfile` | An LC-MS/MS raw data file in one of the non-proprietary formats that can be parsed by `mzR`, e.g. mzXML or mzML.
`min_peaks` | Minimum number of peaks in MS2 spectrum, defaults to `2`. Spectra with less than `min_peaks` fragment peaks will be ignored and not extracted.
`recalibrate_precursor` | Logical, defaults to `FALSE`. Applicable only for files that were exported to mzXML using a deprecated version of Bruker Compass Xport (< 3.0.13). If set to `TRUE`, the precursor m/z will be recalculated from the respective fragment m/z in the MS2 spectrum. For details, see Depke et al. 2017.
`RTlims` | Retention time interval for the extraction of spectra. Provide as numeric vector of length 2. Spectra with retention time < `RTlims[1]` or > `RTlims[2]` will be ignored.

### Value

A `list` with objects of class `MS2spectrum`, containing MS2 spectra extracted from the raw data.

### Examples

    my_spectra <- extractMS2spectra(MSfile = system.file("extdata",
                                    "PoolA_R_SE.mzXML",
                                    package = "CluMSIDdata"),
                                    min_peaks = 4, RTlims = c(0,10))

[Package CluMSID version 1.10.0 Index]