libpappsomspp
Library for mass spectrometry
|
The MzIntegrationParams class provides the parameters definining how m/z ! More...
#include <mzintegrationparams.h>
Public Member Functions | |
Q_INVOKABLE | MzIntegrationParams () |
Q_INVOKABLE | MzIntegrationParams (pappso::pappso_double minMz, pappso::pappso_double maxMz, BinningType binningType, int decimalPlaces, pappso::PrecisionPtr precisionPtr, int binSizeDivisor, bool removeZeroValDataPoints) |
Q_INVOKABLE | MzIntegrationParams (const MzIntegrationParams &other) |
virtual | ~MzIntegrationParams () |
MzIntegrationParams & | operator= (const MzIntegrationParams &other) |
Q_INVOKABLE void | setSmallestMz (pappso::pappso_double value) |
Q_INVOKABLE void | updateSmallestMz (pappso::pappso_double value) |
pappso::pappso_double | getSmallestMz () const |
Q_INVOKABLE void | setGreatestMz (pappso::pappso_double value) |
Q_INVOKABLE void | updateGreatestMz (pappso::pappso_double value) |
Q_INVOKABLE pappso::pappso_double | getGreatestMz () const |
Q_INVOKABLE void | setBinningType (BinningType binningType) |
Q_INVOKABLE BinningType | getBinningType () const |
Q_INVOKABLE void | setDecimalPlaces (int decimal_places) |
Q_INVOKABLE int | getDecimalPlaces () const |
Q_INVOKABLE void | setPrecision (pappso::PrecisionPtr precisionPtr) |
Q_INVOKABLE pappso::PrecisionPtr | getPrecision () const |
void | setBinSizeDivisor (int divisor) |
int | getBinSizeDivisor () const |
Q_INVOKABLE void | setRemoveZeroValDataPoints (bool removeOrNot=true) |
Q_INVOKABLE bool | isRemoveZeroValDataPoints () const |
Q_INVOKABLE void | reset () |
Reset the instance to default values. More... | |
Q_INVOKABLE bool | isValid () const |
Q_INVOKABLE bool | hasValidMzRange () const |
Q_INVOKABLE std::vector< pappso::pappso_double > | createBins () |
Q_INVOKABLE std::vector< pappso::pappso_double > | createBins (pappso::MassSpectrumCstSPtr mass_spectrum_csp) |
Q_INVOKABLE QString | toString (int offset=0, const QString &spacer=QString()) const |
Private Member Functions | |
std::vector< double > | createArbitraryBins () |
std::vector< double > | createDataBasedBins (pappso::MassSpectrumCstSPtr massSpectrum) |
Private Attributes | |
pappso::pappso_double | m_smallestMz = std::numeric_limits<double>::max() |
pappso::pappso_double | m_greatestMz = std::numeric_limits<double>::min() |
BinningType | m_binningType = BinningType::NONE |
int | m_decimalPlaces = -1 |
pappso::PrecisionPtr | mp_precision |
int | m_binSizeDivisor = 1 |
bool | m_removeZeroValDataPoints = true |
The MzIntegrationParams class provides the parameters definining how m/z !
Depending on the various mass spectrometer vendors, the mass spectrometry data files are structured in different ways and the software for mass data format conversion from raw files to mzML or mzXML produce mass data characterized by different behaviours.
The different characteristics of mass spectrometry data set are:
The size of the various mass spectra in the file is constant or variable;
The first m/z value of the various spectra is identical or not (that is, the spectra are root in a constant or variable root m/z value);
The m/z delta between two consecutive m/z values of a given spectrum are constant or variable;
The spectra contain or not 0-value m/z data points;
Definition at line 85 of file mzintegrationparams.h.
pappso::MzIntegrationParams::MzIntegrationParams | ( | ) |
Definition at line 73 of file mzintegrationparams.cpp.
References pappso::PrecisionFactory::getPpmInstance(), m_binningType, mp_precision, and pappso::NONE.
pappso::MzIntegrationParams::MzIntegrationParams | ( | pappso::pappso_double | minMz, |
pappso::pappso_double | maxMz, | ||
BinningType | binningType, | ||
int | decimalPlaces, | ||
pappso::PrecisionPtr | precisionPtr, | ||
int | binSizeDivisor, | ||
bool | removeZeroValDataPoints | ||
) |
Definition at line 80 of file mzintegrationparams.cpp.
References pappso::PrecisionFactory::getPpmInstance(), and mp_precision.
pappso::MzIntegrationParams::MzIntegrationParams | ( | const MzIntegrationParams & | other | ) |
Definition at line 102 of file mzintegrationparams.cpp.
References pappso::PrecisionFactory::getResInstance(), and mp_precision.
|
virtual |
Definition at line 118 of file mzintegrationparams.cpp.
|
private |
Definition at line 382 of file mzintegrationparams.cpp.
References pappso::PrecisionBase::delta(), m_binSizeDivisor, m_decimalPlaces, m_greatestMz, m_smallestMz, mp_precision, pappso::res, pappso::PrecisionBase::unit(), and pappso::Utils::zeroDecimalsInValue().
Referenced by createBins().
std::vector< double > pappso::MzIntegrationParams::createBins | ( | ) |
Definition at line 322 of file mzintegrationparams.cpp.
References pappso::ARBITRARY, createArbitraryBins(), pappso::DATA_BASED, m_binningType, and pappso::NONE.
std::vector< double > pappso::MzIntegrationParams::createBins | ( | pappso::MassSpectrumCstSPtr | mass_spectrum_csp | ) |
Definition at line 351 of file mzintegrationparams.cpp.
References pappso::ARBITRARY, createArbitraryBins(), createDataBasedBins(), pappso::DATA_BASED, m_binningType, and pappso::NONE.
|
private |
Definition at line 568 of file mzintegrationparams.cpp.
References m_decimalPlaces, m_smallestMz, and pappso::MassSpectrum::sortMz().
Referenced by createBins().
BinningType pappso::MzIntegrationParams::getBinningType | ( | ) | const |
Definition at line 197 of file mzintegrationparams.cpp.
References m_binningType.
int pappso::MzIntegrationParams::getBinSizeDivisor | ( | ) | const |
Definition at line 240 of file mzintegrationparams.cpp.
References m_binSizeDivisor.
int pappso::MzIntegrationParams::getDecimalPlaces | ( | ) | const |
Definition at line 211 of file mzintegrationparams.cpp.
References m_decimalPlaces.
pappso::pappso_double pappso::MzIntegrationParams::getGreatestMz | ( | ) | const |
Definition at line 183 of file mzintegrationparams.cpp.
References m_greatestMz.
pappso::PrecisionPtr pappso::MzIntegrationParams::getPrecision | ( | ) | const |
Definition at line 226 of file mzintegrationparams.cpp.
References mp_precision.
pappso::pappso_double pappso::MzIntegrationParams::getSmallestMz | ( | ) | const |
Definition at line 162 of file mzintegrationparams.cpp.
References m_smallestMz.
bool pappso::MzIntegrationParams::hasValidMzRange | ( | ) | const |
Definition at line 314 of file mzintegrationparams.cpp.
References m_greatestMz, and m_smallestMz.
bool pappso::MzIntegrationParams::isRemoveZeroValDataPoints | ( | ) | const |
Definition at line 254 of file mzintegrationparams.cpp.
References m_removeZeroValDataPoints.
bool pappso::MzIntegrationParams::isValid | ( | ) | const |
Definition at line 277 of file mzintegrationparams.cpp.
References m_binningType, m_binSizeDivisor, m_greatestMz, m_smallestMz, mp_precision, and pappso::NONE.
MzIntegrationParams & pappso::MzIntegrationParams::operator= | ( | const MzIntegrationParams & | other | ) |
Definition at line 124 of file mzintegrationparams.cpp.
References pappso::PrecisionFactory::getPpmInstance(), m_binningType, m_binSizeDivisor, m_decimalPlaces, m_greatestMz, m_removeZeroValDataPoints, m_smallestMz, and mp_precision.
void pappso::MzIntegrationParams::reset | ( | ) |
Reset the instance to default values.
Definition at line 262 of file mzintegrationparams.cpp.
References pappso::PrecisionFactory::getPpmInstance(), m_binningType, m_binSizeDivisor, m_greatestMz, m_removeZeroValDataPoints, m_smallestMz, mp_precision, and pappso::NONE.
void pappso::MzIntegrationParams::setBinningType | ( | BinningType | binningType | ) |
Definition at line 190 of file mzintegrationparams.cpp.
References m_binningType.
void pappso::MzIntegrationParams::setBinSizeDivisor | ( | int | divisor | ) |
Definition at line 233 of file mzintegrationparams.cpp.
References m_binSizeDivisor.
void pappso::MzIntegrationParams::setDecimalPlaces | ( | int | decimal_places | ) |
Definition at line 204 of file mzintegrationparams.cpp.
References m_decimalPlaces.
void pappso::MzIntegrationParams::setGreatestMz | ( | pappso::pappso_double | value | ) |
Definition at line 169 of file mzintegrationparams.cpp.
References m_greatestMz.
void pappso::MzIntegrationParams::setPrecision | ( | pappso::PrecisionPtr | precisionPtr | ) |
Definition at line 217 of file mzintegrationparams.cpp.
References pappso::PrecisionFactory::getDaltonInstance(), and mp_precision.
void pappso::MzIntegrationParams::setRemoveZeroValDataPoints | ( | bool | removeOrNot = true | ) |
Definition at line 247 of file mzintegrationparams.cpp.
References m_removeZeroValDataPoints.
void pappso::MzIntegrationParams::setSmallestMz | ( | pappso::pappso_double | value | ) |
Definition at line 148 of file mzintegrationparams.cpp.
References m_smallestMz.
QString pappso::MzIntegrationParams::toString | ( | int | offset = 0 , |
const QString & | spacer = QString() |
||
) | const |
Definition at line 683 of file mzintegrationparams.cpp.
References pappso::ARBITRARY, pappso::binningTypeMap, pappso::PrecisionBase::getNominal(), m_binningType, m_binSizeDivisor, m_decimalPlaces, m_greatestMz, m_removeZeroValDataPoints, m_smallestMz, mp_precision, and pappso::PrecisionBase::toString().
void pappso::MzIntegrationParams::updateGreatestMz | ( | pappso::pappso_double | value | ) |
Definition at line 176 of file mzintegrationparams.cpp.
References m_greatestMz.
void pappso::MzIntegrationParams::updateSmallestMz | ( | pappso::pappso_double | value | ) |
Definition at line 155 of file mzintegrationparams.cpp.
References m_smallestMz.
|
private |
Definition at line 148 of file mzintegrationparams.h.
Referenced by MzIntegrationParams(), createBins(), getBinningType(), isValid(), operator=(), reset(), setBinningType(), and toString().
|
private |
Definition at line 159 of file mzintegrationparams.h.
Referenced by createArbitraryBins(), getBinSizeDivisor(), isValid(), operator=(), reset(), setBinSizeDivisor(), and toString().
|
private |
Definition at line 152 of file mzintegrationparams.h.
Referenced by createArbitraryBins(), createDataBasedBins(), getDecimalPlaces(), operator=(), setDecimalPlaces(), and toString().
|
private |
Definition at line 146 of file mzintegrationparams.h.
Referenced by createArbitraryBins(), getGreatestMz(), hasValidMzRange(), isValid(), operator=(), reset(), setGreatestMz(), toString(), and updateGreatestMz().
|
private |
Definition at line 161 of file mzintegrationparams.h.
Referenced by isRemoveZeroValDataPoints(), operator=(), reset(), setRemoveZeroValDataPoints(), and toString().
|
private |
Definition at line 142 of file mzintegrationparams.h.
Referenced by createArbitraryBins(), createDataBasedBins(), getSmallestMz(), hasValidMzRange(), isValid(), operator=(), reset(), setSmallestMz(), toString(), and updateSmallestMz().
|
private |
Definition at line 156 of file mzintegrationparams.h.
Referenced by MzIntegrationParams(), createArbitraryBins(), getPrecision(), isValid(), operator=(), reset(), setPrecision(), and toString().