|
libpappsomspp
Library for mass spectrometry
|
The MzIntegrationParams class provides the parameters definining how m/z ! More...
#include <mzintegrationparams.h>
Public Types | |
| enum class | InitializationResult { DEFAULT = 0 , FROM_SETTINGS_BIN_SIZE_MODEL_PARTIAL = 1 , FROM_SETTINGS_BIN_SIZE_MODEL_FULL = 2 , FROM_SETTINGS_FULL = 3 } |
Public Member Functions | |
| Q_INVOKABLE | MzIntegrationParams () |
| Q_INVOKABLE | MzIntegrationParams (const QString &text) |
| 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 () |
| InitializationResult | initialize (const QString &text) |
| 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 | setBinSizeModel (pappso::PrecisionPtr bin_size_model) |
| Q_INVOKABLE pappso::PrecisionPtr | getBinSizeModel () 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, const QString &spacer=" ") const |
| Q_INVOKABLE QString | toString () 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::ARBITRARY |
| int | m_decimalPlaces = -1 |
| pappso::PrecisionPtr | mp_binSizeModel |
| 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 86 of file mzintegrationparams.h.
|
strong |
| Enumerator | |
|---|---|
| DEFAULT | |
| FROM_SETTINGS_BIN_SIZE_MODEL_PARTIAL | |
| FROM_SETTINGS_BIN_SIZE_MODEL_FULL | |
| FROM_SETTINGS_FULL | |
Definition at line 90 of file mzintegrationparams.h.
| pappso::MzIntegrationParams::MzIntegrationParams | ( | ) |
Definition at line 86 of file mzintegrationparams.cpp.
References pappso::PrecisionFactory::getResInstance(), m_binningType, mp_binSizeModel, and pappso::NONE.
| pappso::MzIntegrationParams::MzIntegrationParams | ( | const QString & | text | ) |
Definition at line 93 of file mzintegrationparams.cpp.
References initialize().
| 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 98 of file mzintegrationparams.cpp.
References pappso::PrecisionFactory::getPpmInstance(), and mp_binSizeModel.
| pappso::MzIntegrationParams::MzIntegrationParams | ( | const MzIntegrationParams & | other | ) |
Definition at line 120 of file mzintegrationparams.cpp.
References pappso::PrecisionFactory::getResInstance(), and mp_binSizeModel.
|
virtual |
Definition at line 136 of file mzintegrationparams.cpp.
|
private |
Definition at line 493 of file mzintegrationparams.cpp.
References pappso::PrecisionBase::delta(), m_binSizeDivisor, m_decimalPlaces, m_greatestMz, m_smallestMz, mp_binSizeModel, pappso::res, pappso::PrecisionBase::unit(), and pappso::Utils::zeroDecimalsInValue().
Referenced by createBins().
| std::vector< double > pappso::MzIntegrationParams::createBins | ( | ) |
Definition at line 433 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 462 of file mzintegrationparams.cpp.
References pappso::ARBITRARY, createArbitraryBins(), createDataBasedBins(), pappso::DATA_BASED, m_binningType, and pappso::NONE.
|
private |
Definition at line 675 of file mzintegrationparams.cpp.
References m_decimalPlaces, m_smallestMz, and pappso::MassSpectrum::sortMz().
Referenced by createBins().
| BinningType pappso::MzIntegrationParams::getBinningType | ( | ) | const |
Definition at line 309 of file mzintegrationparams.cpp.
References m_binningType.
| int pappso::MzIntegrationParams::getBinSizeDivisor | ( | ) | const |
Definition at line 352 of file mzintegrationparams.cpp.
References m_binSizeDivisor.
| pappso::PrecisionPtr pappso::MzIntegrationParams::getBinSizeModel | ( | ) | const |
Definition at line 338 of file mzintegrationparams.cpp.
References mp_binSizeModel.
| int pappso::MzIntegrationParams::getDecimalPlaces | ( | ) | const |
Definition at line 323 of file mzintegrationparams.cpp.
References m_decimalPlaces.
| pappso::pappso_double pappso::MzIntegrationParams::getGreatestMz | ( | ) | const |
Definition at line 295 of file mzintegrationparams.cpp.
References m_greatestMz.
| pappso::pappso_double pappso::MzIntegrationParams::getSmallestMz | ( | ) | const |
Definition at line 274 of file mzintegrationparams.cpp.
References m_smallestMz.
| bool pappso::MzIntegrationParams::hasValidMzRange | ( | ) | const |
Definition at line 425 of file mzintegrationparams.cpp.
References m_greatestMz, and m_smallestMz.
| MzIntegrationParams::InitializationResult pappso::MzIntegrationParams::initialize | ( | const QString & | text | ) |
Definition at line 141 of file mzintegrationparams.cpp.
References pappso::ARBITRARY, DEFAULT, FROM_SETTINGS_BIN_SIZE_MODEL_FULL, FROM_SETTINGS_BIN_SIZE_MODEL_PARTIAL, FROM_SETTINGS_FULL, pappso::PrecisionFactory::fromString(), pappso::getBinningTypeFromString(), pappso::PrecisionFactory::getResInstance(), m_binningType, m_binSizeDivisor, m_decimalPlaces, m_greatestMz, m_removeZeroValDataPoints, m_smallestMz, and mp_binSizeModel.
Referenced by MzIntegrationParams().
| bool pappso::MzIntegrationParams::isRemoveZeroValDataPoints | ( | ) | const |
Definition at line 366 of file mzintegrationparams.cpp.
References m_removeZeroValDataPoints.
| bool pappso::MzIntegrationParams::isValid | ( | ) | const |
Definition at line 389 of file mzintegrationparams.cpp.
References m_binningType, m_binSizeDivisor, m_greatestMz, m_smallestMz, mp_binSizeModel, and pappso::NONE.
| MzIntegrationParams & pappso::MzIntegrationParams::operator= | ( | const MzIntegrationParams & | other | ) |
Definition at line 236 of file mzintegrationparams.cpp.
References pappso::PrecisionFactory::getPpmInstance(), m_binningType, m_binSizeDivisor, m_decimalPlaces, m_greatestMz, m_removeZeroValDataPoints, m_smallestMz, and mp_binSizeModel.
| void pappso::MzIntegrationParams::reset | ( | ) |
Reset the instance to default values.
Definition at line 374 of file mzintegrationparams.cpp.
References pappso::PrecisionFactory::getPpmInstance(), m_binningType, m_binSizeDivisor, m_greatestMz, m_removeZeroValDataPoints, m_smallestMz, mp_binSizeModel, and pappso::NONE.
| void pappso::MzIntegrationParams::setBinningType | ( | BinningType | binningType | ) |
Definition at line 302 of file mzintegrationparams.cpp.
References m_binningType.
| void pappso::MzIntegrationParams::setBinSizeDivisor | ( | int | divisor | ) |
Definition at line 345 of file mzintegrationparams.cpp.
References m_binSizeDivisor.
| void pappso::MzIntegrationParams::setBinSizeModel | ( | pappso::PrecisionPtr | bin_size_model | ) |
Definition at line 329 of file mzintegrationparams.cpp.
References pappso::PrecisionFactory::getDaltonInstance(), and mp_binSizeModel.
| void pappso::MzIntegrationParams::setDecimalPlaces | ( | int | decimal_places | ) |
Definition at line 316 of file mzintegrationparams.cpp.
References m_decimalPlaces.
| void pappso::MzIntegrationParams::setGreatestMz | ( | pappso::pappso_double | value | ) |
Definition at line 281 of file mzintegrationparams.cpp.
References m_greatestMz.
| void pappso::MzIntegrationParams::setRemoveZeroValDataPoints | ( | bool | removeOrNot = true | ) |
Definition at line 359 of file mzintegrationparams.cpp.
References m_removeZeroValDataPoints.
| void pappso::MzIntegrationParams::setSmallestMz | ( | pappso::pappso_double | value | ) |
Definition at line 260 of file mzintegrationparams.cpp.
References m_smallestMz.
| QString pappso::MzIntegrationParams::toString | ( | ) | const |
Definition at line 850 of file mzintegrationparams.cpp.
References pappso::ARBITRARY, pappso::binningTypeMap, m_binningType, m_binSizeDivisor, m_decimalPlaces, m_greatestMz, m_removeZeroValDataPoints, m_smallestMz, mp_binSizeModel, and pappso::PrecisionBase::toString().
| QString pappso::MzIntegrationParams::toString | ( | int | offset, |
| const QString & | spacer = " " |
||
| ) | const |
Definition at line 785 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_binSizeModel, and pappso::PrecisionBase::toString().
| void pappso::MzIntegrationParams::updateGreatestMz | ( | pappso::pappso_double | value | ) |
Definition at line 288 of file mzintegrationparams.cpp.
References m_greatestMz.
| void pappso::MzIntegrationParams::updateSmallestMz | ( | pappso::pappso_double | value | ) |
Definition at line 267 of file mzintegrationparams.cpp.
References m_smallestMz.
|
private |
Definition at line 163 of file mzintegrationparams.h.
Referenced by MzIntegrationParams(), createBins(), getBinningType(), initialize(), isValid(), operator=(), reset(), setBinningType(), and toString().
|
private |
Definition at line 174 of file mzintegrationparams.h.
Referenced by createArbitraryBins(), getBinSizeDivisor(), initialize(), isValid(), operator=(), reset(), setBinSizeDivisor(), and toString().
|
private |
Definition at line 167 of file mzintegrationparams.h.
Referenced by createArbitraryBins(), createDataBasedBins(), getDecimalPlaces(), initialize(), operator=(), setDecimalPlaces(), and toString().
|
private |
Definition at line 161 of file mzintegrationparams.h.
Referenced by createArbitraryBins(), getGreatestMz(), hasValidMzRange(), initialize(), isValid(), operator=(), reset(), setGreatestMz(), toString(), and updateGreatestMz().
|
private |
Definition at line 176 of file mzintegrationparams.h.
Referenced by initialize(), isRemoveZeroValDataPoints(), operator=(), reset(), setRemoveZeroValDataPoints(), and toString().
|
private |
Definition at line 157 of file mzintegrationparams.h.
Referenced by createArbitraryBins(), createDataBasedBins(), getSmallestMz(), hasValidMzRange(), initialize(), isValid(), operator=(), reset(), setSmallestMz(), toString(), and updateSmallestMz().
|
private |
Definition at line 171 of file mzintegrationparams.h.
Referenced by MzIntegrationParams(), createArbitraryBins(), getBinSizeModel(), initialize(), isValid(), operator=(), reset(), setBinSizeModel(), and toString().