10#include "../exportinmportconfig.h"
13#include "../mzrange.h"
14#include "../processing/filters/filterinterface.h"
43 friend class MassSpectrumCombinerInterface;
47 Q_INVOKABLE
Trace(
const std::vector<pappso_double> &xVector,
48 const std::vector<pappso_double> &yVector);
50 Trace(
const std::vector<std::pair<pappso_double, pappso_double>> &dataPoints);
51 Q_INVOKABLE
Trace(
const std::vector<DataPoint> &dataPoints);
52 Q_INVOKABLE
Trace(
const std::vector<DataPoint> &&dataPoints);
58 Q_INVOKABLE
size_t initialize(
const std::vector<pappso_double> &xVector,
59 const std::vector<pappso_double> &yVector);
61 Q_INVOKABLE
size_t initialize(
const Trace &other);
64 initialize(
const std::map<pappso_double, pappso_double> &map);
69 Q_INVOKABLE
virtual Trace &operator=(
const Trace &x);
75 Q_INVOKABLE std::vector<pappso_double> xValues()
const;
76 Q_INVOKABLE std::vector<pappso_double> yValues()
const;
78 std::map<pappso_double, pappso_double> toMap()
const;
91 Q_INVOKABLE
pappso_double maxY(
double mzStart,
double mzEnd)
const;
93 Q_INVOKABLE
pappso_double sumY(
double mzStart,
double mzEnd)
const;
96 Q_INVOKABLE
void sortX();
97 Q_INVOKABLE
void sortY();
98 Q_INVOKABLE
void unique();
105 Q_INVOKABLE QString toString()
const;
109 std::vector<DataPoint>::const_iterator
117 std::vector<DataPoint>::iterator dataPointIteratorWithX(
pappso_double value);
135 std::vector<DataPoint>::iterator end,
136 const double &value);
140 std::vector<DataPoint>::const_iterator end,
141 const double &value);
147 std::vector<DataPoint>::iterator end,
148 const double &y_value);
152 std::vector<DataPoint>::const_iterator end,
153 const double &y_value);
160 std::vector<DataPoint>::iterator end,
161 const double &value);
165 std::vector<DataPoint>::const_iterator end,
166 const double &value);
173 std::vector<DataPoint>::iterator end);
177 std::vector<DataPoint>::const_iterator end);
183 std::vector<DataPoint>::iterator end);
187 std::vector<DataPoint>::const_iterator end);
193 std::vector<DataPoint>::const_iterator begin);
198 std::vector<DataPoint>::const_iterator begin);
203 std::vector<DataPoint>::const_iterator end,
209 std::vector<DataPoint>::const_iterator end);
214 std::vector<DataPoint>::const_iterator end);
225 std::vector<DataPoint>::const_iterator end,
232 std::vector<DataPoint>::const_iterator end);
236 std::vector<DataPoint>::const_iterator end,
generic interface to apply a filter on a trace
A simple container of DataPoint instances.
tries to keep as much as possible monoisotopes, removing any possible C13 peaks and changes multichar...
std::shared_ptr< const Trace > TraceCstSPtr
std::vector< DataPoint >::iterator findDifferentYvalue(std::vector< DataPoint >::iterator begin, std::vector< DataPoint >::iterator end, const double &y_value)
find the first element in which Y is different of value
std::vector< DataPoint >::iterator findFirstEqualOrGreaterX(std::vector< DataPoint >::iterator begin, std::vector< DataPoint >::iterator end, const double &value)
find the first element in which X is equal or greater than the value searched important : it implies ...
std::vector< DataPoint >::iterator findFirstGreaterX(std::vector< DataPoint >::iterator begin, std::vector< DataPoint >::iterator end, const double &value)
find the first element in which X is greater than the value searched important : it implies that Trac...
QDataStream & operator<<(QDataStream &outstream, const MassSpectrum &massSpectrum)
QDataStream & operator>>(QDataStream &instream, MassSpectrum &massSpectrum)
std::vector< DataPoint >::const_iterator moveLowerYLeftDataPoint(const Trace &trace, std::vector< DataPoint >::const_iterator begin)
Move left to the lower value.
std::vector< DataPoint >::const_iterator maxYDataPoint(std::vector< DataPoint >::const_iterator begin, std::vector< DataPoint >::const_iterator end)
double medianYTrace(std::vector< DataPoint >::const_iterator begin, std::vector< DataPoint >::const_iterator end)
calculate the median of y value of a trace
double areaTrace(std::vector< DataPoint >::const_iterator begin, std::vector< DataPoint >::const_iterator end)
calculate the area of a trace
std::shared_ptr< Trace > TraceSPtr
double pappso_double
A type definition for doubles.
double meanYTrace(std::vector< DataPoint >::const_iterator begin, std::vector< DataPoint >::const_iterator end)
calculate the mean of y value of a trace
std::vector< DataPoint >::const_iterator moveLowerYRigthDataPoint(const Trace &trace, std::vector< DataPoint >::const_iterator begin)
Move right to the lower value.
double sumYTrace(std::vector< DataPoint >::const_iterator begin, std::vector< DataPoint >::const_iterator end, double init)
calculate the sum of y value of a trace
std::vector< DataPoint >::const_iterator minYDataPoint(std::vector< DataPoint >::const_iterator begin, std::vector< DataPoint >::const_iterator end)
double quantileYTrace(std::vector< DataPoint >::const_iterator begin, std::vector< DataPoint >::const_iterator end, double quantile)
calculate the quantile of y value of a trace
Trace flooredLocalMaxima(std::vector< DataPoint >::const_iterator begin, std::vector< DataPoint >::const_iterator end, double y_floor)
Q_DECLARE_METATYPE(pappso::Trace)