libpappsomspp
Library for mass spectrometry
Toggle main menu visibility
Loading...
Searching...
No Matches
msrunreadconfig.h
Go to the documentation of this file.
1
/*******************************************************************************
2
* Copyright (c) 2023 Filippo Rusconi
3
*<filippo.rusconi@universite-paris-saclay.fr>.
4
*
5
* This file is part of the PAPPSOms++ library.
6
*
7
* PAPPSOms++ is free software: you can redistribute it and/or modify
8
* it under the terms of the GNU General Public License as published by
9
* the Free Software Foundation, either version 3 of the License, or
10
* (at your option) any later version.
11
*
12
* PAPPSOms++ is distributed in the hope that it will be useful,
13
* but WITHOUT ANY WARRANTY; without even the implied warranty of
14
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
* GNU General Public License for more details.
16
*
17
* You should have received a copy of the GNU General Public License
18
* along with PAPPSOms++. If not, see <http://www.gnu.org/licenses/>.
19
*
20
******************************************************************************/
21
22
#pragma once
23
24
#include <map>
25
#include <QVariant>
26
27
#include "
pappsomspp/export-import-config.h
"
28
29
namespace
pappso
30
{
31
32
/** \def MsRunReadConfigParameters specific parameters for MsRunReadConfig
33
*
34
*/
35
enum class
MsRunReadConfigParameter
36
{
37
// Only process mobility scans contained in the
38
// scan index range below.
39
TimsFrameIonMobScanIndexBegin
,
40
TimsFrameIonMobScanIndexEnd
,
41
42
// Only process mobility scans contained in the
43
// inverse mobility range below.
44
TimsFrameIonMobOneOverK0Begin
,
45
TimsFrameIonMobOneOverK0End
,
46
47
// Only process mass spectra for m/z values contained
48
// in the following m/z range.
49
MzRangeBegin
,
50
MzRangeEnd
,
51
52
// Merge m/z (TOF, really) indices on the basis of this
53
// count of m/z (TOF, really) indices.
54
TimsFrameMzIndexMergeWindow
,
55
};
56
57
// It is generally admitted that 11 is the max MS levels
58
// reachable using a Paul trap...
59
constexpr
std::size_t
MAX_MS_LEVELS
= 12;
60
61
class
PMSPP_LIB_DECL
MsRunReadConfig
62
{
63
64
public
:
65
MsRunReadConfig
();
66
MsRunReadConfig
(
const
MsRunReadConfig
&other);
67
68
~MsRunReadConfig
();
69
70
MsRunReadConfig
&
operator=
(
const
MsRunReadConfig
&other);
71
72
void
setRetentionTimeStartInSeconds
(
double
retention_time_start_in_seconds);
73
double
getRetentionTimeStartInSeconds
()
const
;
74
75
void
setRetentionTimeEndInSeconds
(
double
retention_time_end_in_seconds);
76
double
getRetentionTimeEndInSeconds
()
const
;
77
78
void
setMsLevels
(std::vector<std::size_t> ms_levels);
79
const
bool
*
getMsLevels
()
const
;
80
QString
getMsLevelsAsString
()
const
;
81
82
void
setNeedPeakList
(
bool
need_peak_list);
83
bool
needPeakList
()
const
;
84
85
void
setParameterValue
(
MsRunReadConfigParameter
parameter,
86
const
QVariant &value);
87
const
QVariant
getParameterValue
(
MsRunReadConfigParameter
parameter)
const
;
88
89
void
reset
();
90
91
QString
toString
()
const
;
92
93
bool
acceptMsLevel
(std::size_t ms_level)
const
;
94
bool
acceptRetentionTimeInSeconds
(
double
retention_time_in_seconds)
const
;
95
96
private
:
97
double
m_retentionTimeStartSeconds
= -1;
98
double
m_retentionTimeEndSeconds
= -1;
99
100
bool
m_isPeakListNeeded
=
true
;
101
102
// Initialize the ms levels to false.
103
// Each index in the array contains a bool value indicating, if true, a
104
// requested MS level.
105
bool
m_msLevels
[
MAX_MS_LEVELS
] = {
false
};
106
// Fixme: maybe we should initialize in the constructor the MS level 1 to
107
// true?
108
109
//! map containing any parameter value
110
std::map<MsRunReadConfigParameter, QVariant>
m_paramsMap
;
111
};
112
113
}
// namespace pappso
pappso::MsRunReadConfig::needPeakList
bool needPeakList() const
Definition
msrunreadconfig.cpp:167
pappso::MsRunReadConfig::getRetentionTimeEndInSeconds
double getRetentionTimeEndInSeconds() const
Definition
msrunreadconfig.cpp:83
pappso::MsRunReadConfig::m_retentionTimeStartSeconds
double m_retentionTimeStartSeconds
Definition
msrunreadconfig.h:97
pappso::MsRunReadConfig::m_msLevels
bool m_msLevels[MAX_MS_LEVELS]
Definition
msrunreadconfig.h:105
pappso::MsRunReadConfig::operator=
MsRunReadConfig & operator=(const MsRunReadConfig &other)
Definition
msrunreadconfig.cpp:49
pappso::MsRunReadConfig::toString
QString toString() const
Definition
msrunreadconfig.cpp:225
pappso::MsRunReadConfig::m_retentionTimeEndSeconds
double m_retentionTimeEndSeconds
Definition
msrunreadconfig.h:98
pappso::MsRunReadConfig::setNeedPeakList
void setNeedPeakList(bool need_peak_list)
Definition
msrunreadconfig.cpp:173
pappso::MsRunReadConfig::setRetentionTimeStartInSeconds
void setRetentionTimeStartInSeconds(double retention_time_start_in_seconds)
Definition
msrunreadconfig.cpp:65
pappso::MsRunReadConfig::getParameterValue
const QVariant getParameterValue(MsRunReadConfigParameter parameter) const
Definition
msrunreadconfig.cpp:192
pappso::MsRunReadConfig::acceptMsLevel
bool acceptMsLevel(std::size_t ms_level) const
Definition
msrunreadconfig.cpp:133
pappso::MsRunReadConfig::acceptRetentionTimeInSeconds
bool acceptRetentionTimeInSeconds(double retention_time_in_seconds) const
Definition
msrunreadconfig.cpp:142
pappso::MsRunReadConfig::m_isPeakListNeeded
bool m_isPeakListNeeded
Definition
msrunreadconfig.h:100
pappso::MsRunReadConfig::m_paramsMap
std::map< MsRunReadConfigParameter, QVariant > m_paramsMap
map containing any parameter value
Definition
msrunreadconfig.h:110
pappso::MsRunReadConfig::reset
void reset()
Definition
msrunreadconfig.cpp:207
pappso::MsRunReadConfig::getRetentionTimeStartInSeconds
double getRetentionTimeStartInSeconds() const
Definition
msrunreadconfig.cpp:71
pappso::MsRunReadConfig::MsRunReadConfig
MsRunReadConfig()
Definition
msrunreadconfig.cpp:28
pappso::MsRunReadConfig::setMsLevels
void setMsLevels(std::vector< std::size_t > ms_levels)
Definition
msrunreadconfig.cpp:89
pappso::MsRunReadConfig::setRetentionTimeEndInSeconds
void setRetentionTimeEndInSeconds(double retention_time_end_in_seconds)
Definition
msrunreadconfig.cpp:77
pappso::MsRunReadConfig::getMsLevelsAsString
QString getMsLevelsAsString() const
Definition
msrunreadconfig.cpp:118
pappso::MsRunReadConfig::getMsLevels
const bool * getMsLevels() const
Definition
msrunreadconfig.cpp:112
pappso::MsRunReadConfig::setParameterValue
void setParameterValue(MsRunReadConfigParameter parameter, const QVariant &value)
Definition
msrunreadconfig.cpp:179
export-import-config.h
PMSPP_LIB_DECL
#define PMSPP_LIB_DECL
Definition
export-import-config.h:14
pappso
tries to keep as much as possible monoisotopes, removing any possible C13 peaks and changes multichar...
Definition
aa.cpp:39
pappso::QualifiedMassSpectrumParameter::TimsFrameIonMobScanIndexBegin
@ TimsFrameIonMobScanIndexBegin
Definition
qualifiedmassspectrum.h:54
pappso::QualifiedMassSpectrumParameter::TimsFrameIonMobScanIndexEnd
@ TimsFrameIonMobScanIndexEnd
Definition
qualifiedmassspectrum.h:55
pappso::MAX_MS_LEVELS
constexpr std::size_t MAX_MS_LEVELS
Definition
msrunreadconfig.h:59
pappso::MsRunReadConfigParameter
MsRunReadConfigParameter
Definition
msrunreadconfig.h:36
pappso::MsRunReadConfigParameter::MzRangeBegin
@ MzRangeBegin
Definition
msrunreadconfig.h:49
pappso::MsRunReadConfigParameter::TimsFrameIonMobOneOverK0Begin
@ TimsFrameIonMobOneOverK0Begin
Definition
msrunreadconfig.h:44
pappso::MsRunReadConfigParameter::TimsFrameIonMobOneOverK0End
@ TimsFrameIonMobOneOverK0End
Definition
msrunreadconfig.h:45
pappso::MsRunReadConfigParameter::TimsFrameMzIndexMergeWindow
@ TimsFrameMzIndexMergeWindow
Definition
msrunreadconfig.h:54
pappso::MsRunReadConfigParameter::MzRangeEnd
@ MzRangeEnd
Definition
msrunreadconfig.h:50
pappsomspp
core
msrun
msrunreadconfig.h
Generated on
for libpappsomspp by
1.17.0