libpappsomspp
Library for mass spectrometry
Loading...
Searching...
No Matches
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
 
virtual XicCoordSPtr addition (const XicCoordSPtr &to_add) const
 compute a new XIC coord as the sum of the given one
 
virtual XicCoordSPtr multiplyBy (double number) const
 compute a new xic coord as a product by
 
virtual XicCoordSPtr divideBy (double number) const
 compute a new xic coord as a division by
 
virtual void reset ()
 reset to zero
 
virtual QString toString () const
 get a description of the XIC coordinate in a string
 
virtual const QVariant getParam (XicCoordParam param) const
 get a specific XIC coordinate parameter
 
virtual void writeCborStream (QCborStreamWriter &cbor_writer) const
 writes xic coordinates in a cbor stream
 

Public Attributes

MzRange mzRange
 the mass to extract
 
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
 
XicSPtr xicSptr = nullptr
 extracted xic
 

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

Constructor & Destructor Documentation

◆ XicCoord() [1/2]

pappso::XicCoord::XicCoord ( )

Default constructor

Definition at line 36 of file xiccoord.cpp.

38{
39}
static PrecisionPtr getPpmInstance(pappso_double value)
get a ppm precision pointer
double pappso_double
A type definition for doubles.
Definition types.h:61
double rtTarget
the targeted retention time to extract around intended in seconds, and related to one msrun....
Definition xiccoord.h:131
MzRange mzRange
the mass to extract
Definition xiccoord.h:125

References mzRange, and rtTarget.

Referenced by XicCoord(), pappso::XicCoordTims::XicCoordTims(), and pappso::XicCoordTims::XicCoordTims().

◆ XicCoord() [2/2]

XicCoord::XicCoord ( const XicCoord & other)

Copy constructor

Parameters
otherTODO

Definition at line 42 of file xiccoord.cpp.

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

References XicCoord(), mzRange, rtTarget, and xicSptr.

◆ ~XicCoord()

XicCoord::~XicCoord ( )
virtual

Destructor

Definition at line 47 of file xiccoord.cpp.

48{
49}

Member Function Documentation

◆ addition()

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

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

Reimplemented in pappso::XicCoordTims.

Definition at line 63 of file xiccoord.cpp.

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

References mzRange, and rtTarget.

◆ 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 90 of file xiccoord.cpp.

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

References mzRange, and rtTarget.

◆ getParam()

const QVariant pappso::XicCoord::getParam ( XicCoordParam param) const
virtual

get a specific XIC coordinate parameter

Reimplemented in pappso::XicCoordTims.

Definition at line 121 of file xiccoord.cpp.

122{
123 return QVariant();
124}

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

◆ 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 52 of file xiccoord.cpp.

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

References xicSptr.

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

◆ multiplyBy()

XicCoordSPtr XicCoord::multiplyBy ( double number) const
virtual

compute a new xic coord as a product by

Reimplemented in pappso::XicCoordTims.

Definition at line 77 of file xiccoord.cpp.

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

References mzRange, and rtTarget.

◆ reset()

void pappso::XicCoord::reset ( )
virtual

reset to zero

Reimplemented in pappso::XicCoordTims.

Definition at line 104 of file xiccoord.cpp.

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

References mzRange, rtTarget, and xicSptr.

◆ toString()

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

get a description of the XIC coordinate in a string

Reimplemented in pappso::XicCoordTims.

Definition at line 114 of file xiccoord.cpp.

115{
116 return QString("mz=%1 rt=%2").arg(mzRange.toString()).arg(rtTarget);
117}

References mzRange, and rtTarget.

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

◆ writeCborStream()

void pappso::XicCoord::writeCborStream ( QCborStreamWriter & cbor_writer) const
virtual

writes xic coordinates in a cbor stream

Reimplemented in pappso::XicCoordTims.

Definition at line 127 of file xiccoord.cpp.

128{
129 cbor_writer.append(QLatin1String("xic_coord"));
130 cbor_writer.startMap(2);
131 cbor_writer.append(QLatin1String("mz_range"));
132 cbor_writer.startArray(2);
133 cbor_writer.append(mzRange.lower());
134 cbor_writer.append(mzRange.upper());
135 cbor_writer.endArray();
136
137 cbor_writer.append(QLatin1String("rt"));
138 cbor_writer.append(rtTarget);
139
140 cbor_writer.endMap();
141}

References mzRange, and rtTarget.

Member Data Documentation

◆ mzRange

◆ rtTarget

double pappso::XicCoord::rtTarget = 0

◆ xicSptr


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