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"
34#include "../../msfile/msfileaccessor.h"
35#include "../../vendors/tims/timsdata.h"
36#include "../../vendors/tims/timsdiaslices.h"
37
38#include "../../exportinmportconfig.h"
39#include "timsmsrunreaderbase.h"
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 */
83 virtual XicCoordSPtr newXicCoordSPtrFromQualifiedMassSpectrum(
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
95 readSpectrumCollection(SpectrumCollectionHandlerInterface &handler) override;
96
97 virtual void
98 readSpectrumCollection2(const MsRunReadConfig &config,
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
105 readSpectrumCollectionByMsLevel(SpectrumCollectionHandlerInterface &handler,
106 unsigned int ms_level) override;
107
108
109 virtual bool acquireDevice() override;
110
111 protected:
112 virtual void initialize() override;
113
114 private:
115 TimsDiaSlices *mp_timsDiaSlices = nullptr;
116};
117} // namespace pappso
Class representing a fully specified mass spectrum.
interface to collect spectrums from the MsRunReader class
#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
std::shared_ptr< MassSpectrum > MassSpectrumSPtr
std::shared_ptr< XicCoord > XicCoordSPtr
Definition xiccoord.h:43
Base class for all tims ms run reader objects.