PlainMSDataWritingConsumer#
- class pyopenms.PlainMSDataWritingConsumer#
Bases:
object
Cython implementation of _PlainMSDataWritingConsumer
Original C++ documentation is available here
Methods
__init__
(self, filename)addDataProcessing
(self, d)Optionally add a data processing method to each chromatogram and spectrum
consumeChromatogram
(self, c)consumeSpectrum
(self, s)Returns the number of chromatograms written
getNrSpectraWritten
(self)Returns the number of spectra written
getOptions
(self)setExpectedSize
(self, expectedSpectra, ...)Set expected size of spectra and chromatograms to be written
setExperimentalSettings
(self, exp)Set experimental settings for the whole file
setOptions
(self, opt)- addDataProcessing(self, d: DataProcessing) None #
Optionally add a data processing method to each chromatogram and spectrum
The provided DataProcessing object will be added to each chromatogram and spectrum written to to the mzML file
- Parameters:
d – The DataProcessing object to be added
- consumeChromatogram(self, c: MSChromatogram) None #
- consumeSpectrum(self, s: MSSpectrum) None #
- getNrChromatogramsWritten(self) int #
Returns the number of chromatograms written
- getNrSpectraWritten(self) int #
Returns the number of spectra written
- getOptions(self) PeakFileOptions #
- setExpectedSize(self, expectedSpectra: int, expectedChromatograms: int) None #
Set expected size of spectra and chromatograms to be written
These numbers will be written in the spectrumList and chromatogramList tag in the mzML file. Therefore, these will contain wrong numbers if the expected size is not set correctly
- Parameters:
expectedSpectra – Number of spectra expected
expectedChromatograms – Number of chromatograms expected
- setExperimentalSettings(self, exp: ExperimentalSettings) None #
Set experimental settings for the whole file
- Parameters:
exp – Experimental settings to be used for this file (from this and the first spectrum/chromatogram, the class will deduce most of the header of the mzML file)
- setOptions(self, opt: PeakFileOptions) None #