libpappsomspp
Library for mass spectrometry
Loading...
Searching...
No Matches
xiccoord.h
Go to the documentation of this file.
1/**
2 * \file pappsomspp/msrun/xiccoord/xiccoord.h
3 * \date 22/04/2021
4 * \author Olivier Langella
5 * \brief XIC coordinate in MSrun
6 */
7
8
9/*******************************************************************************
10 * Copyright (c) 2021 Olivier Langella
11 *<Olivier.Langella@universite-paris-saclay.fr>.
12 *
13 * This file is part of the PAPPSOms++ library.
14 *
15 * PAPPSOms++ 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 * PAPPSOms++ 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 PAPPSOms++. If not, see <http://www.gnu.org/licenses/>.
27 *
28 ******************************************************************************/
29
30#pragma once
31
33#include "../../mzrange.h"
34#include "../../xic/xic.h"
35#include <memory>
36#include <QCborStreamWriter>
37
38namespace pappso
39{
40
41
42struct XicCoord;
43
44typedef std::shared_ptr<XicCoord> XicCoordSPtr;
45
46
47/** \def XicCoordParam xic coordinate parameter
48 *
49 */
50enum class XicCoordParam : std::int8_t
51{
52 TimsTofIonMobilityScanNumberStart, ///< TimsTOF specific ion mobility start
53 ///< range
54 TimsTofIonMobilityScanNumberStop, ///< TimsTOF specific ion mobility stop
55 ///< range
56};
57
58
59/** @brief coordinates of the XIC to extract and the resulting XIC after
60 * extraction
61 *
62 * to extract a XIC, we need basically the mass to extract it
63 * this structure is meant to extact a XIC quickly and not to maintain
64 * information about it : no peptide, no scan number, no retention time...
65 *
66 */
68{
69 /**
70 * Default constructor
71 */
72 XicCoord();
73
74 /**
75 * Copy constructor
76 *
77 * @param other TODO
78 */
79 XicCoord(const XicCoord &other);
80
81 /**
82 * Destructor
83 */
84 virtual ~XicCoord();
85
86
87 /** @brief intialize the XIC and make a deep copy of object
88 */
89 virtual XicCoordSPtr initializeAndClone() const;
90
91 /** @brief compute a new XIC coord as the sum of the given one
92 */
93 virtual XicCoordSPtr addition(const XicCoordSPtr &to_add) const;
94
95
96 /** @brief compute a new xic coord as a product by
97 */
98 virtual XicCoordSPtr multiplyBy(double number) const;
99
100
101 /** @brief compute a new xic coord as a division by
102 */
103 virtual XicCoordSPtr divideBy(double number) const;
104
105
106 /** @brief reset to zero
107 */
108 virtual void reset();
109
110 /** @brief get a description of the XIC coordinate in a string
111 */
112 virtual QString toString() const;
113
114 /** @brief get a specific XIC coordinate parameter
115 */
116 virtual const QVariant getParam(XicCoordParam param [[maybe_unused]]) const;
117
118 /** @brief writes xic coordinates in a cbor stream
119 */
120 virtual void writeCborStream(QCborStreamWriter &cbor_writer) const;
121
122
123 /** @brief the mass to extract
124 * */
126
127 /** @brief the targeted retention time to extract around
128 * intended in seconds, and related to one msrun. This is not a reference,
129 * just to save memory and cpu usage when extracting xic
130 */
131 double rtTarget = 0;
132
133 /** @brief extracted xic
134 */
135 XicSPtr xicSptr = nullptr;
136};
137} // namespace pappso
#define PMSPP_LIB_DECL
tries to keep as much as possible monoisotopes, removing any possible C13 peaks and changes multichar...
Definition aa.cpp:39
XicCoordParam
Definition xiccoord.h:51
@ TimsTofIonMobilityScanNumberStart
Definition xiccoord.h:52
std::shared_ptr< Xic > XicSPtr
Definition xic.h:39
std::shared_ptr< XicCoord > XicCoordSPtr
Definition xiccoord.h:44
coordinates of the XIC to extract and the resulting XIC after extraction
Definition xiccoord.h:68
XicSPtr xicSptr
extracted xic
Definition xiccoord.h:135
virtual XicCoordSPtr initializeAndClone() const
intialize the XIC and make a deep copy of object
Definition xiccoord.cpp:52
virtual XicCoordSPtr multiplyBy(double number) const
compute a new xic coord as a product by
Definition xiccoord.cpp:77
virtual XicCoordSPtr addition(const XicCoordSPtr &to_add) const
compute a new XIC coord as the sum of the given one
Definition xiccoord.cpp:63
double rtTarget
the targeted retention time to extract around intended in seconds, and related to one msrun....
Definition xiccoord.h:131
virtual void reset()
reset to zero
Definition xiccoord.cpp:104
virtual XicCoordSPtr divideBy(double number) const
compute a new xic coord as a division by
Definition xiccoord.cpp:90
virtual const QVariant getParam(XicCoordParam param) const
get a specific XIC coordinate parameter
Definition xiccoord.cpp:121
MzRange mzRange
the mass to extract
Definition xiccoord.h:125
virtual QString toString() const
get a description of the XIC coordinate in a string
Definition xiccoord.cpp:114
virtual void writeCborStream(QCborStreamWriter &cbor_writer) const
writes xic coordinates in a cbor stream
Definition xiccoord.cpp:127