libpappsomspp
Library for mass spectrometry
Toggle main menu visibility
Loading...
Searching...
No Matches
precursor.h
Go to the documentation of this file.
1
/**
2
* \file pappsomspp/core/processing/cbor/mzcbor/precursor.h
3
* \date 24/11/2025
4
* \author Olivier Langella
5
* \brief PSI precursor object for mzML/mzCBOR
6
*/
7
8
/*******************************************************************************
9
* Copyright (c) 2025 Olivier Langella <Olivier.Langella@universite-paris-saclay.fr>.
10
*
11
* This file is part of PAPPSOms-tools.
12
*
13
* PAPPSOms-tools is free software: you can redistribute it and/or modify
14
* it under the terms of the GNU General Public License as published by
15
* the Free Software Foundation, either version 3 of the License, or
16
* (at your option) any later version.
17
*
18
* PAPPSOms-tools is distributed in the hope that it will be useful,
19
* but WITHOUT ANY WARRANTY; without even the implied warranty of
20
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21
* GNU General Public License for more details.
22
*
23
* You should have received a copy of the GNU General Public License
24
* along with PAPPSOms-tools. If not, see <http://www.gnu.org/licenses/>.
25
*
26
******************************************************************************/
27
28
29
#pragma once
30
#include <QString>
31
#include <qcbormap.h>
32
#include "
pappsomspp/core/processing/cbor/cborstreamreader.h
"
33
#include "
pappsomspp/core/processing/cbor/mzcbor/cvparammap.h
"
34
35
namespace
pappso
36
{
37
namespace
cbor
38
{
39
namespace
mzcbor
40
{
41
42
struct
PMSPP_LIB_DECL
IsolationWindow
43
{
44
void
fromCbor
(
CborStreamReader
&reader);
45
void
fromQCborMap
(
const
QCborMap &reader);
46
47
/** @brief write the structure to a JSON object
48
* @result QJsonObject
49
*/
50
QJsonObject
toJsonObject
()
const
;
51
52
/** @brief get isolation window target m/z given cvParam informations
53
*
54
*/
55
double
getTargetMz
()
const
;
56
57
/** @brief compute isolation window lower m/z given cvParam informations
58
*
59
*/
60
double
getLowerMz
()
const
;
61
62
63
/** @brief compute isolation window upper m/z given cvParam informations
64
*
65
*/
66
double
getUpperMz
()
const
;
67
68
CvParamMap
cvParamMap
;
69
};
70
71
struct
PMSPP_LIB_DECL
SelectedIon
72
{
73
void
fromCbor
(
CborStreamReader
&reader);
74
void
fromQCborMap
(
const
QCborMap &reader);
75
76
int
getChargeState
()
const
;
77
double
getIntensity
(
bool
*isok)
const
;
78
double
getMz
()
const
;
79
80
CvParamMap
cvParamMap
;
81
};
82
/**
83
* @todo write docs
84
*/
85
struct
PMSPP_LIB_DECL
Precursor
86
{
87
void
fromCbor
(
CborStreamReader
&reader);
88
89
/** @brief write the structure to a JSON object
90
* @result QJsonObject
91
*/
92
QJsonObject
toJsonObject
()
const
;
93
94
QString
spectrumRef
;
95
96
IsolationWindow
isolationWindow
;
97
98
CvParamMap
selectedIonListCvParamMap
;
99
100
std::vector<SelectedIon>
selectedIonList
;
101
};
102
}
// namespace mzcbor
103
}
// namespace cbor
104
}
// namespace pappso
cborstreamreader.h
pappso::cbor::CborStreamReader
simple override of the raw QCborStreamReader This adds convenient functions to put CBOR data into C++...
Definition
cborstreamreader.h:47
cvparammap.h
cvParam map
PMSPP_LIB_DECL
#define PMSPP_LIB_DECL
Definition
export-import-config.h:14
pappso::cbor::mzcbor
Definition
binarydataarray.h:41
pappso::cbor
Definition
cborstreamreader.cpp:35
pappso
tries to keep as much as possible monoisotopes, removing any possible C13 peaks and changes multichar...
Definition
aa.cpp:39
pappso::cbor::mzcbor::CvParamMap
Definition
cvparammap.h:46
pappso::cbor::mzcbor::IsolationWindow
Definition
precursor.h:43
pappso::cbor::mzcbor::IsolationWindow::getUpperMz
double getUpperMz() const
compute isolation window upper m/z given cvParam informations
Definition
precursor.cpp:141
pappso::cbor::mzcbor::IsolationWindow::getLowerMz
double getLowerMz() const
compute isolation window lower m/z given cvParam informations
Definition
precursor.cpp:104
pappso::cbor::mzcbor::IsolationWindow::getTargetMz
double getTargetMz() const
get isolation window target m/z given cvParam informations
Definition
precursor.cpp:86
pappso::cbor::mzcbor::IsolationWindow::toJsonObject
QJsonObject toJsonObject() const
write the structure to a JSON object
Definition
precursor.cpp:124
pappso::cbor::mzcbor::IsolationWindow::fromQCborMap
void fromQCborMap(const QCborMap &reader)
Definition
precursor.cpp:35
pappso::cbor::mzcbor::IsolationWindow::cvParamMap
CvParamMap cvParamMap
Definition
precursor.h:68
pappso::cbor::mzcbor::IsolationWindow::fromCbor
void fromCbor(CborStreamReader &reader)
Definition
precursor.cpp:50
pappso::cbor::mzcbor::Precursor
Definition
precursor.h:86
pappso::cbor::mzcbor::Precursor::isolationWindow
IsolationWindow isolationWindow
Definition
precursor.h:96
pappso::cbor::mzcbor::Precursor::spectrumRef
QString spectrumRef
Definition
precursor.h:94
pappso::cbor::mzcbor::Precursor::toJsonObject
QJsonObject toJsonObject() const
write the structure to a JSON object
Definition
precursor.cpp:131
pappso::cbor::mzcbor::Precursor::selectedIonList
std::vector< SelectedIon > selectedIonList
Definition
precursor.h:100
pappso::cbor::mzcbor::Precursor::selectedIonListCvParamMap
CvParamMap selectedIonListCvParamMap
Definition
precursor.h:98
pappso::cbor::mzcbor::Precursor::fromCbor
void fromCbor(CborStreamReader &reader)
Definition
precursor.cpp:272
pappso::cbor::mzcbor::SelectedIon
Definition
precursor.h:72
pappso::cbor::mzcbor::SelectedIon::getMz
double getMz() const
Definition
precursor.cpp:255
pappso::cbor::mzcbor::SelectedIon::fromQCborMap
void fromQCborMap(const QCborMap &reader)
Definition
precursor.cpp:162
pappso::cbor::mzcbor::SelectedIon::getChargeState
int getChargeState() const
Definition
precursor.cpp:214
pappso::cbor::mzcbor::SelectedIon::cvParamMap
CvParamMap cvParamMap
Definition
precursor.h:80
pappso::cbor::mzcbor::SelectedIon::fromCbor
void fromCbor(CborStreamReader &reader)
Definition
precursor.cpp:177
pappso::cbor::mzcbor::SelectedIon::getIntensity
double getIntensity(bool *isok) const
Definition
precursor.cpp:230
pappsomspp
core
processing
cbor
mzcbor
precursor.h
Generated on
for libpappsomspp by
1.17.0