MSDataCachedConsumer#

class pyopenms.MSDataCachedConsumer#

Bases: CachedMzMLHandler

Transforming and cached writing consumer of MS data

Is able to transform a spectrum on the fly while it is read using a function pointer that can be set on the object. The spectra is then cached to disk using the functions provided in CachedMzMLHandler.

__init__(filename: str, clear_data: bool = True) → None#

Methods

__init__(filename[, clear_data])

consumeChromatogram(c)

Write a chromatogram to the output file

consumeSpectrum(s)

Write a spectrum to the output file

createMemdumpIndex(filename)

Create an index on the location of all the spectra and chromatograms

endProgress([bytes_processed])

Ends the progress display

getChromatogramIndex()

Returns the byte offsets of the chromatograms in the cached file

getLogType()

Returns the type of progress log being used

getSpectraIndex()

Returns the byte offsets of the spectra in the cached file

nextProgress()

Increment progress by 1 (according to range begin-end)

readMemdump(filename)

Read all spectra from a dump from the disk

setExpectedSize(expectedSpectra, ...)

setExperimentalSettings(exp)

setLogType(type)

Sets the progress log that should be used.

setProgress(value)

Sets the current progress

startProgress(begin, end, label)

writeMemdump(exp, out)

Write complete spectra as a dump to the disk

writeMetadata(exp, out_meta[, addCacheMetaValue])

Write only the meta data of an MSExperiment

Attributes

CMD = 0#
GUI = 1#
NONE = 2#
consumeChromatogram(c: pyopenms.MSChromatogram) → None#

Write a chromatogram to the output file

May delete data from chromatogram (if clearData is set)

consumeSpectrum(s: pyopenms.MSSpectrum) → None#

Write a spectrum to the output file

May delete data from spectrum (if clearData is set)

createMemdumpIndex(filename: str) → None#

Create an index on the location of all the spectra and chromatograms

endProgress(bytes_processed: int = 0) → None#

Ends the progress display

getChromatogramIndex() → list[int]#

Returns the byte offsets of the chromatograms in the cached file

getLogType() → pyopenms.ProgressLogger.LogType#

Returns the type of progress log being used

getSpectraIndex() → list[int]#

Returns the byte offsets of the spectra in the cached file

nextProgress() → None#

Increment progress by 1 (according to range begin-end)

readMemdump(filename: str) → pyopenms.MSExperiment#

Read all spectra from a dump from the disk

setExpectedSize(expectedSpectra: int, expectedChromatograms: int) → None#
setExperimentalSettings(exp: pyopenms.ExperimentalSettings) → None#
setLogType(type: pyopenms.ProgressLogger.LogType) → None#

Sets the progress log that should be used. The default type is NONE!

setProgress(value: int) → None#

Sets the current progress

startProgress(begin: int, end: int, label: str) → None#
writeMemdump(exp: pyopenms.MSExperiment, out: str) → None#

Write complete spectra as a dump to the disk

writeMetadata(exp: pyopenms.MSExperiment, out_meta: str, addCacheMetaValue: bool = False) → None#

Write only the meta data of an MSExperiment