![]() |
OpenMS
|
Random access to the spectra and chromatograms of an MS run that stays on disk. More...
#include <OpenMS/KERNEL/IMSExperimentRandomAccess.h>
Public Member Functions | |
| virtual | ~IMSExperimentRandomAccess () |
| virtual Size | getNrSpectra () const =0 |
| Number of spectra. | |
| virtual Size | getNrChromatograms () const =0 |
| Number of chromatograms. | |
| Size | size () const |
| Alias for getNrSpectra() | |
| bool | empty () const |
| True if there are no spectra. | |
| virtual MSSpectrum | getSpectrum (Size index)=0 |
The spectrum with index index, including peaks and metadata. | |
| virtual MSSpectrum | getSpectrumMetadata (Size index)=0 |
The spectrum with index index without peaks and data arrays. | |
| virtual MSSpectrum | getSpectrumPeaks (Size index) |
Peaks and data arrays of spectrum index; other metadata may be missing. | |
| virtual double | getSpectrumRT (Size index) const =0 |
Retention time (in seconds) of spectrum index, from the index. | |
| virtual UInt | getSpectrumMSLevel (Size index) const =0 |
MS level of spectrum index, from the index. | |
| virtual bool | isSortedByRT () const =0 |
| True if the spectra are sorted by ascending retention time. | |
| virtual Size | findFirstRT (double rt) const |
Index of the first spectrum with retention time >= rt. | |
| virtual MSChromatogram | getChromatogram (Size index)=0 |
The chromatogram with index index. | |
| virtual std::shared_ptr< const ExperimentalSettings > | getExperimentalSettings () const =0 |
| Run-level metadata (instrument, source files, sample, ...) | |
| virtual std::unique_ptr< IMSExperimentRandomAccess > | clone () const =0 |
| A new instance on the same data with its own file handle (for another thread). | |
Protected Member Functions | |
| IMSExperimentRandomAccess ()=default | |
| IMSExperimentRandomAccess (const IMSExperimentRandomAccess &)=default | |
| IMSExperimentRandomAccess & | operator= (const IMSExperimentRandomAccess &)=default |
Random access to the spectra and chromatograms of an MS run that stays on disk.
Backends keep a small index in memory (e.g. retention time and MS level of every spectrum) and decode spectra on request. Implemented by OnDiscMSExperiment (indexed mzML) and OnDiscThermoRawExperiment (Thermo RAW); further formats (e.g. Bruker TDF, imzML) can be added the same way. Algorithms that only need random access, such as the OpenSWATH adapter SpectrumAccessOnDisc, are written against this interface.
|
virtual |
|
protecteddefault |
|
protecteddefault |
|
pure virtual |
A new instance on the same data with its own file handle (for another thread).
Cheap: the index is shared, not copied.
Implemented in OnDiscMSExperiment.
|
inline |
True if there are no spectra.
|
virtual |
Index of the first spectrum with retention time >= rt.
Binary search if the spectra are sorted by retention time, linear search otherwise.
| [in] | rt | Retention time in seconds |
|
pure virtual |
The chromatogram with index index.
| [in] | index | Chromatogram index (0 <= index < getNrChromatograms()) |
Implemented in OnDiscMSExperiment.
|
pure virtual |
Run-level metadata (instrument, source files, sample, ...)
Implemented in OnDiscMSExperiment.
|
pure virtual |
Number of chromatograms.
Implemented in OnDiscMSExperiment.
|
pure virtual |
Number of spectra.
Implemented in OnDiscMSExperiment.
|
pure virtual |
The spectrum with index index, including peaks and metadata.
| [in] | index | Spectrum index (0 <= index < getNrSpectra()) |
| Exception::IndexOverflow | if index is out of range (backend dependent) |
Implemented in OnDiscMSExperiment.
|
pure virtual |
The spectrum with index index without peaks and data arrays.
| [in] | index | Spectrum index (0 <= index < getNrSpectra()) |
Implemented in OnDiscMSExperiment.
MS level of spectrum index, from the index.
Implemented in OnDiscMSExperiment.
|
virtual |
Peaks and data arrays of spectrum index; other metadata may be missing.
Backends can skip decoding metadata that consumers of peak data alone (e.g. OpenSWATH) do not need. The default returns getSpectrum().
| [in] | index | Spectrum index (0 <= index < getNrSpectra()) |
|
pure virtual |
Retention time (in seconds) of spectrum index, from the index.
Implemented in OnDiscMSExperiment.
|
pure virtual |
True if the spectra are sorted by ascending retention time.
Implemented in OnDiscMSExperiment.
|
protecteddefault |
|
inline |
Alias for getNrSpectra()