Loading...
Searching...
No Matches
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:

## 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
virtual XicCoordSPtr | addition (const XicCoordSPtr &to_add) const override
| compute a new XIC coord as the sum of the given one
virtual XicCoordSPtr | multiplyBy (double number) const override
| compute a new xic coord as a product by
virtual XicCoordSPtr | divideBy (double number) const override
| compute a new xic coord as a division by
virtual void | reset () override
| reset to zero
virtual QString | toString () const override
| get a description of the XIC coordinate in a string
virtual const QVariant | getParam (XicCoordParam param) const override
| get a specific XIC coordinate parameter
virtual void | writeCborStream (QCborStreamWriter &cbor_writer) const override
| writes xic coordinates in a cbor stream
void | scanNumBeginRangeCorrection (long start_dev, long stop_dev)
| apply scan num correction on xic coordinate
Public Member Functions inherited from pappso::XicCoord
| XicCoord ()
| XicCoord (const XicCoord &other)
virtual | ~XicCoord ()

## Public Attributes

std::size_t | scanNumBegin
| mobility index begin
std::size_t | scanNumEnd
| mobility index end
Public Attributes inherited from pappso::XicCoord
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 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.

: XicCoord(){};
pappso::XicCoord::XicCoord
XicCoord()
Definition xiccoord.cpp:36

References pappso::XicCoord::XicCoord().

Referenced by XicCoordTims(), and addition().

## XicCoordTims() [2/2]

pappso::XicCoordTims::XicCoordTims | ( | const XicCoordTims & | other | ) |

Copy constructor

Parameters

  other | TODO

Definition at line 41 of file xiccoordtims.cpp.

: XicCoord(other)
{
scanNumBegin = other.scanNumBegin;
scanNumEnd = other.scanNumEnd;
}
pappso::XicCoordTims::scanNumEnd
std::size_t scanNumEnd
mobility index end
Definition xiccoordtims.h:101
pappso::XicCoordTims::scanNumBegin
std::size_t scanNumBegin
mobility index begin
Definition xiccoordtims.h:97

References pappso::XicCoord::XicCoord(), XicCoordTims(), scanNumBegin, and scanNumEnd.

## ~XicCoordTims()

pappso::XicCoordTims::~XicCoordTims | ( |  | ) |

virtual

Destructor

Definition at line 48 of file xiccoordtims.cpp.

{
}

## Member Function Documentation

## addition()

XicCoordSPtr pappso::XicCoordTims::addition | ( | const XicCoordSPtr & | to_add | ) | const

override virtual

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

Reimplemented from pappso::XicCoord.

Definition at line 66 of file xiccoordtims.cpp.

{
XicCoordTimsSPtr xic_coord_sp = std::make_shared<XicCoordTims>(*this);
XicCoordTims *toadd = dynamic_cast<XicCoordTims *>(to_add.get());
if(toadd == nullptr)
{
throw ExceptionNotPossible(QObject::tr("XicCoord to add is of a different type"));
}
// xic_coord_sp.get()->xicSptr = xic_coord_sp.get()->xicSptr;
xic_coord_sp.get()->mzRange += to_add.get()->mzRange;
xic_coord_sp.get()->rtTarget += to_add.get()->rtTarget;
xic_coord_sp.get()->scanNumBegin += toadd->scanNumBegin;
xic_coord_sp.get()->scanNumEnd += toadd->scanNumEnd;
qDebug() << "xic_coord_sp.get()->scanNumBegin=" << xic_coord_sp.get()->scanNumBegin;
qDebug() << "xic_coord_sp.get()->scanNumEnd=" << xic_coord_sp.get()->scanNumEnd;
return xic_coord_sp;
}
pappso::XicCoordTimsSPtr
std::shared_ptr< XicCoordTims > XicCoordTimsSPtr
Definition xiccoordtims.h:40
pappso::XicCoordTims::XicCoordTims
XicCoordTims()
Definition xiccoordtims.h:55

References XicCoordTims(), scanNumBegin, and scanNumEnd.

## divideBy()

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

override virtual

compute a new xic coord as a division by

Reimplemented from pappso::XicCoord.

Definition at line 107 of file xiccoordtims.cpp.

{
XicCoordTimsSPtr xic_coord_sp = std::make_shared<XicCoordTims>(*this);
// xic_coord_sp.get()->xicSptr = nullptr;
xic_coord_sp.get()->rtTarget /= number;
xic_coord_sp.get()->mzRange *= (double)((double)1 / number);
xic_coord_sp.get()->scanNumBegin /= number;
xic_coord_sp.get()->scanNumEnd /= number;
qDebug() << "xic_coord_sp.get()->scanNumBegin=" << xic_coord_sp.get()->scanNumBegin;
qDebug() << "xic_coord_sp.get()->scanNumEnd=" << xic_coord_sp.get()->scanNumEnd;
return xic_coord_sp;
}

## getParam()

const QVariant pappso::XicCoordTims::getParam | ( | XicCoordParam | param | ) | const

override virtual

get a specific XIC coordinate parameter

Reimplemented from pappso::XicCoord.

Definition at line 146 of file xiccoordtims.cpp.

{
switch(param)
{
case XicCoordParam::TimsTofIonMobilityScanNumberStart:
return QVariant((quint64)scanNumBegin);
break;
case XicCoordParam::TimsTofIonMobilityScanNumberStop:
return QVariant((quint64)scanNumEnd);
break;
default:
return QVariant();
}
}
pappso::XicCoordParam::TimsTofIonMobilityScanNumberStart
@ TimsTofIonMobilityScanNumberStart
Definition xiccoord.h:52
pappso::XicCoordParam::TimsTofIonMobilityScanNumberStop
@ TimsTofIonMobilityScanNumberStop
Definition xiccoord.h:54

References scanNumBegin, scanNumEnd, pappso::TimsTofIonMobilityScanNumberStart, and pappso::TimsTofIonMobilityScanNumberStop.

## initializeAndClone()

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

override virtual

intialize the XIC and make a deep copy of object

Reimplemented from pappso::XicCoord.

Definition at line 54 of file xiccoordtims.cpp.

{
XicCoordTimsSPtr xic_coord_sp = std::make_shared<XicCoordTims>(*this);
xic_coord_sp.get()->xicSptr = std::make_shared<Xic>();
return xic_coord_sp;
}

## multiplyBy()

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

override virtual

compute a new xic coord as a product by

Reimplemented from pappso::XicCoord.

Definition at line 91 of file xiccoordtims.cpp.

{
XicCoordTimsSPtr xic_coord_sp = std::make_shared<XicCoordTims>(*this);
// xic_coord_sp.get()->xicSptr = nullptr;
xic_coord_sp.get()->rtTarget *= number;
xic_coord_sp.get()->mzRange *= number;
xic_coord_sp.get()->scanNumBegin *= number;
xic_coord_sp.get()->scanNumEnd *= number;
return xic_coord_sp;
}

## reset()

void pappso::XicCoordTims::reset | ( |  | ) |

override virtual

reset to zero

Reimplemented from pappso::XicCoord.

Definition at line 127 of file xiccoordtims.cpp.

{
xicSptr = nullptr;
rtTarget = 0;
mzRange = MzRange(0.0, 0.0);
scanNumBegin = 0;
scanNumEnd = 0;
}
pappso::XicCoord::xicSptr
XicSPtr xicSptr
extracted xic
Definition xiccoord.h:135
pappso::XicCoord::rtTarget
double rtTarget
the targeted retention time to extract around intended in seconds, and related to one msrun....
Definition xiccoord.h:131
pappso::XicCoord::mzRange
MzRange mzRange
the mass to extract
Definition xiccoord.h:125

References pappso::XicCoord::mzRange, pappso::XicCoord::rtTarget, scanNumBegin, scanNumEnd, and pappso::XicCoord::xicSptr.

## scanNumBeginRangeCorrection()

void pappso::XicCoordTims::scanNumBeginRangeCorrection | ( | long | start_dev,
|  | long | stop_dev )

apply scan num correction on xic coordinate

Definition at line 161 of file xiccoordtims.cpp.

{
long begin = scanNumBegin + start_dev;
long end = scanNumEnd + stop_dev;
if(begin < 0)
scanNumBegin = 0;
else
scanNumBegin = begin;
if(end < 0)
scanNumEnd = 0;
else
scanNumEnd = end;
}

References scanNumBegin, and scanNumEnd.

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

## toString()

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

override virtual

get a description of the XIC coordinate in a string

Reimplemented from pappso::XicCoord.

Definition at line 139 of file xiccoordtims.cpp.

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

References scanNumBegin, scanNumEnd, and pappso::XicCoord::toString().

## writeCborStream()

void pappso::XicCoordTims::writeCborStream | ( | QCborStreamWriter & | cbor_writer | ) | const

override virtual

writes xic coordinates in a cbor stream

Reimplemented from pappso::XicCoord.

Definition at line 178 of file xiccoordtims.cpp.

{
cbor_writer.append(QLatin1String("xic_coord"));
cbor_writer.startMap(3);
cbor_writer.append(QLatin1String("mz_range"));
cbor_writer.startArray(2);
cbor_writer.append(mzRange.lower());
cbor_writer.append(mzRange.upper());
cbor_writer.endArray();
cbor_writer.append(QLatin1String("rt"));
cbor_writer.append(rtTarget);
cbor_writer.append(QLatin1String("tim_im_range"));
cbor_writer.startArray(2);
cbor_writer.append((quint64)scanNumBegin);
cbor_writer.append((quint64)scanNumEnd);
cbor_writer.endArray();
cbor_writer.endMap();
}

References pappso::XicCoord::mzRange, pappso::XicCoord::rtTarget, scanNumBegin, and scanNumEnd.

## Member Data Documentation

## scanNumBegin

std::size_t pappso::XicCoordTims::scanNumBegin

mobility index begin

Definition at line 97 of file xiccoordtims.h.

Referenced by pappso::TimsFrame::XicComputeStructure::XicComputeStructure(), XicCoordTims(), addition(), getParam(), pappso::TimsDdaPrecursors::getXicCoordTimsFromPrecursorId(), pappso::TimsMsRunReaderMs2::newXicCoordSPtrFromSpectrumIndex(), reset(), scanNumBeginRangeCorrection(), toString(), and writeCborStream().

## scanNumEnd

std::size_t pappso::XicCoordTims::scanNumEnd

mobility index end

Definition at line 101 of file xiccoordtims.h.

Referenced by pappso::TimsFrame::XicComputeStructure::XicComputeStructure(), XicCoordTims(), addition(), getParam(), pappso::TimsDdaPrecursors::getXicCoordTimsFromPrecursorId(), pappso::TimsMsRunReaderMs2::newXicCoordSPtrFromSpectrumIndex(), reset(), scanNumBeginRangeCorrection(), toString(), and writeCborStream().

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

- pappsomspp/core/msrun/xiccoord/xiccoordtims.h
- pappsomspp/core/msrun/xiccoord/xiccoordtims.cpp