# S4 method for MSnExp,character writeMSData( object, file, outformat = c("mzml", "mzxml"), merge = FALSE, verbose = isMSnbaseVerbose(), copy = FALSE, software_processing = NULL )
optionally provide specific data processing steps.
See documentation of the
writeMSData method uses the proteowizard libraries through
mzR package to save the MS data. The data can be written to
mzML or mzXML files with or without copying additional metadata
information from the original files from which the data was read by the
readMSData() function. This can be set using the
copy = TRUE requires the original files to be available and
is not supported for input files in other than mzML or mzXML format.
All metadata related to the run is copied, such as instrument
information, data processings etc. If
copy = FALSE only processing
information performed in R (using
MSnbase) are saved to the mzML file.
Currently only spectrum data is supported, i.e. if the original mzML file contains also chromatogram data it is not copied/saved to the new mzML file.
General spectrum data such as total ion current, peak count, base peak m/z or base peak intensity are calculated from the actual spectrum data before writing the data to the files.
For MSn data, if the
MSnExp does not contain also
the precursor scan of a MS level > 1 spectrum (e.g. due to filtering on
the MS level)
precursorScanNum is set to 0 in the output file to
avoid potentially linking to a wrong spectrum.
mzML file should be valid according to the mzML 1.1.2
standard. For exported
mzXML files it can not be guaranteed that they
are valid and can be opened with other software than