|
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 | lowerAnchorMzChanged () |
| void | upperAnchorMzChanged () |
| void | binningTypeChanged () |
| 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 | setLowerAnchorMz (double value) |
| Q_INVOKABLE void | updateLowerAnchorMz (double value) |
| Q_INVOKABLE double | getLowerAnchorMz () const |
| Q_INVOKABLE void | setUpperAnchorMz (double value) |
| Q_INVOKABLE void | updateUpperAnchorMz (double value) |
| Q_INVOKABLE double | getUpperAnchorMz () 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 | 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_lowerAnchorMz = std::numeric_limits<double>::max() |
| double | m_upperAnchorMz = std::numeric_limits<double>::min() |
| 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 |
| double | lowerAnchorMz |
| double | upperAnchorMz |
| BinningType | binningType |
| 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 108 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 123 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 setBinningType().
|
signal |
Referenced by setBinSizeDivisor().
|
signal |
References registerJsConstructor().
Referenced by setBinSizeModel().
| QString pappso::MzIntegrationParams::binsToStringWithDeltas | ( | const std::vector< double > | bins | ) | const |
Definition at line 1401 of file mzintegrationparams.cpp.
References m_decimalPlaces.
Referenced by createArbitraryBins(), createDataBasedBins(), and upperAnchorMzChanged().
| 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 599 of file mzintegrationparams.cpp.
References binsToStringWithDeltas(), isValid(), m_binSizeDivisor, m_binSizeModel, m_decimalPlaces, m_greatestMz, m_lowerAnchorMz, m_smallestMz, m_upperAnchorMz, pappso::Utils::writeToFile(), and pappso::Utils::zeroDecimalsInValue().
Referenced by createBins(), and createBins().
| std::vector< double > pappso::MzIntegrationParams::createBins | ( | ) |
Definition at line 543 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 570 of file mzintegrationparams.cpp.
References ARBITRARY, createArbitraryBins(), createDataBasedBins(), DATA_BASED, m_binningType, and NONE.
|
protected |
Definition at line 913 of file mzintegrationparams.cpp.
References binsToStringWithDeltas(), m_decimalPlaces, m_greatestMz, m_lowerAnchorMz, m_smallestMz, m_upperAnchorMz, pappso::MassSpectrum::sortMz(), and pappso::Utils::writeToFile().
Referenced by createBins().
|
protected |
Definition at line 1212 of file mzintegrationparams.cpp.
References m_decimalPlaces, m_smallestMz, and pappso::MassSpectrum::sortMz().
|
signal |
Referenced by setDecimalPlaces().
| MzIntegrationParams::BinningType pappso::MzIntegrationParams::getBinningType | ( | ) | const |
Definition at line 421 of file mzintegrationparams.cpp.
References m_binningType.
| int pappso::MzIntegrationParams::getBinSizeDivisor | ( | ) | const |
Definition at line 463 of file mzintegrationparams.cpp.
References m_binSizeDivisor.
| pappso::PrecisionPtr pappso::MzIntegrationParams::getBinSizeModel | ( | ) | const |
Definition at line 447 of file mzintegrationparams.cpp.
References m_binSizeModel.
| int pappso::MzIntegrationParams::getDecimalPlaces | ( | ) | const |
Definition at line 427 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::getLowerAnchorMz | ( | ) | const |
Definition at line 368 of file mzintegrationparams.cpp.
References m_lowerAnchorMz.
| double pappso::MzIntegrationParams::getSmallestMz | ( | ) | const |
Definition at line 313 of file mzintegrationparams.cpp.
References m_smallestMz.
| double pappso::MzIntegrationParams::getUpperAnchorMz | ( | ) | const |
Definition at line 397 of file mzintegrationparams.cpp.
References m_upperAnchorMz.
|
signal |
References toString().
Referenced by removeZeroValDataPointsChanged(), setGreatestMz(), and updateGreatestMz().
| bool pappso::MzIntegrationParams::hasValidMzRange | ( | ) | const |
Definition at line 536 of file mzintegrationparams.cpp.
References m_greatestMz, and m_smallestMz.
| 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 489 of file mzintegrationparams.cpp.
References m_removeZeroValDataPoints.
| bool pappso::MzIntegrationParams::isValid | ( | ) | const |
Definition at line 510 of file mzintegrationparams.cpp.
References m_binningType, m_greatestMz, m_smallestMz, and NONE.
Referenced by createArbitraryBins().
|
signal |
Referenced by removeZeroValDataPointsChanged(), setLowerAnchorMz(), and updateLowerAnchorMz().
|
static |
Definition at line 1420 of file mzintegrationparams.cpp.
References ARBITRARY, BINNING_LOGIC_FULL, BINNING_LOGIC_PARTIAL, DATA_BASED, DEFAULT, FULL, and NONE.
Referenced by binSizeModelChanged().
|
signal |
References greatestMzChanged(), lowerAnchorMzChanged(), smallestMzChanged(), and upperAnchorMzChanged().
Referenced by setRemoveZeroValDataPoints().
| void pappso::MzIntegrationParams::reset | ( | ) |
Reset the instance to default values.
Definition at line 496 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 410 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 453 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 433 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 469 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::setLowerAnchorMz | ( | double | value | ) |
Definition at line 348 of file mzintegrationparams.cpp.
References lowerAnchorMzChanged(), and m_lowerAnchorMz.
| void pappso::MzIntegrationParams::setMzValues | ( | double | smallest, |
| double | greatest ) |
Definition at line 403 of file mzintegrationparams.cpp.
References setGreatestMz(), and setSmallestMz().
| void pappso::MzIntegrationParams::setRemoveZeroValDataPoints | ( | bool | removeOrNot = true | ) |
Definition at line 479 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().
| void pappso::MzIntegrationParams::setUpperAnchorMz | ( | double | value | ) |
Definition at line 377 of file mzintegrationparams.cpp.
References m_upperAnchorMz, and upperAnchorMzChanged().
|
signal |
Referenced by removeZeroValDataPointsChanged(), setSmallestMz(), and updateSmallestMz().
| QString pappso::MzIntegrationParams::toString | ( | ) | const |
Definition at line 1382 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 1324 of file mzintegrationparams.cpp.
References pappso::binningTypeMap, m_binningType, m_binSizeDivisor, m_binSizeModel, m_decimalPlaces, m_greatestMz, m_lowerAnchorMz, m_removeZeroValDataPoints, m_smallestMz, and m_upperAnchorMz.
Referenced by greatestMzChanged().
| void pappso::MzIntegrationParams::updateGreatestMz | ( | double | value | ) |
Definition at line 329 of file mzintegrationparams.cpp.
References greatestMzChanged(), and m_greatestMz.
| void pappso::MzIntegrationParams::updateLowerAnchorMz | ( | double | value | ) |
Definition at line 358 of file mzintegrationparams.cpp.
References lowerAnchorMzChanged(), and m_lowerAnchorMz.
| void pappso::MzIntegrationParams::updateSmallestMz | ( | double | value | ) |
Definition at line 303 of file mzintegrationparams.cpp.
References m_smallestMz, and smallestMzChanged().
| void pappso::MzIntegrationParams::updateUpperAnchorMz | ( | double | value | ) |
Definition at line 387 of file mzintegrationparams.cpp.
References m_upperAnchorMz, and upperAnchorMzChanged().
|
signal |
References binsToStringWithDeltas().
Referenced by removeZeroValDataPointsChanged(), setUpperAnchorMz(), and updateUpperAnchorMz().
|
protected |
Definition at line 255 of file mzintegrationparams.h.
Referenced by MzIntegrationParams(), clone(), createBins(), createBins(), getBinningType(), initialize(), initialize(), isValid(), setBinningType(), toString(), and toString().
|
protected |
Definition at line 269 of file mzintegrationparams.h.
Referenced by MzIntegrationParams(), clone(), createArbitraryBins(), getBinSizeDivisor(), initialize(), initialize(), setBinSizeDivisor(), toString(), and toString().
|
protected |
Definition at line 256 of file mzintegrationparams.h.
Referenced by MzIntegrationParams(), clone(), createArbitraryBins(), getBinSizeModel(), initialize(), initialize(), setBinSizeModel(), toString(), and toString().
|
protected |
Definition at line 274 of file mzintegrationparams.h.
Referenced by MzIntegrationParams(), binsToStringWithDeltas(), clone(), createArbitraryBins(), createDataBasedBins(), createDataBasedBinsOld(), getDecimalPlaces(), initialize(), initialize(), setDecimalPlaces(), toString(), and toString().
|
protected |
Definition at line 243 of file mzintegrationparams.h.
Referenced by MzIntegrationParams(), clone(), createArbitraryBins(), createDataBasedBins(), getGreatestMz(), hasValidMzRange(), initialize(), isValid(), setGreatestMz(), toString(), and updateGreatestMz().
|
protected |
Definition at line 247 of file mzintegrationparams.h.
Referenced by createArbitraryBins(), createDataBasedBins(), getLowerAnchorMz(), setLowerAnchorMz(), toString(), and updateLowerAnchorMz().
|
protected |
Definition at line 279 of file mzintegrationparams.h.
Referenced by MzIntegrationParams(), clone(), initialize(), isRemoveZeroValDataPoints(), setRemoveZeroValDataPoints(), toString(), and toString().
|
protected |
Definition at line 239 of file mzintegrationparams.h.
Referenced by MzIntegrationParams(), clone(), createArbitraryBins(), createDataBasedBins(), createDataBasedBinsOld(), getSmallestMz(), hasValidMzRange(), initialize(), isValid(), setSmallestMz(), toString(), and updateSmallestMz().
|
protected |
Definition at line 250 of file mzintegrationparams.h.
Referenced by createArbitraryBins(), createDataBasedBins(), getUpperAnchorMz(), setUpperAnchorMz(), toString(), and updateUpperAnchorMz().
|
readwrite |
Definition at line 99 of file mzintegrationparams.h.
|
readwrite |
Definition at line 102 of file mzintegrationparams.h.
|
readwrite |
Definition at line 101 of file mzintegrationparams.h.
|
readwrite |
Definition at line 100 of file mzintegrationparams.h.
|
readwrite |
Definition at line 92 of file mzintegrationparams.h.
|
readwrite |
Definition at line 95 of file mzintegrationparams.h.
|
readwrite |
Definition at line 103 of file mzintegrationparams.h.
|
readwrite |
Definition at line 89 of file mzintegrationparams.h.
|
readwrite |
Definition at line 98 of file mzintegrationparams.h.