MzMLFile
- class pyopenms.MzMLFile
Bases:
objectCython implementation of _MzMLFile
- Documentation is available at http://www.openms.de/current_doxygen/html/classOpenMS_1_1MzMLFile.html
– Inherits from [‘ProgressLogger’]
Provides methods to load and store MzML files. PeakFileOptions allow to load a reduced subset of the data into an MSExperiment. —– See help(MSExperiment) how data is stored after loading. See help(PeakFileOptions) for available options. —– Usage:
exp = MSExperiment() MzMLFile().load(“test.mzML”, exp) spec = [] for s in exp.getSpectra():
- if s.getMSLevel() != 1:
spec.append(s)
exp.setSpectra(spec) MzMLFile().store(“filtered.mzML”, exp)
- __init__()
Cython signature: void MzMLFile()
Cython signature: void MzMLFile(MzMLFile &)
Methods
Cython signature: void MzMLFile()
Cython signature: void endProgress() Ends the progress display
Cython signature: LogType getLogType() Returns the type of progress log being used
Cython signature: PeakFileOptions getOptions()
Cython signature: bool isSemanticallyValid(const String & filename, StringList & errors, StringList & warnings)
Cython signature: void load(const String & filename, MSExperiment &) Loads from an MzML file.
Cython signature: void loadBuffer(const String & input, MSExperiment & exp)
Cython signature: void nextProgress() Increment progress by 1 (according to range begin-end)
Cython signature: void setLogType(LogType) Sets the progress log that should be used.
Cython signature: void setOptions(PeakFileOptions) Set PeakFileOptions to perform filtering during loading.
Cython signature: void setProgress(ptrdiff_t value) Sets the current progress
Cython signature: void startProgress(ptrdiff_t begin, ptrdiff_t end, String label)
Cython signature: void store(const String & filename, MSExperiment &) Stores a MSExperiment in an MzML file
Cython signature: void storeBuffer(String & output, MSExperiment exp)
- endProgress()
Cython signature: void endProgress() Ends the progress display
- getLogType()
Cython signature: LogType getLogType() Returns the type of progress log being used
- getOptions()
Cython signature: PeakFileOptions getOptions()
- isSemanticallyValid()
Cython signature: bool isSemanticallyValid(const String & filename, StringList & errors, StringList & warnings)
- load()
Cython signature: void load(const String & filename, MSExperiment &) Loads from an MzML file. Spectra and chromatograms are sorted by default (this can be disabled using PeakFileOptions)
- loadBuffer()
Cython signature: void loadBuffer(const String & input, MSExperiment & exp)
- Parameters
buffer – The buffer with the data (i.e. string with content of an mzML file)
exp – Is an MSExperiment
- Raises
Exception: ParseError is thrown if an error occurs during parsing
- nextProgress()
Cython signature: void nextProgress() Increment progress by 1 (according to range begin-end)
- setLogType()
Cython signature: void setLogType(LogType) Sets the progress log that should be used. The default type is NONE!
- setOptions()
Cython signature: void setOptions(PeakFileOptions) Set PeakFileOptions to perform filtering during loading. E.g., to load only MS1 spectra or meta data only
- setProgress()
Cython signature: void setProgress(ptrdiff_t value) Sets the current progress
- startProgress()
Cython signature: void startProgress(ptrdiff_t begin, ptrdiff_t end, String label)
- store()
Cython signature: void store(const String & filename, MSExperiment &) Stores a MSExperiment in an MzML file
- storeBuffer()
Cython signature: void storeBuffer(String & output, MSExperiment exp)
- Parameters
output – An empty string to store the result
exp – Has to be an MSExperiment
- transform()