Learn R Programming

MALDIquantForeign (version 0.14.1)

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 AbstractMassObject-class object or a list of AbstractMassObject-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.

Author

Sebastian Gibb

References

https://strimmerlab.github.io/software/maldiquant/,
HUPO Proteomics Standards Inititative mzML 1.1.0 Specification: https://www.psidev.info/mzML

See Also

MassSpectrum-class

Examples

Run this code

if (FALSE) {
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")
}

Run the code above in your browser using DataLab