Learn R Programming

MALDIquantForeign (version 0.10)

exportMzMl,MassSpectrum-method: Export to mzML files

Description

This function exports MassSpectrum-class objects into mzML files.

Usage

# S4 method for MassSpectrum
exportMzMl(x, file, force=FALSE, …)

# S4 method for list exportMzMl(x, path, force=FALSE, …)

Arguments

x

a MassSpectrum-class object or a list of MassSpectrum-class objects.

file

character, file name.

force

logical, If TRUE the file would be overwritten or path would be created.

path

character, path to directory in which the list of MassSpectrum-class would be exported. If path is a single filename all spectra will be exported to a single mzML file.

arguments to be passed to internal functions.

References

http://strimmerlab.org/software/maldiquant/, HUPO Proteomics Standards Inititative mzML 1.1.0 Specification: http://www.psidev.info/mzml_1_0_0

See Also

MassSpectrum-class

Examples

Run this code
# NOT RUN {
# }
# NOT RUN {
library("MALDIquant")
library("MALDIquantForeign")

s <- list(createMassSpectrum(mass=1:5, intensity=1:5),
          createMassSpectrum(mass=1:5, intensity=1:5))

## export a single spectrum
exportMzMl(s[[1]], file="spectrum.mzML")

## export a list of spectra
exportMzMl(s, path="spectra.mzML")
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab