libpappsomspp
Library for mass spectrometry
Loading...
Searching...
No Matches
alignmentmethod.cpp
Go to the documentation of this file.
1/**
2 * \file pappsomspp/masschroq/alignmentmethod.cpp
3 * \date 25/10/2024
4 * \author Olivier Langella
5 * \brief store parameters related to msrun alignment
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#include "alignmentmethod.h"
30
37
45
46
50
51const QString &
56
57void
59{
60 m_ms1SmoothingWindow = ms1_smoothing_window;
61}
62
63void
65{
66 m_ms2SmoothingWindow = ms2_smoothing_window;
67}
68
69void
71{
72 m_ms2TendencyWindow = ms2_tendency_window;
73}
74
75
76std::uint8_t
81
82std::uint8_t
87
88std::uint8_t
93
96{
98 /*
99 pappso::ProjectParam project_param(
100 {pappso::ProjectParamCategory::quantification, "", QVariant()});
101
102 project_param.name = "mcq_alignment_msrun_reference_for_rt_alignment";
103 QString msrunid = m_qxmlStreamReader.attributes()
104 .value("reference_data_id")
105 .toString();
106 project_param.value.setValue(
107 m_mcqrMetadataSet.getMcqrMetadaByDataId(msrunid).m_msrunFile);
108 m_projectParameters.setProjectParam(project_param);
109 */
110
111 pappso::ProjectParam project_param(
113 project_param.name = "mcq_alignment_ms2_tendency_window";
114 project_param.value.setValue((std::size_t)m_ms2TendencyWindow);
115 parameters.setProjectParam(project_param);
116 project_param.name = "mcq_alignment_ms1_smoothing_window";
117 project_param.value.setValue((std::size_t)m_ms1SmoothingWindow);
118 parameters.setProjectParam(project_param);
119 project_param.name = "mcq_alignment_ms2_smoothing_window";
120 project_param.value.setValue((std::size_t)m_ms2SmoothingWindow);
121 parameters.setProjectParam(project_param);
122
123 return parameters;
124}
125
126void
128{
129 setMs1SmoothingWindow(align_method.value("ms1_smoothing").toInt());
130 setMs2SmoothingWindow(align_method.value("ms2_smoothing").toInt());
131 setMs2TendencyWindow(align_method.value("ms2_tendency").toInt());
132}
133
134QJsonObject
136{
137 QJsonObject method;
138
139 method.insert("ms1_smoothing", m_ms1SmoothingWindow);
140
141 method.insert("ms2_smoothing", m_ms2SmoothingWindow);
142
143 method.insert("ms2_tendency", m_ms2TendencyWindow);
144
145
146 return method;
147}
void setProjectParam(const ProjectParam &param)
pappso::ProjectParameters getProjectParameters() const
void setJsonObject(const QJsonObject &json_object)
void setMs1SmoothingWindow(std::uint8_t ms1_smoothing_window)
void setMs2TendencyWindow(std::uint8_t ms2_tendency_window)
std::uint8_t getMs2SmoothingWindow() const
std::uint8_t getMs1SmoothingWindow() const
std::uint8_t getMs2TendencyWindow() const
void setMs2SmoothingWindow(std::uint8_t ms2_smoothing_window)