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"
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 massSpectrumSPtr(std::size_t spectrum_index) override;
50 virtual MassSpectrumCstSPtr massSpectrumCstSPtr(std::size_t spectrum_index) override;
51
52 virtual QualifiedMassSpectrum qualifiedMassSpectrum(std::size_t spectrum_index,
53 bool want_binary_data = true) const override;
54
55 virtual void readSpectrumCollection(SpectrumCollectionHandlerInterface &handler) override;
56
57 virtual void readSpectrumCollection2(const MsRunReadConfig &config,
58 SpectrumCollectionHandlerInterface &handler) override;
59
61 newXicCoordSPtrFromSpectrumIndex(std::size_t spectrum_index,
62 pappso::PrecisionPtr precision) const override;
63
66 pappso::PrecisionPtr precision) const override;
67
68
70 unsigned int ms_level) override;
71
72 virtual std::size_t spectrumListSize() const override;
73
74 virtual bool hasScanNumbers() const override;
75
78
79 /** @brief enable or disable simple centroid filter on raw tims data for MS2
80 */
81 void setMs2BuiltinCentroid(bool centroid);
82
83 /** @brief Get all the precursors id which match the values
84 * @return list of precursors Ids
85 */
86 virtual std::vector<std::size_t>
87 getPrecursorsIDFromMzRt(int charge, double mz_val, double rt_sec, double k0);
88
89
90 virtual bool releaseDevice() override;
91
92 virtual bool acquireDevice() override;
93
94 /** @brief give an access to the underlying raw data pointer
95 */
96 virtual TimsDataSp getTimsDataSPtr() override;
97
98
99 /** @brief retention timeline
100 * get retention times along the MSrun in seconds
101 * @return vector of retention times (seconds)
102 */
103 virtual std::vector<double> getRetentionTimeLine() override;
104
105 virtual Trace getTicChromatogram() override;
106
107 virtual std::size_t
108 spectrumStringIdentifier2SpectrumIndex(const QString &spectrum_identifier) override;
109
110
111 protected:
112 virtual void initialize() override;
113 virtual bool accept(const QString &file_name) const override;
115
116 private:
118
121 /** @brief enable builtin centroid on raw tims integers by default
122 */
124};
125
126
127} // namespace pappso
Class representing a fully specified mass spectrum.
interface to collect spectrums from the MsRunReader class
TimsMsRunReaderBase(MsRunIdCstSPtr &msrun_id_csp)
void setMs2FilterCstSPtr(pappso::FilterInterfaceCstSPtr filter)
void setMs1FilterCstSPtr(pappso::FilterInterfaceCstSPtr filter)
virtual QualifiedMassSpectrum qualifiedMassSpectrum(std::size_t spectrum_index, bool want_binary_data=true) const override
get a QualifiedMassSpectrum class given its scan number
TimsMsRunReaderMs2(MsRunIdCstSPtr &msrun_id_csp)
virtual pappso::XicCoordSPtr newXicCoordSPtrFromSpectrumIndex(std::size_t spectrum_index, pappso::PrecisionPtr precision) const override
get a xic coordinate object from a given spectrum index
virtual MassSpectrumSPtr massSpectrumSPtr(std::size_t spectrum_index) override
get a MassSpectrumSPtr class given its spectrum index
pappso::FilterInterfaceCstSPtr msp_ms2Filter
TimsDdaPrecursors * mp_timsDdaPrecursors
virtual std::size_t spectrumListSize() const override
get the totat number of spectrum conained in the MSrun data file
virtual bool releaseDevice() override
release data back end device if a the data back end is released, the developper has to use acquireDev...
pappso::FilterInterfaceCstSPtr msp_ms1Filter
virtual void readSpectrumCollection(SpectrumCollectionHandlerInterface &handler) override
function to visit an MsRunReader and get each Spectrum in a spectrum collection handler
virtual std::vector< std::size_t > getPrecursorsIDFromMzRt(int charge, double mz_val, double rt_sec, double k0)
Get all the precursors id which match the values.
virtual void initialize() override
virtual TimsDataSp getTimsDataSPtr() override
give an access to the underlying raw data pointer
virtual std::vector< double > getRetentionTimeLine() override
retention timeline get retention times along the MSrun in seconds
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...
bool m_builtinMs2Centroid
enable builtin centroid on raw tims integers by default
virtual Trace getTicChromatogram() override
get a TIC chromatogram
void setMs2BuiltinCentroid(bool centroid)
enable or disable simple centroid filter on raw tims data for MS2
virtual void readSpectrumCollection2(const MsRunReadConfig &config, SpectrumCollectionHandlerInterface &handler) override
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 bool acquireDevice() override
acquire data back end device
virtual bool hasScanNumbers() const override
tells if spectra can be accessed using scan numbers by default, it returns false. Only overrided func...
virtual MassSpectrumCstSPtr massSpectrumCstSPtr(std::size_t spectrum_index) override
virtual bool accept(const QString &file_name) const override
tells if the reader is able to handle this file must be implemented by private MS run reader,...
virtual pappso::XicCoordSPtr newXicCoordSPtrFromQualifiedMassSpectrum(const pappso::QualifiedMassSpectrum &mass_spectrum, pappso::PrecisionPtr precision) const override
get a xic coordinate object from a given spectrum
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
@ filter
concerning filters (psm, peptide, protein validation)
std::shared_ptr< const MsRunId > MsRunIdCstSPtr
Definition msrunid.h:46
std::shared_ptr< TimsData > TimsDataSp
shared pointer on a TimsData object
Definition timsdata.h:54
std::shared_ptr< const MassSpectrum > MassSpectrumCstSPtr
std::shared_ptr< const FilterInterface > FilterInterfaceCstSPtr
const PrecisionBase * PrecisionPtr
Definition precision.h:122
std::shared_ptr< MassSpectrum > MassSpectrumSPtr
std::shared_ptr< XicCoord > XicCoordSPtr
Definition xiccoord.h:44