
This function exports
MassSpectrum-class
objects into mzML files.
# S4 method for MassSpectrum
exportMzMl(x, file, force=FALSE, ...)# S4 method for list
exportMzMl(x, path, force=FALSE, ...)
a AbstractMassObject-class
object or a
list
of AbstractMassObject-class
objects.
character
, file name.
logical
, If TRUE
the file
would be
overwritten or path
would be created.
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.
Sebastian Gibb
https://strimmerlab.github.io/software/maldiquant/,
HUPO Proteomics Standards Inititative mzML 1.1.0 Specification:
https://www.psidev.info/mzML
MassSpectrum-class
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