![]() |
OpenMS
2.5.0
|
An implementation of the Spectrum Access interface using SQL files. More...
#include <OpenMS/ANALYSIS/OPENSWATH/DATAACCESS/SpectrumAccessSqMass.h>
Public Types | |
| typedef OpenMS::MSSpectrum | MSSpectrumType |
| typedef OpenMS::MSChromatogram | MSChromatogramType |
Public Member Functions | |
| SpectrumAccessSqMass (const OpenMS::Internal::MzMLSqliteHandler &handler) | |
| Constructor. More... | |
| SpectrumAccessSqMass (const OpenMS::Internal::MzMLSqliteHandler &handler, const std::vector< int > &indices) | |
| SpectrumAccessSqMass (const SpectrumAccessSqMass &sp, const std::vector< int > &indices) | |
| ~SpectrumAccessSqMass () override | |
| Destructor. More... | |
| SpectrumAccessSqMass (const SpectrumAccessSqMass &rhs) | |
| Copy constructor. More... | |
| boost::shared_ptr< OpenSwath::ISpectrumAccess > | lightClone () const override |
| Light clone operator (actual data will not get copied) More... | |
| OpenSwath::SpectrumPtr | getSpectrumById (int) override |
| Return a pointer to a spectrum at the given id. More... | |
| OpenSwath::SpectrumMeta | getSpectrumMetaById (int) const override |
| Returns the meta information for a spectrum. More... | |
| void | getAllSpectra (std::vector< OpenSwath::SpectrumPtr > &spectra, std::vector< OpenSwath::SpectrumMeta > &spectra_meta) const |
| Load all spectra from the underlying sqMass file into memory. More... | |
| std::vector< std::size_t > | getSpectraByRT (double, double) const override |
| Return a vector of ids of spectra that are within RT +/- deltaRT. More... | |
| size_t | getNrSpectra () const override |
| Returns the number of spectra available. More... | |
| OpenSwath::ChromatogramPtr | getChromatogramById (int) override |
| Return a pointer to a chromatogram at the given id. More... | |
| size_t | getNrChromatograms () const override |
| Returns the number of chromatograms available. More... | |
| std::string | getChromatogramNativeID (int) const override |
| Returns the native id of the chromatogram at the given id. More... | |
Public Member Functions inherited from ISpectrumAccess | |
| virtual | ~ISpectrumAccess () |
| Destructor. More... | |
Private Attributes | |
| OpenMS::Internal::MzMLSqliteHandler | handler_ |
| Access to underlying sqMass file. More... | |
| std::vector< int > | sidx_ |
| Optional subset of spectral indices. More... | |
An implementation of the Spectrum Access interface using SQL files.
The interface takes an MzMLSqliteHandler object to access spectra and chromatograms from a sqlite file (sqMass). Currently access to individual spectra and chromatograms are not supported due to large overhead of opening a DB connection and performing a single query.
Instead, the users should use getAllSpectra which returns all available spectra together.
The interface allows to be constructed in a way as to only provide access to a subset of spectra / chromatograms by supplying a set of indices which are then used to provide a transparent interface to any consumer who will get access to the described subset of spectra / chromatograms. This can be useful to provide a specific interface to MS1 or MS2 spectra only or to different DIA / SWATH-MS windows.
Parallel access is supported through this interface as it is read-only and sqlite3 supports multiple parallel read threads as long as they use a different db connection.
Sample usage:
| typedef OpenMS::MSSpectrum MSSpectrumType |
| SpectrumAccessSqMass | ( | const OpenMS::Internal::MzMLSqliteHandler & | handler | ) |
Constructor.
| SpectrumAccessSqMass | ( | const OpenMS::Internal::MzMLSqliteHandler & | handler, |
| const std::vector< int > & | indices | ||
| ) |
| SpectrumAccessSqMass | ( | const SpectrumAccessSqMass & | sp, |
| const std::vector< int > & | indices | ||
| ) |
|
override |
Destructor.
| SpectrumAccessSqMass | ( | const SpectrumAccessSqMass & | rhs | ) |
Copy constructor.
| void getAllSpectra | ( | std::vector< OpenSwath::SpectrumPtr > & | spectra, |
| std::vector< OpenSwath::SpectrumMeta > & | spectra_meta | ||
| ) | const |
Load all spectra from the underlying sqMass file into memory.
|
overridevirtual |
Return a pointer to a chromatogram at the given id.
Implements ISpectrumAccess.
|
overridevirtual |
Returns the native id of the chromatogram at the given id.
Implements ISpectrumAccess.
|
overridevirtual |
Returns the number of chromatograms available.
Implements ISpectrumAccess.
|
overridevirtual |
Returns the number of spectra available.
Implements ISpectrumAccess.
Return a vector of ids of spectra that are within RT +/- deltaRT.
Implements ISpectrumAccess.
|
overridevirtual |
Return a pointer to a spectrum at the given id.
Implements ISpectrumAccess.
|
overridevirtual |
Returns the meta information for a spectrum.
Implements ISpectrumAccess.
|
overridevirtual |
Light clone operator (actual data will not get copied)
Implements ISpectrumAccess.
|
private |
Access to underlying sqMass file.
|
private |
Optional subset of spectral indices.
1.8.16