readSRMData {MSnbase} | R Documentation

## Read SRM/MRM chromatographic data

### Description

The `readSRMData` function reads MRM/SRM data from provided mzML files and returns the results as a `MChromatograms()` object.

### Usage

    readSRMData(files, pdata = NULL)

### Arguments

`files` | `character` with the files containing the SRM/MRM data.
`pdata` | `data.frame` or `AnnotatedDataFrame` with file/sample descriptions.

### Details

`readSRMData` supports reading chromatogram entries from mzML files. If multiple files are provided the same precursor and product m/z for SRM/MRM chromatograms are expected across files. The number of columns of the resulting `MChromatograms()` object corresponds to the number of files. Each row in the `MChromatograms` object is supposed to contain chromatograms with same polarity, precursor and product m/z. If chromatograms with redundant polarity, precursor and product m/z values and precursor collision energies are found, they are placed into multiple consecutive rows in the `MChromatograms` object.

### Value

A `MChromatograms()` object. See details above for more information.

### Note

`readSRMData` reads only SRM/MRM chromatogram data, i.e. chromatogram data from mzML files with `precursorIsolationWindowTargetMZ` and `productIsolationWindowTargetMZ` attributes. Total ion chromatogram data is hence not extracted.

The number of features and hence rows of the resulting `MChromatograms` object depends on the total list of unique precursor and product m/z isolation windows (and precursor collision energies) found across all input files. In cases in which not each file has chromatgraphic data for the same polarity, precursor m/z, product m/z and collision energy, an empty `Chromatogram()` object is reported for the specific precursor and product m/z combination of the respective file (and a warning is thrown).

### Author(s)

Johannes Rainer

### Examples

    ## Read an example MRM/SRM data
    library(msdata)
    fl <- proteomics(full.names = TRUE, pattern = "MRM")

    ## Read the data
    mrm <- readSRMData(fl)

    ## The data is represented as a MChromatograms object, each column
    ## containing the data from one input file
    mrm

    ## Access the polarity for each chromatogram (row)
    polarity(mrm)

    ## Access the precursor m/z. The result is returned as a matrix with
    ## columns representing the minimum and maximum m/z (will be identical in
    ## most cases).
    precursorMz(mrm)

    ## Access the product m/z.
    productMz(mrm)

    ## Plot one chromatogram
    plot(mrm[1, ])

[Package MSnbase version 2.15.7 Index]