R: Reads mass spectrometry data in mzXML format.

readMzXmlFile {readMzXmlData} | R Documentation

## Reads mass spectrometry data in mzXML format.

### Description

Reads mass spectrometry data in mzXML format defined in http://tools.proteomecenter.org/mzXMLschema.php.

### Usage

    readMzXmlFile(mzXmlFile, removeMetaData = FALSE, verbose = FALSE)

### Arguments

`mzXmlFile` | `character`, path to mzXML file which should be read.
`removeMetaData` | `logical`, to save memory metadata could be deleted.
`verbose` | `logical`, verbose output?

### Value

A list of spectra and metadata.

- `spectrum$mass`: A vector of calculated mass.

- `spectrum$intensity`: A vector of intensity values.

- `metaData`: A list of metaData depending on read spectrum.

### Author(s)

Sebastian Gibb mail@sebastiangibb.de

### References

Definition of `mzXML` format: http://tools.proteomecenter.org/mzXMLschema.php

### See Also

`readMzXmlDir`, `importMzXml`

### Examples

    ## load library
    library("readMzXmlData")

    ## get examples directory
    exampleDirectory <- system.file("Examples", package="readMzXmlData")

    ## read example spectrum
    spec <- readMzXmlFile(file.path(exampleDirectory, "A1-0_A1.mzXML"))

    ## print metaData
    print(spec$metaData)

    ## plot spectrum
    plot(spec$spectrum$mass, spec$spectrum$intensity, type="l")

[Package readMzXmlData version 2.8.1 Index]