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...
 
- Public Member Functions inherited from pappso::XicCoord
 XicCoord ()
 
 XicCoord (const XicCoord &other)
 
virtual ~XicCoord ()
 

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 40 of file xiccoordtims.cpp.

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

References scanNumBegin, and scanNumEnd.

◆ ~XicCoordTims()

pappso::XicCoordTims::~XicCoordTims ( )
virtual

Destructor

Definition at line 47 of file xiccoordtims.cpp.

48 {
49 }

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 65 of file xiccoordtims.cpp.

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

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 109 of file xiccoordtims.cpp.

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

◆ initializeAndClone()

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

intialize the XIC and make a deep copy of object

Reimplemented from pappso::XicCoord.

Definition at line 53 of file xiccoordtims.cpp.

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

◆ 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 93 of file xiccoordtims.cpp.

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

◆ reset()

void pappso::XicCoordTims::reset ( )
overridevirtual

reset to zero

Reimplemented from pappso::XicCoord.

Definition at line 131 of file xiccoordtims.cpp.

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

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

◆ toString()

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

get a description of the XIC coordinate in a string

Reimplemented from pappso::XicCoord.

Definition at line 143 of file xiccoordtims.cpp.

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

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

Member Data Documentation

◆ scanNumBegin

std::size_t pappso::XicCoordTims::scanNumBegin

◆ scanNumEnd

std::size_t pappso::XicCoordTims::scanNumEnd

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