|
libpappsomspp
Library for mass spectrometry
|
The MzIntegrationParams class provides the parameters definining how m/z integrations must be performed. More...
#include <mzintegrationparams.h>
Public Types | |
| enum class | BinningType { NONE = 0 , DATA_BASED , ARBITRARY , LAST } |
| enum class | InitializationResult : uint32_t { DEFAULT = 0x000 , BINNING_TYPE = 1 << 0 , BIN_SIZE_MODEL = 1 << 1 , BIN_SIZE_DIVISOR = 1 << 2 , DECIMAL_PLACES = 1 << 3 , BINNING_LOGIC_PARTIAL = (BINNING_TYPE | BIN_SIZE_MODEL) , BINNING_LOGIC_FULL , REMOVE_ZERO_DATA_POINTS = 1 << 4 , FULL = (REMOVE_ZERO_DATA_POINTS | BINNING_LOGIC_FULL) } |
Signals | |
| void | smallestMzChanged () |
| void | greatestMzChanged () |
| void | binningTypeChanged () |
| void | indicativeBinSizeChanged () |
| void | decimalPlacesChanged () |
| void | binSizeModelChanged () |
| void | binSizeDivisorChanged () |
| void | removeZeroValDataPointsChanged () |
Public Member Functions | |
| Q_INVOKABLE | MzIntegrationParams (QObject *parent=nullptr) |
| Q_INVOKABLE | MzIntegrationParams (const QString &text, QObject *parent=nullptr) |
| Q_INVOKABLE | MzIntegrationParams (double minMz, double maxMz, BinningType binningType, pappso::PrecisionPtr precisionPtr, int binSizeDivisor, int decimalPlaces, bool removeZeroValDataPoints, QObject *parent=nullptr) |
| virtual | ~MzIntegrationParams () |
| Q_INVOKABLE MzIntegrationParams * | clone (QObject *parent=nullptr) const |
| Q_INVOKABLE InitializationResult | initialize (const QString &text) |
| Q_INVOKABLE void | initialize (double minMz, double maxMz, BinningType binningType, pappso::PrecisionPtr precisionPtr, int binSizeDivisor, int decimalPlaces, bool removeZeroValDataPoints, QObject *parent=nullptr) |
| void | initialize (const MzIntegrationParams &other, QObject *parent=nullptr) |
| Q_INVOKABLE void | initialize (const MzIntegrationParams *other_p, QObject *parent=nullptr) |
| void | initialize (MzIntegrationParams &other, InitializationResult initialization_results) |
| Q_INVOKABLE void | setSmallestMz (double value) |
| Q_INVOKABLE void | updateSmallestMz (double value) |
| Q_INVOKABLE double | getSmallestMz () const |
| Q_INVOKABLE void | setGreatestMz (double value) |
| Q_INVOKABLE void | updateGreatestMz (double value) |
| Q_INVOKABLE double | getGreatestMz () const |
| Q_INVOKABLE void | setMzValues (double smallest, double greatest) |
| Q_INVOKABLE void | setBinningType (BinningType binningType) |
| Q_INVOKABLE BinningType | getBinningType () const |
| Q_INVOKABLE void | setBinSizeModel (pappso::PrecisionPtr bin_size_model_p) |
| Q_INVOKABLE pappso::PrecisionPtr | getBinSizeModel () const |
| Q_INVOKABLE void | setBinSizeDivisor (int divisor) |
| Q_INVOKABLE int | getBinSizeDivisor () const |
| Q_INVOKABLE void | setIndicativeBinSize (double value) |
| Q_INVOKABLE double | getIndicativeBinSize () const |
| Q_INVOKABLE void | setDecimalPlaces (int decimal_places) |
| Q_INVOKABLE int | getDecimalPlaces () const |
| Q_INVOKABLE void | setRemoveZeroValDataPoints (bool removeOrNot=true) |
| Q_INVOKABLE bool | isRemoveZeroValDataPoints () const |
| Q_INVOKABLE void | reset () |
| Reset the instance to default values. | |
| Q_INVOKABLE bool | isValid () const |
| Q_INVOKABLE bool | hasValidMzRange () const |
| Q_INVOKABLE std::vector< double > | createBins () |
| Q_INVOKABLE std::vector< double > | createBins (pappso::MassSpectrumCstSPtr mass_spectrum_csp) |
| Q_INVOKABLE QString | toString (int offset, const QString &spacer=" ") const |
| Q_INVOKABLE QString | toString () const |
| Q_INVOKABLE QString | binsToStringWithDeltas (const std::vector< double > bins) const |
Static Public Member Functions | |
| static void | registerJsConstructor (QJSEngine *engine) |
Protected Member Functions | |
| std::vector< double > | createArbitraryBins () |
| std::vector< double > | createDataBasedBins (pappso::MassSpectrumCstSPtr massSpectrum) |
| std::vector< double > | createDataBasedBinsOld (pappso::MassSpectrumCstSPtr massSpectrum) |
Protected Attributes | |
| double | m_smallestMz = std::numeric_limits<double>::max() |
| double | m_greatestMz = std::numeric_limits<double>::min() |
| double | m_indicativeBinSize = 0 |
| BinningType | m_binningType = BinningType::ARBITRARY |
| pappso::PrecisionPtr | m_binSizeModel |
| int | m_binSizeDivisor = 6 |
| int | m_decimalPlaces = -1 |
| bool | m_removeZeroValDataPoints = true |
Properties | |
| double | smallestMz |
| double | greatestMz |
| BinningType | binningType |
| double | indicativeBinSize |
| int | decimalPlaces |
| pappso::PrecisionPtr | binSizeModel |
| int | binSizeDivisor |
| bool | removeZeroValDataPoints |
The MzIntegrationParams class provides the parameters definining how m/z integrations must be performed.
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 83 of file mzintegrationparams.h.
|
strong |
| Enumerator | |
|---|---|
| NONE | < no binning |
| DATA_BASED | binning based on mass spectral data |
| ARBITRARY | binning based on arbitrary bin size value |
| LAST | |
Definition at line 103 of file mzintegrationparams.h.
|
strong |
| Enumerator | |
|---|---|
| DEFAULT | |
| BINNING_TYPE | |
| BIN_SIZE_MODEL | |
| BIN_SIZE_DIVISOR | |
| DECIMAL_PLACES | |
| BINNING_LOGIC_PARTIAL | |
| BINNING_LOGIC_FULL | |
| REMOVE_ZERO_DATA_POINTS | |
| FULL | |
Definition at line 118 of file mzintegrationparams.h.
|
explicit |
Definition at line 85 of file mzintegrationparams.cpp.
Referenced by clone(), initialize(), initialize(), and initialize().
|
explicit |
Definition at line 89 of file mzintegrationparams.cpp.
References initialize().
|
explicit |
Definition at line 95 of file mzintegrationparams.cpp.
References pappso::PrecisionFactory::getPpmInstance(), m_binningType, m_binSizeDivisor, m_binSizeModel, m_decimalPlaces, m_greatestMz, m_removeZeroValDataPoints, and m_smallestMz.
|
virtual |
Definition at line 119 of file mzintegrationparams.cpp.
|
signal |
Referenced by removeZeroValDataPointsChanged(), and setBinningType().
|
signal |
Referenced by setBinSizeDivisor().
|
signal |
Referenced by setBinSizeModel().
| QString pappso::MzIntegrationParams::binsToStringWithDeltas | ( | const std::vector< double > | bins | ) | const |
Definition at line 1219 of file mzintegrationparams.cpp.
References m_decimalPlaces.
Referenced by createArbitraryBins(), createDataBasedBins(), and greatestMzChanged().
| MzIntegrationParams * pappso::MzIntegrationParams::clone | ( | QObject * | parent = nullptr | ) | const |
Definition at line 124 of file mzintegrationparams.cpp.
References MzIntegrationParams(), m_binningType, m_binSizeDivisor, m_binSizeModel, m_decimalPlaces, m_greatestMz, m_removeZeroValDataPoints, and m_smallestMz.
|
protected |
Definition at line 555 of file mzintegrationparams.cpp.
References binsToStringWithDeltas(), isValid(), m_binSizeDivisor, m_binSizeModel, m_decimalPlaces, m_greatestMz, m_indicativeBinSize, m_smallestMz, pappso::Utils::roundValueToDecimalPlaces(), pappso::Utils::writeToFile(), and pappso::Utils::zeroDecimalsInValue().
Referenced by createBins(), and createBins().
| std::vector< double > pappso::MzIntegrationParams::createBins | ( | ) |
Definition at line 499 of file mzintegrationparams.cpp.
References ARBITRARY, createArbitraryBins(), DATA_BASED, m_binningType, and NONE.
| std::vector< double > pappso::MzIntegrationParams::createBins | ( | pappso::MassSpectrumCstSPtr | mass_spectrum_csp | ) |
Definition at line 526 of file mzintegrationparams.cpp.
References ARBITRARY, createArbitraryBins(), createDataBasedBins(), DATA_BASED, m_binningType, and NONE.
|
protected |
Definition at line 752 of file mzintegrationparams.cpp.
References binsToStringWithDeltas(), m_decimalPlaces, m_greatestMz, m_smallestMz, pappso::Utils::roundValueToDecimalPlaces(), pappso::MassSpectrum::sortMz(), and pappso::Utils::writeToFile().
Referenced by createBins().
|
protected |
Definition at line 1038 of file mzintegrationparams.cpp.
References m_decimalPlaces, m_smallestMz, and pappso::MassSpectrum::sortMz().
|
signal |
References registerJsConstructor().
Referenced by removeZeroValDataPointsChanged(), and setDecimalPlaces().
| MzIntegrationParams::BinningType pappso::MzIntegrationParams::getBinningType | ( | ) | const |
Definition at line 363 of file mzintegrationparams.cpp.
References m_binningType.
| int pappso::MzIntegrationParams::getBinSizeDivisor | ( | ) | const |
Definition at line 406 of file mzintegrationparams.cpp.
References m_binSizeDivisor.
| pappso::PrecisionPtr pappso::MzIntegrationParams::getBinSizeModel | ( | ) | const |
Definition at line 390 of file mzintegrationparams.cpp.
References m_binSizeModel.
| int pappso::MzIntegrationParams::getDecimalPlaces | ( | ) | const |
Definition at line 370 of file mzintegrationparams.cpp.
References m_decimalPlaces.
| double pappso::MzIntegrationParams::getGreatestMz | ( | ) | const |
Definition at line 339 of file mzintegrationparams.cpp.
References m_greatestMz.
| double pappso::MzIntegrationParams::getIndicativeBinSize | ( | ) | const |
Definition at line 419 of file mzintegrationparams.cpp.
References m_indicativeBinSize.
| double pappso::MzIntegrationParams::getSmallestMz | ( | ) | const |
Definition at line 313 of file mzintegrationparams.cpp.
References m_smallestMz.
|
signal |
References binsToStringWithDeltas().
Referenced by removeZeroValDataPointsChanged(), setGreatestMz(), and updateGreatestMz().
| bool pappso::MzIntegrationParams::hasValidMzRange | ( | ) | const |
Definition at line 492 of file mzintegrationparams.cpp.
References m_greatestMz, and m_smallestMz.
|
signal |
Referenced by removeZeroValDataPointsChanged(), and setIndicativeBinSize().
| void pappso::MzIntegrationParams::initialize | ( | const MzIntegrationParams & | other, |
| QObject * | parent = nullptr ) |
Definition at line 242 of file mzintegrationparams.cpp.
References MzIntegrationParams(), m_binningType, m_binSizeDivisor, m_binSizeModel, m_decimalPlaces, m_greatestMz, m_removeZeroValDataPoints, m_smallestMz, setBinningType(), setBinSizeDivisor(), setBinSizeModel(), setDecimalPlaces(), setGreatestMz(), setRemoveZeroValDataPoints(), and setSmallestMz().
| void pappso::MzIntegrationParams::initialize | ( | const MzIntegrationParams * | other_p, |
| QObject * | parent = nullptr ) |
Definition at line 258 of file mzintegrationparams.cpp.
References MzIntegrationParams(), and initialize().
| MzIntegrationParams::InitializationResult pappso::MzIntegrationParams::initialize | ( | const QString & | text | ) |
Definition at line 140 of file mzintegrationparams.cpp.
References BIN_SIZE_DIVISOR, BIN_SIZE_MODEL, BINNING_TYPE, DECIMAL_PLACES, DEFAULT, pappso::PrecisionFactory::fromString(), pappso::getBinningTypeFromString(), REMOVE_ZERO_DATA_POINTS, reset(), setBinningType(), setBinSizeDivisor(), setBinSizeModel(), setDecimalPlaces(), and setRemoveZeroValDataPoints().
Referenced by MzIntegrationParams(), and initialize().
| void pappso::MzIntegrationParams::initialize | ( | double | minMz, |
| double | maxMz, | ||
| MzIntegrationParams::BinningType | binning_type, | ||
| pappso::PrecisionPtr | precisionPtr, | ||
| int | binSizeDivisor, | ||
| int | decimalPlaces, | ||
| bool | removeZeroValDataPoints, | ||
| QObject * | parent = nullptr ) |
Definition at line 221 of file mzintegrationparams.cpp.
References setBinningType(), setBinSizeDivisor(), setBinSizeModel(), setDecimalPlaces(), setGreatestMz(), setRemoveZeroValDataPoints(), and setSmallestMz().
| void pappso::MzIntegrationParams::initialize | ( | MzIntegrationParams & | other, |
| InitializationResult | initialization_results ) |
Definition at line 269 of file mzintegrationparams.cpp.
References MzIntegrationParams(), BIN_SIZE_DIVISOR, BIN_SIZE_MODEL, BINNING_TYPE, DECIMAL_PLACES, m_binningType, m_binSizeDivisor, m_binSizeModel, m_decimalPlaces, setBinningType(), setBinSizeDivisor(), setBinSizeModel(), and setDecimalPlaces().
| bool pappso::MzIntegrationParams::isRemoveZeroValDataPoints | ( | ) | const |
Definition at line 445 of file mzintegrationparams.cpp.
References m_removeZeroValDataPoints.
| bool pappso::MzIntegrationParams::isValid | ( | ) | const |
Definition at line 466 of file mzintegrationparams.cpp.
References m_binningType, m_greatestMz, m_smallestMz, and NONE.
Referenced by createArbitraryBins().
|
static |
Definition at line 1238 of file mzintegrationparams.cpp.
References ARBITRARY, BINNING_LOGIC_FULL, BINNING_LOGIC_PARTIAL, DATA_BASED, DEFAULT, FULL, and NONE.
Referenced by decimalPlacesChanged().
|
signal |
References binningTypeChanged(), decimalPlacesChanged(), greatestMzChanged(), indicativeBinSizeChanged(), and smallestMzChanged().
Referenced by setRemoveZeroValDataPoints().
| void pappso::MzIntegrationParams::reset | ( | ) |
Reset the instance to default values.
Definition at line 452 of file mzintegrationparams.cpp.
References ARBITRARY, pappso::PrecisionFactory::getResInstance(), setBinningType(), setBinSizeDivisor(), setBinSizeModel(), setDecimalPlaces(), setGreatestMz(), setRemoveZeroValDataPoints(), and setSmallestMz().
Referenced by initialize().
| void pappso::MzIntegrationParams::setBinningType | ( | MzIntegrationParams::BinningType | binning_type | ) |
Definition at line 352 of file mzintegrationparams.cpp.
References binningTypeChanged(), and m_binningType.
Referenced by initialize(), initialize(), initialize(), initialize(), and reset().
| void pappso::MzIntegrationParams::setBinSizeDivisor | ( | int | divisor | ) |
Definition at line 396 of file mzintegrationparams.cpp.
References binSizeDivisorChanged(), and m_binSizeDivisor.
Referenced by initialize(), initialize(), initialize(), initialize(), and reset().
| void pappso::MzIntegrationParams::setBinSizeModel | ( | pappso::PrecisionPtr | bin_size_model_p | ) |
Definition at line 376 of file mzintegrationparams.cpp.
References binSizeModelChanged(), pappso::PrecisionFactory::getResInstance(), and m_binSizeModel.
Referenced by initialize(), initialize(), initialize(), initialize(), and reset().
| void pappso::MzIntegrationParams::setDecimalPlaces | ( | int | decimal_places | ) |
Definition at line 425 of file mzintegrationparams.cpp.
References decimalPlacesChanged(), and m_decimalPlaces.
Referenced by initialize(), initialize(), initialize(), initialize(), and reset().
| void pappso::MzIntegrationParams::setGreatestMz | ( | double | value | ) |
Definition at line 319 of file mzintegrationparams.cpp.
References greatestMzChanged(), and m_greatestMz.
Referenced by initialize(), initialize(), reset(), and setMzValues().
| void pappso::MzIntegrationParams::setIndicativeBinSize | ( | double | value | ) |
Definition at line 412 of file mzintegrationparams.cpp.
References indicativeBinSizeChanged(), and m_indicativeBinSize.
| void pappso::MzIntegrationParams::setMzValues | ( | double | smallest, |
| double | greatest ) |
Definition at line 345 of file mzintegrationparams.cpp.
References setGreatestMz(), and setSmallestMz().
| void pappso::MzIntegrationParams::setRemoveZeroValDataPoints | ( | bool | removeOrNot = true | ) |
Definition at line 435 of file mzintegrationparams.cpp.
References m_removeZeroValDataPoints, and removeZeroValDataPointsChanged().
Referenced by initialize(), initialize(), initialize(), and reset().
| void pappso::MzIntegrationParams::setSmallestMz | ( | double | value | ) |
Definition at line 294 of file mzintegrationparams.cpp.
References m_smallestMz, and smallestMzChanged().
Referenced by initialize(), initialize(), reset(), and setMzValues().
|
signal |
Referenced by removeZeroValDataPointsChanged(), setSmallestMz(), and updateSmallestMz().
| QString pappso::MzIntegrationParams::toString | ( | ) | const |
Definition at line 1200 of file mzintegrationparams.cpp.
References pappso::binningTypeMap, m_binningType, m_binSizeDivisor, m_binSizeModel, m_decimalPlaces, and m_removeZeroValDataPoints.
| QString pappso::MzIntegrationParams::toString | ( | int | offset, |
| const QString & | spacer = " " ) const |
Definition at line 1150 of file mzintegrationparams.cpp.
References pappso::binningTypeMap, m_binningType, m_binSizeDivisor, m_binSizeModel, m_decimalPlaces, m_greatestMz, m_removeZeroValDataPoints, and m_smallestMz.
| void pappso::MzIntegrationParams::updateGreatestMz | ( | double | value | ) |
Definition at line 329 of file mzintegrationparams.cpp.
References greatestMzChanged(), and m_greatestMz.
| void pappso::MzIntegrationParams::updateSmallestMz | ( | double | value | ) |
Definition at line 303 of file mzintegrationparams.cpp.
References m_smallestMz, and smallestMzChanged().
|
protected |
Definition at line 239 of file mzintegrationparams.h.
Referenced by MzIntegrationParams(), clone(), createBins(), createBins(), getBinningType(), initialize(), initialize(), isValid(), setBinningType(), toString(), and toString().
|
protected |
Definition at line 253 of file mzintegrationparams.h.
Referenced by MzIntegrationParams(), clone(), createArbitraryBins(), getBinSizeDivisor(), initialize(), initialize(), setBinSizeDivisor(), toString(), and toString().
|
protected |
Definition at line 240 of file mzintegrationparams.h.
Referenced by MzIntegrationParams(), clone(), createArbitraryBins(), getBinSizeModel(), initialize(), initialize(), setBinSizeModel(), toString(), and toString().
|
protected |
Definition at line 258 of file mzintegrationparams.h.
Referenced by MzIntegrationParams(), binsToStringWithDeltas(), clone(), createArbitraryBins(), createDataBasedBins(), createDataBasedBinsOld(), getDecimalPlaces(), initialize(), initialize(), setDecimalPlaces(), toString(), and toString().
|
protected |
Definition at line 232 of file mzintegrationparams.h.
Referenced by MzIntegrationParams(), clone(), createArbitraryBins(), createDataBasedBins(), getGreatestMz(), hasValidMzRange(), initialize(), isValid(), setGreatestMz(), toString(), and updateGreatestMz().
|
protected |
Definition at line 237 of file mzintegrationparams.h.
Referenced by createArbitraryBins(), getIndicativeBinSize(), and setIndicativeBinSize().
|
protected |
Definition at line 263 of file mzintegrationparams.h.
Referenced by MzIntegrationParams(), clone(), initialize(), isRemoveZeroValDataPoints(), setRemoveZeroValDataPoints(), toString(), and toString().
|
protected |
Definition at line 228 of file mzintegrationparams.h.
Referenced by MzIntegrationParams(), clone(), createArbitraryBins(), createDataBasedBins(), createDataBasedBinsOld(), getSmallestMz(), hasValidMzRange(), initialize(), isValid(), setSmallestMz(), toString(), and updateSmallestMz().
|
readwrite |
Definition at line 93 of file mzintegrationparams.h.
|
readwrite |
Definition at line 97 of file mzintegrationparams.h.
|
readwrite |
Definition at line 96 of file mzintegrationparams.h.
|
readwrite |
Definition at line 95 of file mzintegrationparams.h.
|
readwrite |
Definition at line 92 of file mzintegrationparams.h.
|
readwrite |
Definition at line 94 of file mzintegrationparams.h.
|
readwrite |
Definition at line 98 of file mzintegrationparams.h.
|
readwrite |
Definition at line 89 of file mzintegrationparams.h.