libpappsomspp
Library for mass spectrometry
|
The MzIntegrationParams class provides the parameters definining how m/z ! 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 = (BINNING_LOGIC_PARTIAL | BIN_SIZE_DIVISOR | DECIMAL_PLACES) , REMOVE_ZERO_DATA_POINTS = 1 << 4 , FULL = (REMOVE_ZERO_DATA_POINTS | BINNING_LOGIC_FULL) } |
Signals | |
void | smallestMzChanged () |
void | greatestMzChanged () |
void | binningTypeChanged () |
void | decimalPlacesChanged () |
void | binSizeModelChanged () |
void | binSizeDivisorChanged () |
void | removeZeroValDataPointsChanged () |
void | wasReset () |
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) |
Q_INVOKABLE void | initialize (const MzIntegrationParams &other, QObject *parent=nullptr) |
void | initialize (MzIntegrationParams &other, InitializationResult initialization_results) |
void | setSmallestMz (double value) |
Q_INVOKABLE void | updateSmallestMz (double value) |
double | getSmallestMz () const |
void | setGreatestMz (double value) |
Q_INVOKABLE void | updateGreatestMz (double value) |
double | getGreatestMz () const |
Q_INVOKABLE 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 | setDecimalPlaces (int decimal_places) |
int | getDecimalPlaces () const |
void | setRemoveZeroValDataPoints (bool removeOrNot=true) |
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 |
Static Public Member Functions | |
static void | registerJsConstructor (QJSEngine *engine) |
Protected Member Functions | |
std::vector< double > | createArbitraryBins () |
std::vector< double > | createDataBasedBins (pappso::MassSpectrumCstSPtr massSpectrum) |
Protected Attributes | |
double | m_smallestMz = std::numeric_limits<double>::max() |
double | m_greatestMz = std::numeric_limits<double>::min() |
BinningType | m_binningType = BinningType::ARBITRARY |
pappso::PrecisionPtr | m_binSizeModel = pappso::PrecisionFactory::getResInstance(40000) |
int | m_binSizeDivisor = 1 |
int | m_decimalPlaces = -1 |
bool | m_removeZeroValDataPoints = true |
Properties | |
double | smallestMz |
double | greatestMz |
BinningType | binningType |
int | decimalPlaces |
pappso::PrecisionPtr | binSizeModel |
int | binSizeDivisor |
bool | removeZeroValDataPoints |
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.
|
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 109 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 124 of file mzintegrationparams.h.
|
explicit |
Definition at line 90 of file mzintegrationparams.cpp.
Referenced by clone(), initialize(), and initialize().
|
explicit |
Definition at line 94 of file mzintegrationparams.cpp.
References initialize().
|
explicit |
Definition at line 99 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 122 of file mzintegrationparams.cpp.
|
signal |
Referenced by setBinningType().
|
signal |
Referenced by setBinSizeDivisor().
|
signal |
MzIntegrationParams * pappso::MzIntegrationParams::clone | ( | QObject * | parent = nullptr | ) | const |
Definition at line 127 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 543 of file mzintegrationparams.cpp.
References isValid(), m_binSizeDivisor, m_binSizeModel, m_decimalPlaces, m_greatestMz, m_smallestMz, pappso::Enums::res, toString(), and pappso::Utils::zeroDecimalsInValue().
Referenced by createBins(), and createBins().
std::vector< double > pappso::MzIntegrationParams::createBins | ( | ) |
Definition at line 483 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 512 of file mzintegrationparams.cpp.
References ARBITRARY, createArbitraryBins(), createDataBasedBins(), DATA_BASED, m_binningType, and NONE.
|
protected |
Definition at line 730 of file mzintegrationparams.cpp.
References m_decimalPlaces, m_smallestMz, and pappso::MassSpectrum::sortMz().
Referenced by createBins().
|
signal |
Referenced by setDecimalPlaces().
MzIntegrationParams::BinningType pappso::MzIntegrationParams::getBinningType | ( | ) | const |
Definition at line 355 of file mzintegrationparams.cpp.
References m_binningType.
int pappso::MzIntegrationParams::getBinSizeDivisor | ( | ) | const |
Definition at line 396 of file mzintegrationparams.cpp.
References m_binSizeDivisor.
pappso::PrecisionPtr pappso::MzIntegrationParams::getBinSizeModel | ( | ) | const |
Definition at line 380 of file mzintegrationparams.cpp.
References m_binSizeModel.
int pappso::MzIntegrationParams::getDecimalPlaces | ( | ) | const |
Definition at line 362 of file mzintegrationparams.cpp.
References m_decimalPlaces.
double pappso::MzIntegrationParams::getGreatestMz | ( | ) | const |
Definition at line 331 of file mzintegrationparams.cpp.
References m_greatestMz.
double pappso::MzIntegrationParams::getSmallestMz | ( | ) | const |
Definition at line 302 of file mzintegrationparams.cpp.
References m_smallestMz.
|
signal |
Referenced by setGreatestMz(), and updateGreatestMz().
bool pappso::MzIntegrationParams::hasValidMzRange | ( | ) | const |
Definition at line 475 of file mzintegrationparams.cpp.
References m_greatestMz, and m_smallestMz.
void pappso::MzIntegrationParams::initialize | ( | const MzIntegrationParams & | other, |
QObject * | parent = nullptr ) |
Definition at line 244 of file mzintegrationparams.cpp.
References MzIntegrationParams(), m_binningType, m_binSizeDivisor, m_binSizeModel, m_decimalPlaces, m_greatestMz, m_removeZeroValDataPoints, and m_smallestMz.
MzIntegrationParams::InitializationResult pappso::MzIntegrationParams::initialize | ( | const QString & | text | ) |
Definition at line 142 of file mzintegrationparams.cpp.
References BIN_SIZE_DIVISOR, BIN_SIZE_MODEL, BINNING_TYPE, DECIMAL_PLACES, DEFAULT, pappso::PrecisionFactory::fromString(), pappso::getBinningTypeFromString(), m_binningType, m_binSizeDivisor, m_binSizeModel, m_decimalPlaces, m_removeZeroValDataPoints, REMOVE_ZERO_DATA_POINTS, and reset().
Referenced by MzIntegrationParams().
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 223 of file mzintegrationparams.cpp.
References m_binningType, m_binSizeDivisor, m_binSizeModel, m_decimalPlaces, m_greatestMz, m_removeZeroValDataPoints, and m_smallestMz.
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, and m_decimalPlaces.
bool pappso::MzIntegrationParams::isRemoveZeroValDataPoints | ( | ) | const |
Definition at line 423 of file mzintegrationparams.cpp.
References m_removeZeroValDataPoints.
bool pappso::MzIntegrationParams::isValid | ( | ) | const |
Definition at line 448 of file mzintegrationparams.cpp.
References m_binningType, m_greatestMz, m_smallestMz, and NONE.
Referenced by createArbitraryBins().
|
static |
Definition at line 907 of file mzintegrationparams.cpp.
References ARBITRARY, BINNING_LOGIC_FULL, BINNING_LOGIC_PARTIAL, DATA_BASED, DEFAULT, FULL, and NONE.
|
signal |
Referenced by setRemoveZeroValDataPoints().
void pappso::MzIntegrationParams::reset | ( | ) |
Reset the instance to default values.
Definition at line 431 of file mzintegrationparams.cpp.
References ARBITRARY, pappso::PrecisionFactory::getResInstance(), m_binningType, m_binSizeDivisor, m_binSizeModel, m_decimalPlaces, m_greatestMz, m_removeZeroValDataPoints, m_smallestMz, and wasReset().
Referenced by initialize().
void pappso::MzIntegrationParams::setBinningType | ( | MzIntegrationParams::BinningType | binning_type | ) |
Definition at line 344 of file mzintegrationparams.cpp.
References binningTypeChanged(), and m_binningType.
void pappso::MzIntegrationParams::setBinSizeDivisor | ( | int | divisor | ) |
Definition at line 386 of file mzintegrationparams.cpp.
References binSizeDivisorChanged(), and m_binSizeDivisor.
void pappso::MzIntegrationParams::setBinSizeModel | ( | pappso::PrecisionPtr | bin_size_model_p | ) |
Definition at line 368 of file mzintegrationparams.cpp.
References pappso::PrecisionFactory::getResInstance(), and m_binSizeModel.
void pappso::MzIntegrationParams::setDecimalPlaces | ( | int | decimal_places | ) |
Definition at line 402 of file mzintegrationparams.cpp.
References decimalPlacesChanged(), and m_decimalPlaces.
void pappso::MzIntegrationParams::setGreatestMz | ( | double | value | ) |
Definition at line 309 of file mzintegrationparams.cpp.
References greatestMzChanged(), and m_greatestMz.
Referenced by setMzValues().
void pappso::MzIntegrationParams::setMzValues | ( | double | smallest, |
double | greatest ) |
Definition at line 337 of file mzintegrationparams.cpp.
References setGreatestMz(), and setSmallestMz().
void pappso::MzIntegrationParams::setRemoveZeroValDataPoints | ( | bool | removeOrNot = true | ) |
Definition at line 412 of file mzintegrationparams.cpp.
References m_removeZeroValDataPoints, and removeZeroValDataPointsChanged().
void pappso::MzIntegrationParams::setSmallestMz | ( | double | value | ) |
Definition at line 281 of file mzintegrationparams.cpp.
References m_smallestMz, and smallestMzChanged().
Referenced by setMzValues().
|
signal |
Referenced by setSmallestMz(), and updateSmallestMz().
QString pappso::MzIntegrationParams::toString | ( | ) | const |
Definition at line 889 of file mzintegrationparams.cpp.
References pappso::binningTypeMap, m_binningType, m_binSizeDivisor, m_binSizeModel, m_decimalPlaces, and m_removeZeroValDataPoints.
Referenced by createArbitraryBins().
QString pappso::MzIntegrationParams::toString | ( | int | offset, |
const QString & | spacer = " " ) const |
Definition at line 841 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 291 of file mzintegrationparams.cpp.
References m_smallestMz, and smallestMzChanged().
|
signal |
Referenced by reset().
|
protected |
Definition at line 232 of file mzintegrationparams.h.
Referenced by MzIntegrationParams(), clone(), createBins(), createBins(), getBinningType(), initialize(), initialize(), initialize(), initialize(), isValid(), reset(), setBinningType(), toString(), and toString().
|
protected |
Definition at line 234 of file mzintegrationparams.h.
Referenced by MzIntegrationParams(), clone(), createArbitraryBins(), getBinSizeDivisor(), initialize(), initialize(), initialize(), initialize(), reset(), setBinSizeDivisor(), toString(), and toString().
|
protected |
Definition at line 233 of file mzintegrationparams.h.
Referenced by MzIntegrationParams(), clone(), createArbitraryBins(), getBinSizeModel(), initialize(), initialize(), initialize(), initialize(), reset(), setBinSizeModel(), toString(), and toString().
|
protected |
Definition at line 237 of file mzintegrationparams.h.
Referenced by MzIntegrationParams(), clone(), createArbitraryBins(), createDataBasedBins(), getDecimalPlaces(), initialize(), initialize(), initialize(), initialize(), reset(), setDecimalPlaces(), toString(), and toString().
|
protected |
Definition at line 227 of file mzintegrationparams.h.
Referenced by MzIntegrationParams(), clone(), createArbitraryBins(), getGreatestMz(), hasValidMzRange(), initialize(), initialize(), isValid(), reset(), setGreatestMz(), toString(), and updateGreatestMz().
|
protected |
Definition at line 242 of file mzintegrationparams.h.
Referenced by MzIntegrationParams(), clone(), initialize(), initialize(), initialize(), isRemoveZeroValDataPoints(), reset(), setRemoveZeroValDataPoints(), toString(), and toString().
|
protected |
Definition at line 223 of file mzintegrationparams.h.
Referenced by MzIntegrationParams(), clone(), createArbitraryBins(), createDataBasedBins(), getSmallestMz(), hasValidMzRange(), initialize(), initialize(), isValid(), reset(), setSmallestMz(), toString(), and updateSmallestMz().
|
readwrite |
Definition at line 95 of file mzintegrationparams.h.
|
readwrite |
Definition at line 101 of file mzintegrationparams.h.
|
readwrite |
Definition at line 99 of file mzintegrationparams.h.
|
readwrite |
Definition at line 97 of file mzintegrationparams.h.
|
readwrite |
Definition at line 94 of file mzintegrationparams.h.
|
read |
Definition at line 103 of file mzintegrationparams.h.
|
readwrite |
Definition at line 91 of file mzintegrationparams.h.