SpectrumAccessOpenMSCached#
- class pyopenms.SpectrumAccessOpenMSCached#
Bases:
objectSpectrum access backed by an on-disk CachedmzML cache.
Metadata is served from memory; peak data is read on demand from the side-car file at
filename + ".cached"(written byCachedmzML.store()), so runs far larger than RAM can be processed. Not thread-safe: a single file stream is seeked per request, so parallel readers each need their own copy of this object.- __init__(filename: str) None#
- __init__(arg: pyopenms.SpectrumAccessOpenMSCached, /) None
Methods
__init__(filename)Read one chromatogram from the cache file
Returns the native ID of the chromatogram
Get number of chromatograms
Get number of spectra
getSpectraByRT(RT, deltaRT)Returns spectra indices within RT range
getSpectrumById(id)Read one spectrum from the cache file
- getChromatogramById(id: int) pyopenms.OSChromatogram#
Read one chromatogram from the cache file
- getChromatogramNativeID(id: int) str#
Returns the native ID of the chromatogram
- getNrChromatograms() int#
Get number of chromatograms
- getNrSpectra() int#
Get number of spectra
- getSpectraByRT(RT: float, deltaRT: float) list[int]#
Returns spectra indices within RT range
- getSpectrumById(id: int) pyopenms.OSSpectrum#
Read one spectrum from the cache file