|
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 | |
| MzIntegrationParams (QObject *parent=nullptr) | |
| MzIntegrationParams (const QString &text, QObject *parent=nullptr) | |
| MzIntegrationParams (double minMz, double maxMz, BinningType binningType, pappso::PrecisionPtr precisionPtr, int binSizeDivisor, int decimalPlaces, bool removeZeroValDataPoints, QObject *parent=nullptr) | |
| virtual | ~MzIntegrationParams () |
| MzIntegrationParams * | clone (QObject *parent=nullptr) const |
| InitializationResult | initialize (const QString &text) |
| 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) |
| void | initialize (const MzIntegrationParams *other_p, QObject *parent=nullptr) |
| void | initialize (MzIntegrationParams &other, InitializationResult initialization_results) |
| void | setSmallestMz (double value) |
| void | updateSmallestMz (double value) |
| double | getSmallestMz () const |
| void | setGreatestMz (double value) |
| void | updateGreatestMz (double value) |
| double | getGreatestMz () const |
| void | setMzValues (double smallest, double greatest) |
| void | setBinningType (BinningType binningType) |
| BinningType | getBinningType () const |
| void | setBinSizeModel (pappso::PrecisionPtr bin_size_model_p) |
| pappso::PrecisionPtr | getBinSizeModel () const |
| void | setBinSizeDivisor (int divisor) |
| int | getBinSizeDivisor () const |
| void | setIndicativeBinSize (double value) |
| double | getIndicativeBinSize () const |
| void | setDecimalPlaces (int decimal_places) |
| int | getDecimalPlaces () const |
| void | setRemoveZeroValDataPoints (bool removeOrNot=true) |
| bool | isRemoveZeroValDataPoints () const |
| void | reset () |
| Reset the instance to default values. | |
| bool | isValid () const |
| bool | hasValidMzRange () const |
| std::vector< double > | createBins () |
| std::vector< double > | createBins (pappso::MassSpectrumCstSPtr mass_spectrum_csp) |
| QString | toString (int offset, const QString &spacer=" ") const |
| QString | toString () const |
| QString | binsToStringWithDeltas (const std::vector< double > bins) const |
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 |
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 73 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 78 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 93 of file mzintegrationparams.h.
|
explicit |
Definition at line 77 of file mzintegrationparams.cpp.
Referenced by clone(), initialize(), initialize(), and initialize().
|
explicit |
Definition at line 81 of file mzintegrationparams.cpp.
References initialize().
|
explicit |
Definition at line 87 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 111 of file mzintegrationparams.cpp.
|
signal |
Referenced by setBinningType().
|
signal |
Referenced by setBinSizeDivisor().
|
signal |
Referenced by setBinSizeModel().
| QString pappso::MzIntegrationParams::binsToStringWithDeltas | ( | const std::vector< double > | bins | ) | const |
Definition at line 1210 of file mzintegrationparams.cpp.
References m_decimalPlaces.
Referenced by createArbitraryBins(), and createDataBasedBins().
| MzIntegrationParams * pappso::MzIntegrationParams::clone | ( | QObject * | parent = nullptr | ) | const |
Definition at line 116 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 546 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 490 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 517 of file mzintegrationparams.cpp.
References ARBITRARY, createArbitraryBins(), createDataBasedBins(), DATA_BASED, m_binningType, and NONE.
|
protected |
Definition at line 743 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 1029 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 354 of file mzintegrationparams.cpp.
References m_binningType.
| int pappso::MzIntegrationParams::getBinSizeDivisor | ( | ) | const |
Definition at line 397 of file mzintegrationparams.cpp.
References m_binSizeDivisor.
| pappso::PrecisionPtr pappso::MzIntegrationParams::getBinSizeModel | ( | ) | const |
Definition at line 381 of file mzintegrationparams.cpp.
References m_binSizeModel.
| int pappso::MzIntegrationParams::getDecimalPlaces | ( | ) | const |
Definition at line 361 of file mzintegrationparams.cpp.
References m_decimalPlaces.
| double pappso::MzIntegrationParams::getGreatestMz | ( | ) | const |
Definition at line 330 of file mzintegrationparams.cpp.
References m_greatestMz.
| double pappso::MzIntegrationParams::getIndicativeBinSize | ( | ) | const |
Definition at line 410 of file mzintegrationparams.cpp.
References m_indicativeBinSize.
| double pappso::MzIntegrationParams::getSmallestMz | ( | ) | const |
Definition at line 304 of file mzintegrationparams.cpp.
References m_smallestMz.
|
signal |
Referenced by setGreatestMz(), and updateGreatestMz().
| bool pappso::MzIntegrationParams::hasValidMzRange | ( | ) | const |
Definition at line 483 of file mzintegrationparams.cpp.
References m_greatestMz, and m_smallestMz.
|
signal |
Referenced by setIndicativeBinSize().
| void pappso::MzIntegrationParams::initialize | ( | const MzIntegrationParams & | other, |
| QObject * | parent = nullptr ) |
Definition at line 234 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 249 of file mzintegrationparams.cpp.
References MzIntegrationParams(), and initialize().
| MzIntegrationParams::InitializationResult pappso::MzIntegrationParams::initialize | ( | const QString & | text | ) |
Definition at line 132 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 213 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 260 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 436 of file mzintegrationparams.cpp.
References m_removeZeroValDataPoints.
| bool pappso::MzIntegrationParams::isValid | ( | ) | const |
Definition at line 457 of file mzintegrationparams.cpp.
References m_binningType, m_greatestMz, m_smallestMz, and NONE.
Referenced by createArbitraryBins().
|
signal |
Referenced by setRemoveZeroValDataPoints().
| void pappso::MzIntegrationParams::reset | ( | ) |
Reset the instance to default values.
Definition at line 443 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 343 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 387 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 367 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 416 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 310 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 403 of file mzintegrationparams.cpp.
References indicativeBinSizeChanged(), and m_indicativeBinSize.
| void pappso::MzIntegrationParams::setMzValues | ( | double | smallest, |
| double | greatest ) |
Definition at line 336 of file mzintegrationparams.cpp.
References setGreatestMz(), and setSmallestMz().
| void pappso::MzIntegrationParams::setRemoveZeroValDataPoints | ( | bool | removeOrNot = true | ) |
Definition at line 426 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 285 of file mzintegrationparams.cpp.
References m_smallestMz, and smallestMzChanged().
Referenced by initialize(), initialize(), reset(), and setMzValues().
|
signal |
Referenced by setSmallestMz(), and updateSmallestMz().
| QString pappso::MzIntegrationParams::toString | ( | ) | const |
Definition at line 1191 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 1141 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 320 of file mzintegrationparams.cpp.
References greatestMzChanged(), and m_greatestMz.
| void pappso::MzIntegrationParams::updateSmallestMz | ( | double | value | ) |
Definition at line 294 of file mzintegrationparams.cpp.
References m_smallestMz, and smallestMzChanged().
|
protected |
Definition at line 207 of file mzintegrationparams.h.
Referenced by MzIntegrationParams(), clone(), createBins(), createBins(), getBinningType(), initialize(), initialize(), isValid(), setBinningType(), toString(), and toString().
|
protected |
Definition at line 221 of file mzintegrationparams.h.
Referenced by MzIntegrationParams(), clone(), createArbitraryBins(), getBinSizeDivisor(), initialize(), initialize(), setBinSizeDivisor(), toString(), and toString().
|
protected |
Definition at line 208 of file mzintegrationparams.h.
Referenced by MzIntegrationParams(), clone(), createArbitraryBins(), getBinSizeModel(), initialize(), initialize(), setBinSizeModel(), toString(), and toString().
|
protected |
Definition at line 226 of file mzintegrationparams.h.
Referenced by MzIntegrationParams(), binsToStringWithDeltas(), clone(), createArbitraryBins(), createDataBasedBins(), createDataBasedBinsOld(), getDecimalPlaces(), initialize(), initialize(), setDecimalPlaces(), toString(), and toString().
|
protected |
Definition at line 200 of file mzintegrationparams.h.
Referenced by MzIntegrationParams(), clone(), createArbitraryBins(), createDataBasedBins(), getGreatestMz(), hasValidMzRange(), initialize(), isValid(), setGreatestMz(), toString(), and updateGreatestMz().
|
protected |
Definition at line 205 of file mzintegrationparams.h.
Referenced by createArbitraryBins(), getIndicativeBinSize(), and setIndicativeBinSize().
|
protected |
Definition at line 231 of file mzintegrationparams.h.
Referenced by MzIntegrationParams(), clone(), initialize(), isRemoveZeroValDataPoints(), setRemoveZeroValDataPoints(), toString(), and toString().
|
protected |
Definition at line 196 of file mzintegrationparams.h.
Referenced by MzIntegrationParams(), clone(), createArbitraryBins(), createDataBasedBins(), createDataBasedBinsOld(), getSmallestMz(), hasValidMzRange(), initialize(), isValid(), setSmallestMz(), toString(), and updateSmallestMz().