libpappsomspp
Library for mass spectrometry
Loading...
Searching...
No Matches
timsmsrunreaderdia.h
Go to the documentation of this file.
1/**
2 * \file pappsomspp/msrun/private/timsmsrunreaderdia.h
3 * \date 09/07/2024
4 * \author Olivier Langella
5 * \brief MSrun file reader for native Bruker TimsTOF specialized for DIA
6 * purpose
7 */
8
9/*******************************************************************************
10 * Copyright (c) 2024 Olivier Langella
11 *<Olivier.Langella@universite-paris-saclay.fr>.
12 *
13 * This file is part of the PAPPSOms++ library.
14 *
15 * PAPPSOms++ is free software: you can redistribute it and/or modify
16 * it under the terms of the GNU General Public License as published by
17 * the Free Software Foundation, either version 3 of the License, or
18 * (at your option) any later version.
19 *
20 * PAPPSOms++ is distributed in the hope that it will be useful,
21 * but WITHOUT ANY WARRANTY; without even the implied warranty of
22 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23 * GNU General Public License for more details.
24 *
25 * You should have received a copy of the GNU General Public License
26 * along with PAPPSOms++. If not, see <http://www.gnu.org/licenses/>.
27 *
28 ******************************************************************************/
29
30
31#pragma once
32
33#include "../../types.h"
37
40
41namespace pappso
42{
43
45{
46 friend class MsFileAccessor;
47
48 public:
49 /**
50 * Default constructor
51 */
53 TimsMsRunReaderDia(const TimsMsRunReaderBase &msrun_reader_base);
54
55 /**
56 * Destructor
57 */
58 virtual ~TimsMsRunReaderDia();
59
60
61 /** @brief get a MassSpectrumSPtr class given its spectrum index
62 */
63 virtual MassSpectrumSPtr
64 massSpectrumSPtr(std::size_t spectrum_index) override;
66 massSpectrumCstSPtr(std::size_t spectrum_index) override;
67
68 /** @brief get a QualifiedMassSpectrum class given its scan number
69 */
71 qualifiedMassSpectrum(std::size_t spectrum_index,
72 bool want_binary_data = true) const override;
73
74
75 /** @brief get a xic coordinate object from a given spectrum index
76 */
77 virtual XicCoordSPtr
78 newXicCoordSPtrFromSpectrumIndex(std::size_t spectrum_index,
79 PrecisionPtr precision) const override;
80
81 /** @brief get a xic coordinate object from a given spectrum
82 */
84 const QualifiedMassSpectrum &mass_spectrum,
85 PrecisionPtr precision) const override;
86
87 /** @brief get the totat number of spectrum conained in the MSrun data file
88 */
89 virtual std::size_t spectrumListSize() const override;
90
91 /** @brief function to visit an MsRunReader and get each Spectrum in a
92 * spectrum collection handler
93 */
94 virtual void
96
97 virtual void
99 SpectrumCollectionHandlerInterface &handler) override;
100
101 /** @brief function to visit an MsRunReader and get each Spectrum in a
102 * spectrum collection handler by Ms Levels
103 */
104 virtual void
106 unsigned int ms_level) override;
107
108
109 virtual bool acquireDevice() override;
110
111 virtual std::size_t
112 spectrumStringIdentifier2SpectrumIndex(const QString &spectrum_identifier) override;
113
114
115 protected:
116 virtual void initialize() override;
117
118 private:
120};
121} // namespace pappso
Class representing a fully specified mass spectrum.
interface to collect spectrums from the MsRunReader class
TimsMsRunReaderBase(MsRunIdCstSPtr &msrun_id_csp)
virtual void readSpectrumCollection(SpectrumCollectionHandlerInterface &handler) override
function to visit an MsRunReader and get each Spectrum in a spectrum collection handler
virtual void readSpectrumCollectionByMsLevel(SpectrumCollectionHandlerInterface &handler, unsigned int ms_level) override
function to visit an MsRunReader and get each Spectrum in a spectrum collection handler by Ms Levels
virtual MassSpectrumSPtr massSpectrumSPtr(std::size_t spectrum_index) override
get a MassSpectrumSPtr class given its spectrum index
virtual XicCoordSPtr newXicCoordSPtrFromSpectrumIndex(std::size_t spectrum_index, PrecisionPtr precision) const override
get a xic coordinate object from a given spectrum index
virtual void initialize() override
virtual std::size_t spectrumStringIdentifier2SpectrumIndex(const QString &spectrum_identifier) override
if possible, get the spectrum index given a string identifier throw a not found exception if spectrum...
virtual XicCoordSPtr newXicCoordSPtrFromQualifiedMassSpectrum(const QualifiedMassSpectrum &mass_spectrum, PrecisionPtr precision) const override
get a xic coordinate object from a given spectrum
TimsMsRunReaderDia(MsRunIdCstSPtr &msrun_id_csp)
virtual QualifiedMassSpectrum qualifiedMassSpectrum(std::size_t spectrum_index, bool want_binary_data=true) const override
get a QualifiedMassSpectrum class given its scan number
virtual MassSpectrumCstSPtr massSpectrumCstSPtr(std::size_t spectrum_index) override
virtual std::size_t spectrumListSize() const override
get the totat number of spectrum conained in the MSrun data file
virtual bool acquireDevice() override
acquire data back end device
virtual void readSpectrumCollection2(const MsRunReadConfig &config, SpectrumCollectionHandlerInterface &handler) override
#define PMSPP_LIB_DECL
tries to keep as much as possible monoisotopes, removing any possible C13 peaks and changes multichar...
Definition aa.cpp:39
std::shared_ptr< const MsRunId > MsRunIdCstSPtr
Definition msrunid.h:46
std::shared_ptr< const MassSpectrum > MassSpectrumCstSPtr
const PrecisionBase * PrecisionPtr
Definition precision.h:122
std::shared_ptr< MassSpectrum > MassSpectrumSPtr
std::shared_ptr< XicCoord > XicCoordSPtr
Definition xiccoord.h:44