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

38  : XicCoord(other)
39 {
40  scanNumBegin = other.scanNumBegin;
41  scanNumEnd = other.scanNumEnd;
42 }
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 45 of file xiccoordtims.cpp.

46 {
47 }

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

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

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

◆ initializeAndClone()

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

intialize the XIC and make a deep copy of object

Reimplemented from pappso::XicCoord.

Definition at line 51 of file xiccoordtims.cpp.

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

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

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

◆ reset()

void pappso::XicCoordTims::reset ( )
overridevirtual

reset to zero

Reimplemented from pappso::XicCoord.

Definition at line 129 of file xiccoordtims.cpp.

130 {
131 
132  xicSptr = nullptr;
133 
134  rtTarget = 0;
135  mzRange = MzRange(0.0, 0.0);
136  scanNumBegin = 0;
137  scanNumEnd = 0;
138 }
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 141 of file xiccoordtims.cpp.

142 {
143  return QString("%1 begin=%2 end=%3")
144  .arg(XicCoord::toString())
145  .arg(scanNumBegin)
146  .arg(scanNumEnd);
147 }
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: