libpappsomspp
Library for mass spectrometry
Toggle main menu visibility
Loading...
Searching...
No Matches
cboroutputstream.h
Go to the documentation of this file.
1
2
/**
3
* \file pappsomspp/masschroq/output/cboroutputstream.h
4
* \date 02/01/2025
5
* \author Olivier Langella
6
* \brief quantification result cbor writer for MassChroqLight
7
*/
8
9
/*******************************************************************************
10
* Copyright (c) 2025 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 <QStringList>
33
#include "
pappsomspp/core/processing/cbor/cborstreamwriter.h
"
34
#include <QJsonObject>
35
#include "
../msrun.h
"
36
#include "
../msrunpeptidelist.h
"
37
#include "
../peptidemeasurements.h
"
38
#include "
../mbrpeptidemeasurements.h
"
39
#include "
pappsomspp/core/msrun/alignment/msrunretentiontime.h
"
40
#include "
pappsomspp/core/processing/project/projectparameters.h
"
41
#include "
pappsomspp/export-import-config.h
"
42
43
44
namespace
pappso::masschroq
45
{
46
47
/**
48
* @todo write docs
49
*/
50
class
PMSPP_LIB_DECL
CborOutputStream
51
{
52
public
:
53
/**
54
* Default constructor
55
*/
56
CborOutputStream
(QIODevice *device);
57
58
/**
59
* Destructor
60
*/
61
virtual
~CborOutputStream
();
62
63
/** @brief set trace output flag
64
* */
65
void
setIsTraceOutput
(
bool
is_trace_output);
66
67
68
/** @brief set peak shape output flag
69
* */
70
void
setIsPeakShapeOutput
(
bool
is_shape_output,
double
margin_in_seconds);
71
72
void
writeJsonObject
(
const
QString &name,
const
QJsonObject &json_object);
73
74
void
writeProjectParameters
(
const
pappso::ProjectParameters
&project_parameters);
75
76
77
void
writeActionBegin
(
const
QString &operation);
78
79
void
close
();
80
81
82
QCborStreamWriter &
getCborStreamWriter
();
83
84
85
void
writeQrDataBlock
(
pappso::UiMonitorInterface
&m_uiMonitor,
86
const
MsRunPeptideList
&msrun_peptide_list,
87
bool
is_mbr);
88
89
void
writeMsRunRetentionTime
(
const
pappso::Trace
&report_common_ms2,
90
const
pappso::MsRunRetentionTime<QString>
&msrun_retention_time);
91
92
private
:
93
void
94
writeMbrPeptideMeasurements
(
const
MbrPeptideMeasurements
&peptide_measurements,
95
const
pappso::MsRunRetentionTime<QString>
*msrun_retention_time_p);
96
97
void
writeMeasurement
(
const
PeptideMeasurements::Measurement
&measurement,
98
const
pappso::MsRunRetentionTime<QString>
*msrun_retention_time_p);
99
void
writeTrace
(
const
pappso::Trace
&trace);
100
void
writeVectorDouble
(
const
std::vector<double> &vector);
101
void
writeTracePeak
(
const
pappso::TracePeak
&peak,
102
const
pappso::MsRunRetentionTime<QString>
*msrun_retention_time_p);
103
void
writeActionEnd
();
104
105
106
void
writeMsRun
(
const
MsRun
&msrun);
107
108
void
writePeptideMeasurements
(
const
PeptideMeasurements
&peptide_measurements,
109
const
pappso::MsRunRetentionTime<QString>
*msrun_retention_time_p);
110
111
112
private
:
113
pappso::cbor::CborStreamWriter
*
mpa_writer
=
nullptr
;
114
bool
m_isTraceOutput
=
false
;
115
bool
m_isPeakShapeOutput
=
false
;
116
bool
m_isXicCoordOutput
=
true
;
117
118
double
m_peakShapeMarginInSeconds
= 20;
119
};
120
}
// namespace pappso::masschroq
cborstreamwriter.h
pappso::MsRunRetentionTime
Definition
msrunretentiontime.h:43
pappso::ProjectParameters
Definition
projectparameters.h:66
pappso::TracePeak
Definition
tracepeak.h:40
pappso::Trace
A simple container of DataPoint instances.
Definition
trace.h:152
pappso::UiMonitorInterface
Definition
uimonitorinterface.h:50
pappso::cbor::CborStreamWriter
overrides QCborStreamWriter base class to provide convenient functions
Definition
cborstreamwriter.h:46
pappso::masschroq::CborOutputStream::m_peakShapeMarginInSeconds
double m_peakShapeMarginInSeconds
Definition
cboroutputstream.h:118
pappso::masschroq::CborOutputStream::close
void close()
Definition
cboroutputstream.cpp:83
pappso::masschroq::CborOutputStream::setIsTraceOutput
void setIsTraceOutput(bool is_trace_output)
set trace output flag
Definition
cboroutputstream.cpp:60
pappso::masschroq::CborOutputStream::writeMbrPeptideMeasurements
void writeMbrPeptideMeasurements(const MbrPeptideMeasurements &peptide_measurements, const pappso::MsRunRetentionTime< QString > *msrun_retention_time_p)
Definition
cboroutputstream.cpp:300
pappso::masschroq::CborOutputStream::setIsPeakShapeOutput
void setIsPeakShapeOutput(bool is_shape_output, double margin_in_seconds)
set peak shape output flag
Definition
cboroutputstream.cpp:53
pappso::masschroq::CborOutputStream::m_isPeakShapeOutput
bool m_isPeakShapeOutput
Definition
cboroutputstream.h:115
pappso::masschroq::CborOutputStream::mpa_writer
pappso::cbor::CborStreamWriter * mpa_writer
Definition
cboroutputstream.h:113
pappso::masschroq::CborOutputStream::writeJsonObject
void writeJsonObject(const QString &name, const QJsonObject &json_object)
Definition
cboroutputstream.cpp:92
pappso::masschroq::CborOutputStream::writeTrace
void writeTrace(const pappso::Trace &trace)
Definition
cboroutputstream.cpp:242
pappso::masschroq::CborOutputStream::m_isTraceOutput
bool m_isTraceOutput
Definition
cboroutputstream.h:114
pappso::masschroq::CborOutputStream::writeMeasurement
void writeMeasurement(const PeptideMeasurements::Measurement &measurement, const pappso::MsRunRetentionTime< QString > *msrun_retention_time_p)
Definition
cboroutputstream.cpp:163
pappso::masschroq::CborOutputStream::writeProjectParameters
void writeProjectParameters(const pappso::ProjectParameters &project_parameters)
Definition
cboroutputstream.cpp:424
pappso::masschroq::CborOutputStream::writeActionEnd
void writeActionEnd()
Definition
cboroutputstream.cpp:74
pappso::masschroq::CborOutputStream::getCborStreamWriter
QCborStreamWriter & getCborStreamWriter()
Definition
cboroutputstream.cpp:101
pappso::masschroq::CborOutputStream::writeMsRunRetentionTime
void writeMsRunRetentionTime(const pappso::Trace &report_common_ms2, const pappso::MsRunRetentionTime< QString > &msrun_retention_time)
Definition
cboroutputstream.cpp:430
pappso::masschroq::CborOutputStream::writeMsRun
void writeMsRun(const MsRun &msrun)
Definition
cboroutputstream.cpp:108
pappso::masschroq::CborOutputStream::m_isXicCoordOutput
bool m_isXicCoordOutput
Definition
cboroutputstream.h:116
pappso::masschroq::CborOutputStream::writeVectorDouble
void writeVectorDouble(const std::vector< double > &vector)
Definition
cboroutputstream.cpp:413
pappso::masschroq::CborOutputStream::writeActionBegin
void writeActionBegin(const QString &operation)
Definition
cboroutputstream.cpp:66
pappso::masschroq::CborOutputStream::CborOutputStream
CborOutputStream(QIODevice *device)
Definition
cboroutputstream.cpp:42
pappso::masschroq::CborOutputStream::writeTracePeak
void writeTracePeak(const pappso::TracePeak &peak, const pappso::MsRunRetentionTime< QString > *msrun_retention_time_p)
Definition
cboroutputstream.cpp:265
pappso::masschroq::CborOutputStream::writeQrDataBlock
void writeQrDataBlock(pappso::UiMonitorInterface &m_uiMonitor, const MsRunPeptideList &msrun_peptide_list, bool is_mbr)
Definition
cboroutputstream.cpp:338
pappso::masschroq::CborOutputStream::writePeptideMeasurements
void writePeptideMeasurements(const PeptideMeasurements &peptide_measurements, const pappso::MsRunRetentionTime< QString > *msrun_retention_time_p)
Definition
cboroutputstream.cpp:123
pappso::masschroq::MbrPeptideMeasurements
Definition
mbrpeptidemeasurements.h:49
pappso::masschroq::MsRunPeptideList
Definition
msrunpeptidelist.h:54
pappso::masschroq::MsRun
Definition
msrun.h:50
pappso::masschroq::PeptideMeasurements
Definition
peptidemeasurements.h:58
export-import-config.h
PMSPP_LIB_DECL
#define PMSPP_LIB_DECL
Definition
export-import-config.h:14
mbrpeptidemeasurements.h
msrun.h
msrunpeptidelist.h
msrunretentiontime.h
pappso::masschroq
Definition
alignmentmethod.h:38
peptidemeasurements.h
projectparameters.h
pappso::masschroq::PeptideMeasurementsBase::Measurement
Definition
peptidemeasurementsbase.h:74
pappsomspp
core
masschroq
output
cboroutputstream.h
Generated on
for libpappsomspp by
1.17.0