Loading...
Searching...
No Matches
pappso::Xic Class Reference

`#include <xic.h>`

Inheritance diagram for pappso::Xic:

## Public Member Functions

| Xic ()
| Xic (const Trace &other)
virtual | ~Xic ()
XicCstSPtr | makeXicCstSPtr () const
XicSPtr | makeXicSPtr () const
unsigned int | getMsPointDistance (pappso_double rt, pappso_double rt_other) const
| get the number of MS measurement between 2 retention times on this xic
void | debugPrintValues () const
void | sortByRetentionTime ()
| sort peaks by retention time
const DataPoint & | atRetentionTime (pappso_double rt) const
| get the DataPoint at the given retention time
virtual Trace & | operator= (const Trace &x)
virtual Trace & | operator= (Trace &&x)
Public Member Functions inherited from pappso::Trace
| Trace ()
| Trace (const QString &text)
| Trace (const std::vector< pappso_double > &xVector, const std::vector< pappso_double > &yVector)
| Trace (const std::vector< std::pair< pappso_double, pappso_double > > &dataPoints)
| Trace (const std::vector< DataPoint > &dataPoints)
| Trace (const std::vector< DataPoint > &&dataPoints)
| Trace (const MapTrace &map_trace)
| Trace (const Trace &other)
| Trace (const Trace &&other)
virtual | ~Trace ()
size_t | initialize (const std::vector< pappso_double > &xVector, const std::vector< pappso_double > &yVector)
size_t | initialize (const QString &x_text, const QString &y_text)
size_t | initialize (const QString &space_sep_text)
size_t | initialize (const Trace &other)
size_t | initialize (const std::map< pappso_double, pappso_double > &map)
TraceSPtr | makeTraceSPtr () const
TraceCstSPtr | makeTraceCstSPtr () const
size_t | append (const DataPoint &data_point)
| appends a datapoint and return new size
std::vector< pappso_double > | xValues () const
std::vector< pappso_double > | yValues () const
std::map< pappso_double, pappso_double > | toMap () const
DataPoint | containsX (pappso_double value, PrecisionPtr precision_p=nullptr) const
const DataPoint & | minXDataPoint () const
const DataPoint & | maxXDataPoint () const
const DataPoint & | minYDataPoint () const
const DataPoint & | maxYDataPoint () const
pappso_double | minX () const
pappso_double | maxX () const
pappso_double | minY () const
pappso_double | maxY () const
pappso_double | maxY (double mzStart, double mzEnd) const
pappso_double | sumY () const
pappso_double | sumY (double mzStart, double mzEnd) const
void | sort (Enums::SortType sort_type, Enums::SortOrder sort_order=Enums::SortOrder::ascending)
void | sortX (Enums::SortOrder sort_order=Enums::SortOrder::ascending)
void | sortY (Enums::SortOrder sort_order=Enums::SortOrder::ascending)
void | unique ()
std::size_t | removeZeroYDataPoints ()
virtual Trace & | filter (const FilterInterface &filter) final
| apply a filter on this trace
QString | toString () const
QJsonObject | toJsonObject (const QString &x_label="x", const QString &y_label="y") const
| serialize a PAPPSO trace object to JSON
QByteArray | xAsBase64Encoded () const
QByteArray | yAsBase64Encoded () const
std::vector< DataPoint >::const_iterator | dataPointCstIteratorWithX (pappso_double value) const
| find datapoint with exactly x value

## Additional Inherited Members

Protected Member Functions inherited from pappso::Trace
std::size_t | dataPointIndexWithX (pappso_double value) const
| Return a reference to the DataPoint instance that has its x member equal to `value`.
std::vector< DataPoint >::iterator | dataPointIteratorWithX (pappso_double value)

## Detailed Description

Definition at line 43 of file xic.h.

## Constructor & Destructor Documentation

## Xic() [1/2]

pappso::Xic::Xic | ( |  | ) |

Definition at line 37 of file xic.cpp.

{
qDebug() << "Xic::Xic begin";
qDebug() << "Xic::Xic end";
}

## Xic() [2/2]

pappso::Xic::Xic | ( | const Trace & | other | ) |

Definition at line 43 of file xic.cpp.

: Trace(other)
{
}
pappso::Trace::Trace
Trace()
Definition trace.cpp:455

References pappso::Trace::Trace().

## ~Xic()

pappso::Xic::~Xic | ( |  | ) |

virtual

Definition at line 47 of file xic.cpp.

{
}

## Member Function Documentation

## atRetentionTime()

const DataPoint & pappso::Xic::atRetentionTime | ( | pappso_double | rt | ) | const

get the DataPoint at the given retention time

Definition at line 74 of file xic.cpp.

{
for(auto &&peak : *this)
{
if(peak.y == rt)
return peak;
}
throw ExceptionOutOfRange(QObject::tr("no intensity for this retention time"));
}

## debugPrintValues()

void pappso::Xic::debugPrintValues | ( |  | ) | const

Definition at line 65 of file xic.cpp.

{
for(auto &&peak : *this)
{
qDebug() << "rt = " << peak.x << ", int = " << peak.y;
}
}

## getMsPointDistance()

unsigned int pappso::Xic::getMsPointDistance | ( | pappso_double | rt,
|  | pappso_double | rt_other ) const

get the number of MS measurement between 2 retention times on this xic

Definition at line 85 of file xic.cpp.

{
if(rt_first > rt_second)
{
std::swap(rt_first, rt_second);
}
unsigned int distance = 0;
auto it = this->begin();
auto itend = this->end();
while((it->x < rt_first) && (it != itend))
{
it++;
}
while((rt_second > it->x) && (it != itend))
{
qDebug() << "Xic::getMsPointDistance " << rt_first << " it->rt " << it->x << " rt_second "
<< rt_second << distance;
distance++;
it++;
}
return distance;
}

## makeXicCstSPtr()

XicCstSPtr pappso::Xic::makeXicCstSPtr | ( |  | ) | const

Definition at line 53 of file xic.cpp.

{
return std::make_shared<const Xic>(*this);
}

## makeXicSPtr()

XicSPtr pappso::Xic::makeXicSPtr | ( |  | ) | const

Definition at line 59 of file xic.cpp.

{
return std::make_shared<Xic>(*this);
}

## operator=() [1/2]

Trace & pappso::Trace::operator= | ( | const Trace & | x | ) |

virtual

Reimplemented from pappso::Trace.

Definition at line 182 of file trace.cpp.

{
assign(other.begin(), other.end());
return *this;
}

## operator=() [2/2]

Trace & pappso::Trace::operator= | ( | Trace && | x | ) |

virtual

Reimplemented from pappso::Trace.

Definition at line 183 of file trace.cpp.

{
vector<DataPoint>::operator=(std::move(other));
return *this;
}

## sortByRetentionTime()

void pappso::Xic::sortByRetentionTime | ( |  | ) |

sort peaks by retention time

Definition at line 112 of file xic.cpp.

{
sortX();
}
pappso::Trace::sortX
void sortX(Enums::SortOrder sort_order=Enums::SortOrder::ascending)
Definition trace.cpp:1071

References pappso::Trace::sortX().

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

- pappsomspp/core/xic/xic.h
- pappsomspp/core/xic/xic.cpp