libpappsomspp
Library for mass spectrometry
|
The MzIntegrationParams class provides the parameters definining how m/z ! More...
#include <mzintegrationparams.h>
Public Member Functions | |
Q_INVOKABLE | MzIntegrationParams () |
Q_INVOKABLE | MzIntegrationParams (pappso::pappso_double minMz, pappso::pappso_double maxMz, BinningType binningType, int decimalPlaces, pappso::PrecisionPtr precisionPtr, bool applyMzShift, pappso::pappso_double mzShift, bool removeZeroValDataPoints) |
Q_INVOKABLE | MzIntegrationParams (const MzIntegrationParams &other) |
virtual | ~MzIntegrationParams () |
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 | setPrecision (pappso::PrecisionPtr precisionPtr) |
Q_INVOKABLE pappso::PrecisionPtr | getPrecision () const |
Q_INVOKABLE void | setApplyMzShift (bool applyMzShift) |
Q_INVOKABLE bool | isApplyMzShift () const |
Q_INVOKABLE void | setMzShift (double value) |
Q_INVOKABLE double | getMzShift () 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=0, const QString &spacer=QString()) 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::NONE |
int | m_decimalPlaces = -1 |
pappso::PrecisionPtr | mp_precision |
bool | m_applyMzShift = false |
pappso::pappso_double | m_mzShift = 0 |
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 85 of file mzintegrationparams.h.
pappso::MzIntegrationParams::MzIntegrationParams | ( | ) |
Definition at line 73 of file mzintegrationparams.cpp.
References pappso::PrecisionFactory::getPpmInstance(), m_binningType, mp_precision, and pappso::NONE.
pappso::MzIntegrationParams::MzIntegrationParams | ( | pappso::pappso_double | minMz, |
pappso::pappso_double | maxMz, | ||
BinningType | binningType, | ||
int | decimalPlaces, | ||
pappso::PrecisionPtr | precisionPtr, | ||
bool | applyMzShift, | ||
pappso::pappso_double | mzShift, | ||
bool | removeZeroValDataPoints | ||
) |
Definition at line 80 of file mzintegrationparams.cpp.
References pappso::PrecisionFactory::getPpmInstance(), and mp_precision.
pappso::MzIntegrationParams::MzIntegrationParams | ( | const MzIntegrationParams & | other | ) |
Definition at line 102 of file mzintegrationparams.cpp.
References pappso::PrecisionFactory::getPpmInstance(), and mp_precision.
|
virtual |
Definition at line 117 of file mzintegrationparams.cpp.
|
private |
Definition at line 390 of file mzintegrationparams.cpp.
References pappso::PrecisionBase::delta(), m_decimalPlaces, m_greatestMz, m_smallestMz, mp_precision, and pappso::Utils::zeroDecimalsInValue().
Referenced by createBins().
std::vector< double > pappso::MzIntegrationParams::createBins | ( | ) |
Definition at line 330 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 359 of file mzintegrationparams.cpp.
References pappso::ARBITRARY, createArbitraryBins(), createDataBasedBins(), pappso::DATA_BASED, m_binningType, and pappso::NONE.
|
private |
Definition at line 551 of file mzintegrationparams.cpp.
References m_decimalPlaces, m_smallestMz, and pappso::MassSpectrum::sortMz().
Referenced by createBins().
BinningType pappso::MzIntegrationParams::getBinningType | ( | ) | const |
Definition at line 194 of file mzintegrationparams.cpp.
References m_binningType.
int pappso::MzIntegrationParams::getDecimalPlaces | ( | ) | const |
Definition at line 207 of file mzintegrationparams.cpp.
References m_decimalPlaces.
pappso::pappso_double pappso::MzIntegrationParams::getGreatestMz | ( | ) | const |
Definition at line 182 of file mzintegrationparams.cpp.
References m_greatestMz.
double pappso::MzIntegrationParams::getMzShift | ( | ) | const |
Definition at line 264 of file mzintegrationparams.cpp.
References m_mzShift.
pappso::PrecisionPtr pappso::MzIntegrationParams::getPrecision | ( | ) | const |
Definition at line 222 of file mzintegrationparams.cpp.
References mp_precision.
pappso::pappso_double pappso::MzIntegrationParams::getSmallestMz | ( | ) | const |
Definition at line 161 of file mzintegrationparams.cpp.
References m_smallestMz.
bool pappso::MzIntegrationParams::hasValidMzRange | ( | ) | const |
bool pappso::MzIntegrationParams::isApplyMzShift | ( | ) | const |
Definition at line 236 of file mzintegrationparams.cpp.
References m_applyMzShift.
bool pappso::MzIntegrationParams::isRemoveZeroValDataPoints | ( | ) | const |
Definition at line 250 of file mzintegrationparams.cpp.
References m_removeZeroValDataPoints.
bool pappso::MzIntegrationParams::isValid | ( | ) | const |
Definition at line 288 of file mzintegrationparams.cpp.
References m_binningType, m_greatestMz, m_smallestMz, mp_precision, and pappso::NONE.
MzIntegrationParams & pappso::MzIntegrationParams::operator= | ( | const MzIntegrationParams & | other | ) |
Definition at line 123 of file mzintegrationparams.cpp.
References pappso::PrecisionFactory::getPpmInstance(), m_applyMzShift, m_binningType, m_decimalPlaces, m_greatestMz, m_mzShift, m_removeZeroValDataPoints, m_smallestMz, and mp_precision.
void pappso::MzIntegrationParams::reset | ( | ) |
Reset the instance to default values.
Definition at line 272 of file mzintegrationparams.cpp.
References pappso::PrecisionFactory::getPpmInstance(), m_applyMzShift, m_binningType, m_greatestMz, m_mzShift, m_removeZeroValDataPoints, m_smallestMz, mp_precision, and pappso::NONE.
void pappso::MzIntegrationParams::setApplyMzShift | ( | bool | applyMzShift | ) |
Definition at line 229 of file mzintegrationparams.cpp.
References m_applyMzShift.
void pappso::MzIntegrationParams::setBinningType | ( | BinningType | binningType | ) |
Definition at line 188 of file mzintegrationparams.cpp.
References m_binningType.
void pappso::MzIntegrationParams::setDecimalPlaces | ( | int | decimal_places | ) |
Definition at line 200 of file mzintegrationparams.cpp.
References m_decimalPlaces.
void pappso::MzIntegrationParams::setGreatestMz | ( | pappso::pappso_double | value | ) |
Definition at line 168 of file mzintegrationparams.cpp.
References m_greatestMz.
void pappso::MzIntegrationParams::setMzShift | ( | double | value | ) |
Definition at line 257 of file mzintegrationparams.cpp.
References m_mzShift.
void pappso::MzIntegrationParams::setPrecision | ( | pappso::PrecisionPtr | precisionPtr | ) |
Definition at line 213 of file mzintegrationparams.cpp.
References pappso::PrecisionFactory::getDaltonInstance(), and mp_precision.
void pappso::MzIntegrationParams::setRemoveZeroValDataPoints | ( | bool | removeOrNot = true | ) |
Definition at line 243 of file mzintegrationparams.cpp.
References m_removeZeroValDataPoints.
void pappso::MzIntegrationParams::setSmallestMz | ( | pappso::pappso_double | value | ) |
Definition at line 147 of file mzintegrationparams.cpp.
References m_smallestMz.
QString pappso::MzIntegrationParams::toString | ( | int | offset = 0 , |
const QString & | spacer = QString() |
||
) | const |
Definition at line 666 of file mzintegrationparams.cpp.
References pappso::ARBITRARY, pappso::binningTypeMap, pappso::PrecisionBase::getNominal(), m_applyMzShift, m_binningType, m_decimalPlaces, m_greatestMz, m_mzShift, m_removeZeroValDataPoints, m_smallestMz, mp_precision, and pappso::PrecisionBase::toString().
void pappso::MzIntegrationParams::updateGreatestMz | ( | pappso::pappso_double | value | ) |
Definition at line 175 of file mzintegrationparams.cpp.
References m_greatestMz.
void pappso::MzIntegrationParams::updateSmallestMz | ( | pappso::pappso_double | value | ) |
Definition at line 154 of file mzintegrationparams.cpp.
References m_smallestMz.
|
private |
Definition at line 160 of file mzintegrationparams.h.
Referenced by isApplyMzShift(), operator=(), reset(), setApplyMzShift(), and toString().
|
private |
Definition at line 152 of file mzintegrationparams.h.
Referenced by MzIntegrationParams(), createBins(), getBinningType(), isValid(), operator=(), reset(), setBinningType(), and toString().
|
private |
Definition at line 154 of file mzintegrationparams.h.
Referenced by createArbitraryBins(), createDataBasedBins(), getDecimalPlaces(), operator=(), setDecimalPlaces(), and toString().
|
private |
Definition at line 150 of file mzintegrationparams.h.
Referenced by createArbitraryBins(), getGreatestMz(), hasValidMzRange(), isValid(), operator=(), reset(), setGreatestMz(), toString(), and updateGreatestMz().
|
private |
Definition at line 161 of file mzintegrationparams.h.
Referenced by getMzShift(), operator=(), reset(), setMzShift(), and toString().
|
private |
Definition at line 162 of file mzintegrationparams.h.
Referenced by isRemoveZeroValDataPoints(), operator=(), reset(), setRemoveZeroValDataPoints(), and toString().
|
private |
Definition at line 146 of file mzintegrationparams.h.
Referenced by createArbitraryBins(), createDataBasedBins(), getSmallestMz(), hasValidMzRange(), isValid(), operator=(), reset(), setSmallestMz(), toString(), and updateSmallestMz().
|
private |
Definition at line 158 of file mzintegrationparams.h.
Referenced by MzIntegrationParams(), createArbitraryBins(), getPrecision(), isValid(), operator=(), reset(), setPrecision(), and toString().