OpenMS
Loading...
Searching...
No Matches
SpectrumAccessOpenMSCached.h
Go to the documentation of this file.
1// Copyright (c) 2002-present, OpenMS Inc. -- EKU Tuebingen, ETH Zurich, and FU Berlin
2// SPDX-License-Identifier: BSD-3-Clause
3//
4// --------------------------------------------------------------------------
5// $Maintainer: Hannes Roest $
6// $Authors: Hannes Roest $
7// --------------------------------------------------------------------------
8
9#pragma once
10
15
17
19
20#include <fstream>
21
22namespace OpenMS
23{
24
42 class OPENMS_DLLAPI SpectrumAccessOpenMSCached :
45 {
46
47public:
50
68 explicit SpectrumAccessOpenMSCached(const std::string& filename);
69
72
85
95 std::shared_ptr<OpenSwath::ISpectrumAccess> lightClone() const override;
96
109
122
135 std::vector<std::size_t> getSpectraByRT(double RT, double deltaRT) const override;
136
138 size_t getNrSpectra() const override;
139
151
164
166 size_t getNrChromatograms() const override;
167
177
186 std::string getChromatogramNativeID(int id) const override;
187 };
188
189} //end namespace
190
Random-access reader/writer for the OpenMS on-disk cache format.
Definition CachedMzML.h:32
Representation of chromatogram settings, e.g. SRM/MRM chromatograms.
Definition ChromatogramSettings.h:37
In-Memory representation of a mass spectrometry run.
Definition MSExperiment.h:49
The representation of a 1D spectrum.
Definition MSSpectrum.h:44
OpenSwath::ISpectrumAccess implementation backed by an on-disk OpenMS::CachedmzML cache.
Definition SpectrumAccessOpenMSCached.h:45
std::shared_ptr< OpenSwath::ISpectrumAccess > lightClone() const override
Return a clone of this accessor as a new OpenSwath::ISpectrumAccess.
OpenMS::PeakMap MSExperimentType
Definition SpectrumAccessOpenMSCached.h:48
size_t getNrSpectra() const override
Number of spectra in the loaded metadata.
SpectrumAccessOpenMSCached(const SpectrumAccessOpenMSCached &rhs)
Copy constructor.
OpenMS::MSSpectrum MSSpectrumType
Definition SpectrumAccessOpenMSCached.h:49
~SpectrumAccessOpenMSCached() override
Destructor; the inherited OpenMS::CachedmzML destructor closes the side-car stream.
size_t getNrChromatograms() const override
Number of chromatograms in the loaded metadata.
SpectrumSettings getSpectraMetaInfo(int id) const
Return the full SpectrumSettings of one spectrum.
OpenSwath::ChromatogramPtr getChromatogramById(int id) override
Read one chromatogram from the side-car file.
OpenSwath::SpectrumPtr getSpectrumById(int id) override
Read one spectrum from the side-car file.
ChromatogramSettings getChromatogramMetaInfo(int id) const
Return the ChromatogramSettings of one chromatogram.
std::string getChromatogramNativeID(int id) const override
Native id of one cached chromatogram.
std::vector< std::size_t > getSpectraByRT(double RT, double deltaRT) const override
Indices of cached spectra whose RT lies in [RT - deltaRT, RT + deltaRT].
SpectrumAccessOpenMSCached(const std::string &filename)
Open the cached .mzML pair at filename.
OpenSwath::SpectrumMeta getSpectrumMetaById(int id) const override
Return the RT and MS level of one spectrum.
Representation of 1D spectrum settings.
Definition SpectrumSettings.h:43
The interface of a mass spectrometry experiment.
Definition openswathalgo/include/OpenMS/OPENSWATHALGO/DATAACCESS/ISpectrumAccess.h:30
Main OpenMS namespace.
Definition openswathalgo/include/OpenMS/OPENSWATHALGO/DATAACCESS/ISpectrumAccess.h:19
std::shared_ptr< Chromatogram > ChromatogramPtr
Definition openswathalgo/include/OpenMS/OPENSWATHALGO/DATAACCESS/DataStructures.h:153
std::shared_ptr< Spectrum > SpectrumPtr
Definition openswathalgo/include/OpenMS/OPENSWATHALGO/DATAACCESS/DataStructures.h:291
Identifying information for a spectrum.
Definition openswathalgo/include/OpenMS/OPENSWATHALGO/DATAACCESS/DataStructures.h:157