writeMSData,MSnExp,character-method | R Documentation |
The writeMSData,MSnExp
and writeMSData,OnDiskMSnExp
saves
the content of a MSnExp or OnDiskMSnExp object to MS file(s) in
either mzML or mzXML format.
## S4 method for signature 'MSnExp,character'
writeMSData(
object,
file,
outformat = c("mzml", "mzxml"),
merge = FALSE,
verbose = isMSnbaseVerbose(),
copy = FALSE,
software_processing = NULL
)
object |
|
file |
|
outformat |
|
merge |
|
verbose |
|
copy |
|
software_processing |
optionally provide specific data processing steps.
See documentation of the |
The writeMSData
method uses the proteowizard libraries through
the 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
parameter.
Note that 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 OnDiskMSnExp
or 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.
The exported 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 mzR
/MSnbase
.
Johannes Rainer
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.