libpappsomspp
Library for mass spectrometry
pappso::XicCoordTims Struct Reference

coordinates of the XIC to extract and the resulting XIC after extraction More...

#include <xiccoordtims.h>

Inheritance diagram for pappso::XicCoordTims:
pappso::XicCoord

Public Member Functions

 XicCoordTims ()
 
 XicCoordTims (const XicCoordTims &other)
 
virtual ~XicCoordTims ()
 
virtual XicCoordSPtr initializeAndClone () const override
 intialize the XIC and make a deep copy of object More...
 
virtual XicCoordSPtr addition (XicCoordSPtr &to_add) const override
 compute a new XIC coord as the sum of the given one More...
 
virtual XicCoordSPtr multiplyBy (double number) const override
 compute a new xic coord as a product by More...
 
virtual XicCoordSPtr divideBy (double number) const override
 compute a new xic coord as a division by More...
 
virtual void reset () override
 reset to zero More...
 
virtual QString toString () const override
 get a description of the XIC coordinate in a string More...
 
virtual const QVariant getParam (XicCoordParam param) const override
 get a specific XIC coordinate parameter More...
 
void scanNumBeginRangeCorrection (long start_dev, long stop_dev)
 apply scan num correction on xic coordinate More...
 
- Public Member Functions inherited from pappso::XicCoord
 XicCoord ()
 
 XicCoord (const XicCoord &other)
 
virtual ~XicCoord ()
 
virtual XicCoordSPtr initializeAndClone () const
 intialize the XIC and make a deep copy of object More...
 
virtual XicCoordSPtr addition (XicCoordSPtr &to_add) const
 compute a new XIC coord as the sum of the given one More...
 
virtual XicCoordSPtr multiplyBy (double number) const
 compute a new xic coord as a product by More...
 
virtual XicCoordSPtr divideBy (double number) const
 compute a new xic coord as a division by More...
 
virtual void reset ()
 reset to zero More...
 
virtual QString toString () const
 get a description of the XIC coordinate in a string More...
 
virtual const QVariant getParam (XicCoordParam param) const
 get a specific XIC coordinate parameter More...
 

Public Attributes

std::size_t scanNumBegin
 mobility index begin More...
 
std::size_t scanNumEnd
 mobility index end More...
 
- Public Attributes inherited from pappso::XicCoord
MzRange mzRange
 the mass to extract More...
 
double rtTarget = 0
 the targeted retention time to extract around intended in seconds, and related to one msrun. This is not a reference, just to save memory and cpu usage when extracting xic More...
 
XicSPtr xicSptr = nullptr
 extracted xic More...
 

Detailed Description

coordinates of the XIC to extract and the resulting XIC after extraction

to extract a XIC, we need basically the mass to extract it this structure is meant to extact a XIC quickly and not to maintain information about it : no peptide, no scan number, no retention time...

Definition at line 50 of file xiccoordtims.h.

Constructor & Destructor Documentation

◆ XicCoordTims() [1/2]

pappso::XicCoordTims::XicCoordTims ( )
inline

Default constructor

Definition at line 55 of file xiccoordtims.h.

55: XicCoord(){};

◆ XicCoordTims() [2/2]

pappso::XicCoordTims::XicCoordTims ( const XicCoordTims other)

Copy constructor

Parameters
otherTODO

Definition at line 41 of file xiccoordtims.cpp.

41 : XicCoord(other)
42{
43 scanNumBegin = other.scanNumBegin;
44 scanNumEnd = other.scanNumEnd;
45}
std::size_t scanNumEnd
mobility index end
Definition: xiccoordtims.h:98
std::size_t scanNumBegin
mobility index begin
Definition: xiccoordtims.h:94

References scanNumBegin, and scanNumEnd.

◆ ~XicCoordTims()

pappso::XicCoordTims::~XicCoordTims ( )
virtual

Destructor

Definition at line 48 of file xiccoordtims.cpp.

49{
50}

Member Function Documentation

◆ addition()

XicCoordSPtr pappso::XicCoordTims::addition ( XicCoordSPtr to_add) const
overridevirtual

compute a new XIC coord as the sum of the given one

Reimplemented from pappso::XicCoord.

Definition at line 66 of file xiccoordtims.cpp.

67{
68 XicCoordTimsSPtr xic_coord_sp = std::make_shared<XicCoordTims>(*this);
69
70 XicCoordTims *toadd = dynamic_cast<XicCoordTims *>(to_add.get());
71
72 if(toadd == nullptr)
73 {
74 throw ExceptionNotPossible(
75 QObject::tr("XicCoord to add is of a different type"));
76 }
77
78 // xic_coord_sp.get()->xicSptr = xic_coord_sp.get()->xicSptr;
79
80 xic_coord_sp.get()->mzRange += to_add.get()->mzRange;
81 xic_coord_sp.get()->rtTarget += to_add.get()->rtTarget;
82 xic_coord_sp.get()->scanNumBegin += toadd->scanNumBegin;
83 xic_coord_sp.get()->scanNumEnd += toadd->scanNumEnd;
84
85 qDebug() << "xic_coord_sp.get()->scanNumBegin="
86 << xic_coord_sp.get()->scanNumBegin;
87 qDebug() << "xic_coord_sp.get()->scanNumEnd="
88 << xic_coord_sp.get()->scanNumEnd;
89 return xic_coord_sp;
90}
std::shared_ptr< XicCoordTims > XicCoordTimsSPtr
Definition: xiccoordtims.h:40

References scanNumBegin, and scanNumEnd.

◆ divideBy()

XicCoordSPtr pappso::XicCoordTims::divideBy ( double  number) const
overridevirtual

compute a new xic coord as a division by

Reimplemented from pappso::XicCoord.

Definition at line 110 of file xiccoordtims.cpp.

111{
112
113 XicCoordTimsSPtr xic_coord_sp = std::make_shared<XicCoordTims>(*this);
114
115 // xic_coord_sp.get()->xicSptr = nullptr;
116
117 xic_coord_sp.get()->rtTarget /= number;
118 xic_coord_sp.get()->mzRange *= (double)((double)1 / number);
119
120 xic_coord_sp.get()->scanNumBegin /= number;
121 xic_coord_sp.get()->scanNumEnd /= number;
122
123 qDebug() << "xic_coord_sp.get()->scanNumBegin="
124 << xic_coord_sp.get()->scanNumBegin;
125 qDebug() << "xic_coord_sp.get()->scanNumEnd="
126 << xic_coord_sp.get()->scanNumEnd;
127 return xic_coord_sp;
128}

◆ getParam()

const QVariant pappso::XicCoordTims::getParam ( XicCoordParam  param) const
overridevirtual

get a specific XIC coordinate parameter

Reimplemented from pappso::XicCoord.

Definition at line 154 of file xiccoordtims.cpp.

155{
156 switch(param)
157 {
159 return QVariant((quint64)scanNumBegin);
160 break;
162 return QVariant((quint64)scanNumEnd);
163 break;
164 default:
165 return QVariant();
166 }
167}

References scanNumBegin, scanNumEnd, pappso::TimsTofIonMobilityScanNumberStart, and pappso::TimsTofIonMobilityScanNumberStop.

◆ initializeAndClone()

XicCoordSPtr pappso::XicCoordTims::initializeAndClone ( ) const
overridevirtual

intialize the XIC and make a deep copy of object

Reimplemented from pappso::XicCoord.

Definition at line 54 of file xiccoordtims.cpp.

55{
56
57 XicCoordTimsSPtr xic_coord_sp = std::make_shared<XicCoordTims>(*this);
58
59 xic_coord_sp.get()->xicSptr = std::make_shared<Xic>();
60
61 return xic_coord_sp;
62}

◆ multiplyBy()

XicCoordSPtr pappso::XicCoordTims::multiplyBy ( double  number) const
overridevirtual

compute a new xic coord as a product by

Reimplemented from pappso::XicCoord.

Definition at line 94 of file xiccoordtims.cpp.

95{
96 XicCoordTimsSPtr xic_coord_sp = std::make_shared<XicCoordTims>(*this);
97
98 // xic_coord_sp.get()->xicSptr = nullptr;
99
100 xic_coord_sp.get()->rtTarget *= number;
101 xic_coord_sp.get()->mzRange *= number;
102
103 xic_coord_sp.get()->scanNumBegin *= number;
104 xic_coord_sp.get()->scanNumEnd *= number;
105
106 return xic_coord_sp;
107}

◆ reset()

void pappso::XicCoordTims::reset ( )
overridevirtual

reset to zero

Reimplemented from pappso::XicCoord.

Definition at line 132 of file xiccoordtims.cpp.

133{
134
135 xicSptr = nullptr;
136
137 rtTarget = 0;
138 mzRange = MzRange(0.0, 0.0);
139 scanNumBegin = 0;
140 scanNumEnd = 0;
141}
XicSPtr xicSptr
extracted xic
Definition: xiccoord.h:130
double rtTarget
the targeted retention time to extract around intended in seconds, and related to one msrun....
Definition: xiccoord.h:126
MzRange mzRange
the mass to extract
Definition: xiccoord.h:120

References pappso::XicCoord::mzRange, pappso::XicCoord::rtTarget, scanNumBegin, scanNumEnd, and pappso::XicCoord::xicSptr.

◆ scanNumBeginRangeCorrection()

void pappso::XicCoordTims::scanNumBeginRangeCorrection ( long  start_dev,
long  stop_dev 
)

apply scan num correction on xic coordinate

Definition at line 169 of file xiccoordtims.cpp.

170{
171 long begin = scanNumBegin + start_dev;
172 long end = scanNumEnd + stop_dev;
173 if(begin < 0)
174 scanNumBegin = 0;
175 else
176 scanNumBegin = begin;
177 if(end < 0)
178 scanNumEnd = 0;
179 else
180 scanNumEnd = end;
181}

References scanNumBegin, and scanNumEnd.

Referenced by pappso::IonMobilityGrid::translateXicCoordFromTo().

◆ toString()

QString pappso::XicCoordTims::toString ( ) const
overridevirtual

get a description of the XIC coordinate in a string

Reimplemented from pappso::XicCoord.

Definition at line 144 of file xiccoordtims.cpp.

145{
146 return QString("%1 begin=%2 end=%3")
147 .arg(XicCoord::toString())
148 .arg(scanNumBegin)
149 .arg(scanNumEnd);
150}
virtual QString toString() const
get a description of the XIC coordinate in a string
Definition: xiccoord.cpp:116

References scanNumBegin, scanNumEnd, and pappso::XicCoord::toString().

Member Data Documentation

◆ scanNumBegin

◆ scanNumEnd


The documentation for this struct was generated from the following files: