libpappsomspp
Library for mass spectrometry
pappso::Xic Class Reference

#include <xic.h>

Inheritance diagram for pappso::Xic:
pappso::Trace

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 More...
 
void debugPrintValues () const
 
void sortByRetentionTime ()
 sort peaks by retention time More...
 
const DataPointatRetentionTime (pappso_double rt) const
 get the DataPoint at the given retention time More...
 
- Public Member Functions inherited from pappso::Trace
 Trace ()
 
 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 Trace &other)
 
size_t initialize (const std::map< pappso_double, pappso_double > &map)
 
virtual Traceoperator= (const Trace &x)
 
virtual Traceoperator= (Trace &&x)
 
TraceSPtr makeTraceSPtr () const
 
TraceCstSPtr makeTraceCstSPtr () const
 
std::vector< pappso_doublexValues () const
 
std::vector< pappso_doubleyValues () const
 
std::map< pappso_double, pappso_doubletoMap () const
 
DataPoint containsX (pappso_double value, PrecisionPtr precision_p=nullptr) const
 
const DataPointminYDataPoint () const
 
const DataPointmaxYDataPoint () 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 sortX ()
 
void sortY ()
 
void unique ()
 
virtual Tracefilter (const FilterInterface &filter) final
 apply a filter on this trace More...
 
QString toString () const
 
std::vector< DataPoint >::const_iterator dataPointCstIteratorWithX (pappso_double value) const
 find datapoint with exactly x value More...
 

Additional Inherited Members

- Protected Member Functions inherited from pappso::Trace
std::size_t dataPointIndexWithX (pappso_double value) const
 
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 35 of file xic.cpp.

36{
37 qDebug() << "Xic::Xic begin";
38 qDebug() << "Xic::Xic end";
39}

◆ Xic() [2/2]

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

Definition at line 41 of file xic.cpp.

41 : Trace(other)
42{
43}

◆ ~Xic()

pappso::Xic::~Xic ( )
virtual

Definition at line 45 of file xic.cpp.

46{
47}

Member Function Documentation

◆ atRetentionTime()

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

get the DataPoint at the given retention time

Definition at line 72 of file xic.cpp.

73{
74 for(auto &&peak : *this)
75 {
76 if(peak.y == rt)
77 return peak;
78 }
79 throw ExceptionOutOfRange(
80 QObject::tr("no intensity for this retention time"));
81}

References pappso::rt.

◆ debugPrintValues()

void pappso::Xic::debugPrintValues ( ) const

Definition at line 63 of file xic.cpp.

64{
65 for(auto &&peak : *this)
66 {
67 qDebug() << "rt = " << peak.x << ", int = " << peak.y;
68 }
69}

◆ 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 84 of file xic.cpp.

85{
86 if(rt_first > rt_second)
87 {
88 std::swap(rt_first, rt_second);
89 }
90 unsigned int distance = 0;
91 auto it = this->begin();
92 auto itend = this->end();
93
94 while((it->x < rt_first) && (it != itend))
95 {
96 it++;
97 }
98 while((rt_second > it->x) && (it != itend))
99 {
100 qDebug() << "Xic::getMsPointDistance " << rt_first << " it->rt " << it->x
101 << " rt_second " << rt_second << distance;
102 distance++;
103 it++;
104 }
105
106
107 return distance;
108}

◆ makeXicCstSPtr()

XicCstSPtr pappso::Xic::makeXicCstSPtr ( ) const

Definition at line 51 of file xic.cpp.

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

◆ makeXicSPtr()

XicSPtr pappso::Xic::makeXicSPtr ( ) const

Definition at line 57 of file xic.cpp.

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

◆ sortByRetentionTime()

void pappso::Xic::sortByRetentionTime ( )

sort peaks by retention time

Definition at line 111 of file xic.cpp.

112{
113 sortX();
114}
void sortX()
Definition: trace.cpp:936

References pappso::Trace::sortX().


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