Learn R Programming

readMzXmlData (version 2.8.3)

readMzXmlFile: Reads mass spectrometry data in mzXML format.

Description

Reads mass spectrometry data in mzXML format defined in http://tools.proteomecenter.org/wiki/index.php?title=Formats:mzXML

Usage

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

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.

Arguments

mzXmlFile

character, path to mzXML file which should be read.

removeMetaData

logical, to save memory metadata could be deleted.

verbose

logical, verbose output?

Author

Sebastian Gibb mail@sebastiangibb.de

References

Definition of mzXML format: http://tools.proteomecenter.org/wiki/index.php?title=Formats:mzXML

See Also

readMzXmlDir, importMzXml

Examples

Run this code

## 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")

Run the code above in your browser using DataLab