libpappsomspp
Library for mass spectrometry
pappso::XicCoord Struct Reference

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

#include <xiccoord.h>

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

Public Member Functions

 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...
 

Public Attributes

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 53 of file xiccoord.h.

Constructor & Destructor Documentation

◆ XicCoord() [1/2]

pappso::XicCoord::XicCoord ( )

Default constructor

Definition at line 35 of file xiccoord.cpp.

37  rtTarget(0)
38 {
39 }
static PrecisionPtr getPpmInstance(pappso_double value)
get a ppm precision pointer
Definition: precision.cpp:150
double pappso_double
A type definition for doubles.
Definition: types.h:49
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

◆ XicCoord() [2/2]

XicCoord::XicCoord ( const XicCoord other)

Copy constructor

Parameters
otherTODO

Definition at line 42 of file xiccoord.cpp.

43  : mzRange(other.mzRange), rtTarget(other.rtTarget)
44 {
45  xicSptr = other.xicSptr;
46 }
XicSPtr xicSptr
extracted xic
Definition: xiccoord.h:113

References xicSptr.

◆ ~XicCoord()

XicCoord::~XicCoord ( )
virtual

Destructor

Definition at line 48 of file xiccoord.cpp.

49 {
50 }

Member Function Documentation

◆ addition()

pappso::XicCoordSPtr pappso::XicCoord::addition ( XicCoordSPtr to_add) const
virtual

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

Reimplemented in pappso::XicCoordTims.

Definition at line 64 of file xiccoord.cpp.

65 {
66  XicCoordSPtr xic_coord_sp = std::make_shared<XicCoord>(*this);
67 
68  // xic_coord_sp.get()->xicSptr = nullptr;
69 
70  xic_coord_sp.get()->rtTarget += to_add.get()->rtTarget;
71 
72  xic_coord_sp.get()->mzRange += to_add.get()->mzRange;
73 
74  return xic_coord_sp;
75 }
std::shared_ptr< XicCoord > XicCoordSPtr
Definition: xiccoord.h:41

◆ divideBy()

pappso::XicCoordSPtr pappso::XicCoord::divideBy ( double  number) const
virtual

compute a new xic coord as a division by

Reimplemented in pappso::XicCoordTims.

Definition at line 91 of file xiccoord.cpp.

92 {
93  XicCoordSPtr xic_coord_sp = std::make_shared<XicCoord>(*this);
94 
95  // xic_coord_sp.get()->xicSptr = nullptr;
96 
97  xic_coord_sp.get()->rtTarget /= number;
98  xic_coord_sp.get()->mzRange *= (double)((double)1 / number);
99 
100  return xic_coord_sp;
101 }

◆ initializeAndClone()

pappso::XicCoordSPtr pappso::XicCoord::initializeAndClone ( ) const
virtual

intialize the XIC and make a deep copy of object

Reimplemented in pappso::XicCoordTims.

Definition at line 53 of file xiccoord.cpp.

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

◆ multiplyBy()

XicCoordSPtr XicCoord::multiplyBy ( double  number) const
virtual

compute a new xic coord as a product by

Reimplemented in pappso::XicCoordTims.

Definition at line 78 of file xiccoord.cpp.

79 {
80  XicCoordSPtr xic_coord_sp = std::make_shared<XicCoord>(*this);
81 
82  // xic_coord_sp.get()->xicSptr = nullptr;
83 
84  xic_coord_sp.get()->rtTarget *= number;
85  xic_coord_sp.get()->mzRange *= number;
86 
87  return xic_coord_sp;
88 }

◆ reset()

void pappso::XicCoord::reset ( )
virtual

reset to zero

Reimplemented in pappso::XicCoordTims.

Definition at line 105 of file xiccoord.cpp.

106 {
107 
108  xicSptr = nullptr;
109 
110  rtTarget = 0;
111  mzRange = MzRange(0.0, 0.0);
112 }

◆ toString()

QString pappso::XicCoord::toString ( ) const
virtual

get a description of the XIC coordinate in a string

Reimplemented in pappso::XicCoordTims.

Definition at line 115 of file xiccoord.cpp.

116 {
117  return QString("mz=%1 rt=%2").arg(mzRange.toString()).arg(rtTarget);
118 }
QString toString() const
Definition: mzrange.cpp:131

Referenced by pappso::XicCoordTims::toString().

Member Data Documentation

◆ mzRange

◆ rtTarget

double pappso::XicCoord::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

Definition at line 109 of file xiccoord.h.

Referenced by pappso::MsRunXicExtractor::extractOneXicCoord(), pappso::MsRunXicExtractorDisk::extractOneXicCoord(), pappso::TimsData::getXicCoordTimsFromPrecursorId(), and pappso::XicCoordTims::reset().

◆ xicSptr


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