libpappsomspp
Library for mass spectrometry
Loading...
Searching...
No Matches
msrun.cpp
Go to the documentation of this file.
1/**
2 * \file pappsomspp/masschroq/core/msrun.cpp
3 * \date 24/09/2024
4 * \author Olivier Langella
5 * \brief msrun model in masschroqlite
6 */
7
8/*******************************************************************************
9 * Copyright (c) 2024 Olivier Langella
10 *<Olivier.Langella@universite-paris-saclay.fr>.
11 *
12 * This file is part of MassChroQ.
13 *
14 * MassChroQ 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 * MassChroQ 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 MassChroQ. If not, see <http://www.gnu.org/licenses/>.
26 *
27 ******************************************************************************/
28
29
30#include "msrun.h"
33
34
36 : msp_msRunReader(msrun_reader)
37{
38
39 pappso::TimsMsRunReaderMs2 *tims2_reader =
40 dynamic_cast<pappso::TimsMsRunReaderMs2 *>(msp_msRunReader.get());
41 if(tims2_reader != nullptr)
42 {
44 }
45
48
50 config.setNeedPeakList(false);
51 config.setMsLevels({2});
52 qDebug();
53 // msrunA01.get()->readSpectrumCollection(spectrum_list_reader);
54 msp_msRunReader.get()->readSpectrumCollection2(config, *mpa_precursorParser);
55}
56
61
67
73
74
77{
78 std::size_t spectrum_index = msp_msRunReader.get()->scanNumber2SpectrumIndex(scan_number);
79 return mpa_precursorParser->getPrecursorSPtrBySpectrumIndex(spectrum_index);
80}
83{
84 return mpa_precursorParser->getPrecursorSPtrBySpectrumIndex(spectrum_index);
85}
86
87const std::vector<double> &
92
93bool
void setNeedPeakList(bool need_peak_list)
void setMsLevels(std::vector< std::size_t > ms_levels)
MsRun(pappso::MsRunReaderSPtr msrun_reader)
Definition msrun.cpp:35
const pappso::MsRunReaderSPtr & getMsRunReaderSPtr() const
Definition msrun.cpp:63
bool hasTimsTofMobilityIndex() const
Definition msrun.cpp:94
PrecursorParser * mpa_precursorParser
Definition msrun.h:83
const PrecursorSp & getPrecursorSPtrBySpectrumIndex(std::size_t spectrum_index) const
Definition msrun.cpp:82
std::vector< double > m_retentionTimeLine
Definition msrun.h:85
const PrecursorSp & getPrecursorSPtrByScanNumber(std::size_t scan_number) const
Definition msrun.cpp:76
bool m_hasTimsTofMobilityIndex
Definition msrun.h:87
pappso::MsRunReaderSPtr msp_msRunReader
Definition msrun.h:75
const std::vector< double > & getRetentionTimeLine() const
Definition msrun.cpp:88
std::shared_ptr< Precursor > PrecursorSp
Definition precursor.h:39
std::shared_ptr< MsRunReader > MsRunReaderSPtr
Definition msrunreader.h:57