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

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

43 {
44 }

Member Function Documentation

◆ addition()

pappso::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 59 of file xiccoordtims.cpp.

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

References scanNumBegin, and scanNumEnd.

◆ divideBy()

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

compute a new xic coord as a division by

Reimplemented from pappso::XicCoord.

Definition at line 103 of file xiccoordtims.cpp.

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

◆ initializeAndClone()

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

intialize the XIC and make a deep copy of object

Reimplemented from pappso::XicCoord.

Definition at line 47 of file xiccoordtims.cpp.

48 {
49 
50  XicCoordTimsSPtr xic_coord_sp = std::make_shared<XicCoordTims>(*this);
51 
52  xic_coord_sp.get()->xicSptr = std::make_shared<Xic>();
53 
54  return xic_coord_sp;
55 }

◆ multiplyBy()

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

compute a new xic coord as a product by

Reimplemented from pappso::XicCoord.

Definition at line 87 of file xiccoordtims.cpp.

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

◆ reset()

void pappso::XicCoordTims::reset ( )
overridevirtual

reset to zero

Reimplemented from pappso::XicCoord.

Definition at line 125 of file xiccoordtims.cpp.

126 {
127 
128  xicSptr = nullptr;
129 
130  rtTarget = 0;
131  mzRange = MzRange(0.0, 0.0);
132  scanNumBegin = 0;
133  scanNumEnd = 0;
134 }
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

◆ toString()

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

get a description of the XIC coordinate in a string

Reimplemented from pappso::XicCoord.

Definition at line 137 of file xiccoordtims.cpp.

138 {
139  return QString("%1 begin=%2 end=%3")
140  .arg(XicCoord::toString())
141  .arg(scanNumBegin)
142  .arg(scanNumEnd);
143 }
virtual QString toString() const
get a description of the XIC coordinate in a string
Definition: xiccoord.cpp:115

References 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: