libpappsomspp
Library for mass spectrometry
Loading...
Searching...
No Matches
timsmsrunreaderms2.h
Go to the documentation of this file.
1/**
2 * \file pappsomspp/msrun/private/timsmsrunreaderms2.h
3 * \date 10/09/2019
4 * \author Olivier Langella
5 * \brief MSrun file reader for native Bruker TimsTOF specialized for MS2
6 * purpose
7 */
8
9/*******************************************************************************
10 * Copyright (c) 2019 Olivier Langella <Olivier.Langella@u-psud.fr>.
11 *
12 * This file is part of the PAPPSOms++ library.
13 *
14 * PAPPSOms++ is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU General Public License as published by
16 * the Free Software Foundation, either version 3 of the License, or
17 * (at your option) any later version.
18 *
19 * PAPPSOms++ is distributed in the hope that it will be useful,
20 * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 * GNU General Public License for more details.
23 *
24 * You should have received a copy of the GNU General Public License
25 * along with PAPPSOms++. If not, see <http://www.gnu.org/licenses/>.
26 *
27 ******************************************************************************/
28
29
30#pragma once
31
32#include "../../types.h"
33#include "timsmsrunreaderbase.h"
34
35namespace pappso
36{
37
39{
40 friend class MsFileAccessor;
41 /**
42 * @todo write docs
43 */
44 public:
46 TimsMsRunReaderMs2(const TimsMsRunReaderBase &msrun_reader_base);
47 virtual ~TimsMsRunReaderMs2();
48
49 virtual MassSpectrumSPtr
50 massSpectrumSPtr(std::size_t spectrum_index) override;
52 massSpectrumCstSPtr(std::size_t spectrum_index) override;
53
55 qualifiedMassSpectrum(std::size_t spectrum_index,
56 bool want_binary_data = true) const override;
57
58 virtual void
59 readSpectrumCollection(SpectrumCollectionHandlerInterface &handler) override;
60
61 virtual void
62 readSpectrumCollection2(const MsRunReadConfig &config,
63 SpectrumCollectionHandlerInterface &handler) override;
64
65 virtual pappso::XicCoordSPtr newXicCoordSPtrFromSpectrumIndex(
66 std::size_t spectrum_index, pappso::PrecisionPtr precision) const override;
67
68 virtual pappso::XicCoordSPtr newXicCoordSPtrFromQualifiedMassSpectrum(
69 const pappso::QualifiedMassSpectrum &mass_spectrum,
70 pappso::PrecisionPtr precision) const override;
71
72
73 virtual void
74 readSpectrumCollectionByMsLevel(SpectrumCollectionHandlerInterface &handler,
75 unsigned int ms_level) override;
76
77 virtual std::size_t spectrumListSize() const override;
78
79 virtual bool hasScanNumbers() const override;
80
81 void setMs2FilterCstSPtr(pappso::FilterInterfaceCstSPtr filter);
82 void setMs1FilterCstSPtr(pappso::FilterInterfaceCstSPtr filter);
83
84 /** @brief enable or disable simple centroid filter on raw tims data for MS2
85 */
86 void setMs2BuiltinCentroid(bool centroid);
87
88 /** @brief Get all the precursors id which match the values
89 * @return list of precursors Ids
90 */
91 virtual std::vector<std::size_t>
92 getPrecursorsIDFromMzRt(int charge, double mz_val, double rt_sec, double k0);
93
94
95 virtual bool releaseDevice() override;
96
97 virtual bool acquireDevice() override;
98
99 /** @brief give an access to the underlying raw data pointer
100 */
101 virtual TimsDataSp getTimsDataSPtr();
102
103
104 /** @brief retention timeline
105 * get retention times along the MSrun in seconds
106 * @return vector of retention times (seconds)
107 */
108 virtual std::vector<double> getRetentionTimeLine() override;
109
110 virtual Trace getTicChromatogram() override;
111
112 protected:
113 virtual void initialize() override;
114 virtual bool accept(const QString &file_name) const override;
115 TimsDdaPrecursors *mp_timsDdaPrecursors = nullptr;
116
117 private:
118 TimsDataSp msp_timsData = nullptr;
119
122 /** @brief enable builtin centroid on raw tims integers by default
123 */
124 bool m_builtinMs2Centroid = true;
125};
126
127
128} // namespace pappso
Class representing a fully specified mass spectrum.
interface to collect spectrums from the MsRunReader class
pappso::FilterInterfaceCstSPtr msp_ms2Filter
pappso::FilterInterfaceCstSPtr msp_ms1Filter
A simple container of DataPoint instances.
Definition trace.h:148
#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< TimsData > TimsDataSp
shared pointer on a TimsData object
Definition timsdata.h:52
std::shared_ptr< const MassSpectrum > MassSpectrumCstSPtr
std::shared_ptr< const FilterInterface > FilterInterfaceCstSPtr
std::shared_ptr< MassSpectrum > MassSpectrumSPtr
std::shared_ptr< XicCoord > XicCoordSPtr
Definition xiccoord.h:43
Base class for all tims ms run reader objects.