OpenMS
Loading...
Searching...
No Matches
SpectrumAccessSqMass.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 <memory>
21
22namespace OpenMS
23{
74 class OPENMS_DLLAPI SpectrumAccessSqMass :
76 {
77
78public:
81
88
95 SpectrumAccessSqMass(const OpenMS::Internal::MzMLSqliteHandler& handler, const std::vector<int> & indices);
96
108 SpectrumAccessSqMass(const SpectrumAccessSqMass& sp, const std::vector<int>& indices);
109
112
123
133 std::shared_ptr<OpenSwath::ISpectrumAccess> lightClone() const override;
134
146
156
165 void getAllSpectra(std::vector< OpenSwath::SpectrumPtr > & spectra, std::vector< OpenSwath::SpectrumMeta > & spectra_meta) const;
166
175 std::vector<std::size_t> getSpectraByRT(double RT, double deltaRT) const override;
176
182 size_t getNrSpectra() const override;
183
192
200 size_t getNrChromatograms() const override;
201
209 std::string getChromatogramNativeID(int id) const override;
210
211private:
212
216 std::vector<int> sidx_;
217 };
218} //end namespace OpenMS
219
220
221
Sqlite handler for storing spectra and chromatograms in sqMass format.
Definition MzMLSqliteHandler.h:52
The representation of a chromatogram.
Definition MSChromatogram.h:30
The representation of a 1D spectrum.
Definition MSSpectrum.h:44
OpenSwath::ISpectrumAccess implementation backed by an sqMass (SQLite) spectrum store.
Definition SpectrumAccessSqMass.h:76
std::shared_ptr< OpenSwath::ISpectrumAccess > lightClone() const override
Return a copy of this accessor as a new OpenSwath::ISpectrumAccess pointer.
size_t getNrSpectra() const override
Number of spectra in the visible view.
SpectrumAccessSqMass(const SpectrumAccessSqMass &sp, const std::vector< int > &indices)
Construct a narrower view of an existing accessor.
OpenMS::MSSpectrum MSSpectrumType
Definition SpectrumAccessSqMass.h:79
SpectrumAccessSqMass(const SpectrumAccessSqMass &rhs)
Copy constructor.
SpectrumAccessSqMass(const OpenMS::Internal::MzMLSqliteHandler &handler)
Construct from an sqMass handler exposing every spectrum it contains.
OpenMS::Internal::MzMLSqliteHandler handler_
Handler for the underlying sqMass file (copied by value into each accessor / clone)
Definition SpectrumAccessSqMass.h:214
size_t getNrChromatograms() const override
Number of chromatograms in the underlying sqMass file.
OpenMS::MSChromatogram MSChromatogramType
Definition SpectrumAccessSqMass.h:80
void getAllSpectra(std::vector< OpenSwath::SpectrumPtr > &spectra, std::vector< OpenSwath::SpectrumMeta > &spectra_meta) const
Batch-load every spectrum in the visible view into memory.
std::vector< int > sidx_
Optional subset of absolute spectrum indices; empty means "all spectra in the file are visible".
Definition SpectrumAccessSqMass.h:216
SpectrumAccessSqMass(const OpenMS::Internal::MzMLSqliteHandler &handler, const std::vector< int > &indices)
Construct from an sqMass handler exposing only the spectra at the given indices.
OpenSwath::ChromatogramPtr getChromatogramById(int id) override
Not supported on sqMass.
~SpectrumAccessSqMass() override
Destructor.
OpenSwath::SpectrumPtr getSpectrumById(int id) override
Load one spectrum by index in the visible view.
std::string getChromatogramNativeID(int id) const override
Not supported on sqMass.
std::vector< std::size_t > getSpectraByRT(double RT, double deltaRT) const override
Indices into the visible view of spectra whose RT lies within an absolute window.
OpenSwath::SpectrumMeta getSpectrumMetaById(int id) const override
Load metadata (native id, RT, MS level) for one spectrum.
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