libpappsomspp
Library for mass spectrometry
Toggle main menu visibility
Loading...
Searching...
No Matches
precursorparser.h
Go to the documentation of this file.
1
2
/**
3
* \file pappsomspp/masschroq/input/precursorparser.h
4
* \date 25/09/2024
5
* \author Olivier Langella
6
* \brief read presurcors in ms run files for MassChroqLight
7
*/
8
9
/*******************************************************************************
10
* Copyright (c) 2024 Olivier Langella
11
*<Olivier.Langella@universite-paris-saclay.fr>.
12
*
13
* This file is part of MassChroQ.
14
*
15
* MassChroQ 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
* MassChroQ 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 MassChroQ. If not, see <http://www.gnu.org/licenses/>.
27
*
28
******************************************************************************/
29
30
#pragma once
31
32
#include "
pappsomspp/core/msrun/msrunreader.h
"
33
#include "
../precursor.h
"
34
namespace
pappso::masschroq
35
{
36
37
/**
38
* @todo write docs
39
*/
40
class
PrecursorParser
:
public
pappso::SpectrumCollectionHandlerInterface
41
{
42
public
:
43
public
:
44
PrecursorParser
(
pappso::MsRunReaderCstSPtr
msrun_reader);
45
46
virtual
~PrecursorParser
();
47
48
virtual
void
setQualifiedMassSpectrum
(
49
const
pappso::QualifiedMassSpectrum
&qspectrum)
override
;
50
virtual
bool
needPeakList
()
const override
;
51
virtual
bool
isReadAhead
()
const override
;
52
53
const
PrecursorSp
&
54
getPrecursorSPtrBySpectrumIndex
(std::size_t spectrum_index)
const
;
55
const
PrecursorSp
&
56
getPrecursorSPtrByScanNumber
(std::size_t spectrum_index)
const
;
57
58
59
private
:
60
/// map precursor to its scan number as parsed in the xml file of this msrun
61
void
mapScanNumberPrecursor
(std::size_t scan_num,
PrecursorSp
precursor);
62
63
/** @brief map spectrum index to precursor
64
* new modern method to replace obsolete scan number
65
*/
66
void
mapSpectrumIndexToPrecursor
(std::size_t spectrum_index,
67
PrecursorSp
precursor);
68
69
70
private
:
71
pappso::MsRunReaderCstSPtr
msp_msrunReader
;
72
73
std::map<std::size_t, PrecursorSp>
m_scanNumber2PrecursorMap
;
74
std::map<std::size_t, PrecursorSp>
m_spectrumIndex2PrecursorMap
;
75
};
76
}
// namespace mcql
pappso::QualifiedMassSpectrum
Class representing a fully specified mass spectrum.
Definition
qualifiedmassspectrum.h:98
pappso::SpectrumCollectionHandlerInterface
interface to collect spectrums from the MsRunReader class
Definition
spectrumcollectionhandlerinterface.h:52
pappso::masschroq::PrecursorParser::getPrecursorSPtrBySpectrumIndex
const PrecursorSp & getPrecursorSPtrBySpectrumIndex(std::size_t spectrum_index) const
Definition
precursorparser.cpp:143
pappso::masschroq::PrecursorParser::mapSpectrumIndexToPrecursor
void mapSpectrumIndexToPrecursor(std::size_t spectrum_index, PrecursorSp precursor)
map spectrum index to precursor new modern method to replace obsolete scan number
Definition
precursorparser.cpp:125
pappso::masschroq::PrecursorParser::m_scanNumber2PrecursorMap
std::map< std::size_t, PrecursorSp > m_scanNumber2PrecursorMap
Definition
precursorparser.h:73
pappso::masschroq::PrecursorParser::needPeakList
virtual bool needPeakList() const override
tells if we need the peak list (if we want the binary data) for each spectrum
Definition
precursorparser.cpp:46
pappso::masschroq::PrecursorParser::mapScanNumberPrecursor
void mapScanNumberPrecursor(std::size_t scan_num, PrecursorSp precursor)
map precursor to its scan number as parsed in the xml file of this msrun
Definition
precursorparser.cpp:111
pappso::masschroq::PrecursorParser::m_spectrumIndex2PrecursorMap
std::map< std::size_t, PrecursorSp > m_spectrumIndex2PrecursorMap
Definition
precursorparser.h:74
pappso::masschroq::PrecursorParser::~PrecursorParser
virtual ~PrecursorParser()
Definition
precursorparser.cpp:41
pappso::masschroq::PrecursorParser::setQualifiedMassSpectrum
virtual void setQualifiedMassSpectrum(const pappso::QualifiedMassSpectrum &qspectrum) override
Definition
precursorparser.cpp:51
pappso::masschroq::PrecursorParser::isReadAhead
virtual bool isReadAhead() const override
tells if we want to read ahead spectrum
Definition
precursorparser.cpp:105
pappso::masschroq::PrecursorParser::getPrecursorSPtrByScanNumber
const PrecursorSp & getPrecursorSPtrByScanNumber(std::size_t spectrum_index) const
Definition
precursorparser.cpp:160
pappso::masschroq::PrecursorParser::PrecursorParser
PrecursorParser(pappso::MsRunReaderCstSPtr msrun_reader)
Definition
precursorparser.cpp:35
pappso::masschroq::PrecursorParser::msp_msrunReader
pappso::MsRunReaderCstSPtr msp_msrunReader
Definition
precursorparser.h:71
precursor.h
msrunreader.h
pappso::masschroq
Definition
alignmentmethod.h:38
pappso::masschroq::PrecursorSp
std::shared_ptr< Precursor > PrecursorSp
Definition
precursor.h:39
pappso::MsRunReaderCstSPtr
std::shared_ptr< const MsRunReader > MsRunReaderCstSPtr
Definition
msrunreader.h:58
pappsomspp
core
masschroq
input
precursorparser.h
Generated on
for libpappsomspp by
1.17.0