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

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

Constructor & Destructor Documentation

◆ XicCoord() [1/2]

pappso::XicCoord::XicCoord ( )

Default constructor

Definition at line 36 of file xiccoord.cpp.

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

◆ XicCoord() [2/2]

XicCoord::XicCoord ( const XicCoord other)

Copy constructor

Parameters
otherTODO

Definition at line 43 of file xiccoord.cpp.

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

References xicSptr.

◆ ~XicCoord()

XicCoord::~XicCoord ( )
virtual

Destructor

Definition at line 49 of file xiccoord.cpp.

50{
51}

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

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

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

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

◆ getParam()

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

get a specific XIC coordinate parameter

Reimplemented in pappso::XicCoordTims.

Definition at line 123 of file xiccoord.cpp.

124{
125 return QVariant();
126}

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

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

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

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

◆ reset()

void pappso::XicCoord::reset ( )
virtual

reset to zero

Reimplemented in pappso::XicCoordTims.

Definition at line 106 of file xiccoord.cpp.

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

◆ toString()

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

get a description of the XIC coordinate in a string

Reimplemented in pappso::XicCoordTims.

Definition at line 116 of file xiccoord.cpp.

117{
118 return QString("mz=%1 rt=%2").arg(mzRange.toString()).arg(rtTarget);
119}
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 126 of file xiccoord.h.

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

◆ xicSptr


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