libpappsomspp
Library for mass spectrometry
|
#include <timsframebase.h>
Public Member Functions | |
TimsFrameBase (std::size_t timsId, quint32 scanNum) | |
constructor for binary independant tims frame More... | |
TimsFrameBase (const TimsFrameBase &other) | |
~TimsFrameBase () | |
virtual bool | hasSameCalibrationData (const TimsFrameBase &other) const |
tells if 2 tims frame has the same calibration data Usefull to know if raw data can be handled between frames More... | |
virtual std::size_t | getNbrPeaks (std::size_t scanNum) const |
virtual MassSpectrumSPtr | getMassSpectrumSPtr (std::size_t scanNum) const |
virtual Trace | cumulateScanToTrace (std::size_t scanNumBegin, std::size_t scanNumEnd) const |
virtual void | cumulateScansInRawMap (std::map< quint32, quint32 > &rawSpectrum, std::size_t scanNumBegin, std::size_t scanNumEnd) const |
cumulate scan list into a trace into a raw spectrum map More... | |
bool | checkScanNum (std::size_t scanNum) const |
void | setAccumulationTime (double accumulation_time_ms) |
void | setMzCalibration (double temperature_correction, double digitizerTimebase, double digitizerDelay, double C0, double C1, double C2, double C3) |
void | setTimsCalibration (int tims_model_type, double C0, double C1, double C2, double C3, double C4, double C5, double C6, double C7, double C8, double C9) |
void | setTime (double time) |
void | setMsMsType (quint8 type) |
unsigned int | getMsLevel () const |
double | getTime () const |
std::size_t | getId () const |
double | getDriftTime (std::size_t scanNum) const |
get drift time of a scan number in milliseconds More... | |
double | getOneOverK0Transformation (std::size_t scanNum) const |
get 1/K0 value of a given scan (mobility value) More... | |
double | getMzFromTof (double tof) const |
get m/z from time of flight More... | |
quint32 | getRawIndexFromMz (double mz) const |
get raw index of a given m/z More... | |
std::size_t | getScanNumFromOneOverK0 (double one_over_k0) const |
get the scan number from a given 1/Ko mobility value More... | |
double | getVoltageTransformation (std::size_t scanNum) const |
double | getTofFromIndex (quint32 index) const |
get time of flight from raw index More... | |
double | getTofFromIndex (double index) const |
get time of flight from double index More... | |
pappso::Trace | getTraceFromCumulatedScans (std::map< quint32, quint32 > &accumulated_scans) const |
transform accumulation of raw scans into a real mass spectrum More... | |
pappso::Trace | getTraceFromCumulatedScansBuiltinCentroid (std::map< quint32, quint32 > &accumulated_scans) const |
transform accumulation of raw scans into a real mass spectrum with a simple centroid on raw integers More... | |
Protected Attributes | |
quint32 | m_scanNumber |
total number of scans contained in this frame More... | |
std::size_t | m_timsId |
Tims frame database id (the SQL identifier of this frame) More... | |
double | m_accumulationTime = 0 |
accumulation time in milliseconds More... | |
double | m_digitizerTimebase = 0 |
double | m_digitizerDelay = 0 |
std::vector< double > | m_mzCalibrationArr |
MZ calibration parameters. More... | |
quint8 | m_msMsType = 0 |
double | m_time = 0 |
retention time More... | |
double | m_timsDvStart = 0 |
double | m_timsSlope |
double | m_timsTtrans = 0 |
double | m_timsNdelay = 0 |
double | m_timsVmin = 0 |
double | m_timsVmax = 0 |
double | m_timsC6 = 0 |
double | m_timsC7 = 0 |
Definition at line 46 of file timsframebase.h.
pappso::TimsFrameBase::TimsFrameBase | ( | std::size_t | timsId, |
quint32 | scanNum | ||
) |
constructor for binary independant tims frame
timsId | tims frame identifier in the database |
scanNum | the total number of scans contained in this frame |
Definition at line 37 of file timsframebase.cpp.
References m_scanNumber, and m_timsId.
pappso::TimsFrameBase::TimsFrameBase | ( | const TimsFrameBase & | other | ) |
Copy constructor
other | TODO |
pappso::TimsFrameBase::~TimsFrameBase | ( | ) |
bool pappso::TimsFrameBase::checkScanNum | ( | std::size_t | scanNum | ) | const |
Definition at line 84 of file timsframebase.cpp.
References m_scanNumber.
Referenced by pappso::TimsFrame::getMassSpectrumSPtr(), pappso::TimsFrame::getNbrPeaks(), pappso::TimsFrame::getScanIndexList(), and pappso::TimsFrame::getScanIntensities().
|
virtual |
cumulate scan list into a trace into a raw spectrum map
rawSpectrum | simple map of integers to cumulate raw counts |
scanNumBegin | first scan to cumulate |
scanNumEnd | last scan to cumulate |
Reimplemented in pappso::TimsFrame.
Definition at line 124 of file timsframebase.cpp.
|
virtual |
Reimplemented in pappso::TimsFrame.
Definition at line 114 of file timsframebase.cpp.
double pappso::TimsFrameBase::getDriftTime | ( | std::size_t | scanNum | ) | const |
get drift time of a scan number in milliseconds
scanNum | the scan number |
Definition at line 369 of file timsframebase.cpp.
References m_accumulationTime, and m_scanNumber.
std::size_t pappso::TimsFrameBase::getId | ( | ) | const |
Definition at line 311 of file timsframebase.cpp.
References m_timsId.
|
virtual |
Reimplemented in pappso::TimsFrame.
Definition at line 106 of file timsframebase.cpp.
unsigned int pappso::TimsFrameBase::getMsLevel | ( | ) | const |
Definition at line 297 of file timsframebase.cpp.
References m_msMsType.
double pappso::TimsFrameBase::getMzFromTof | ( | double | tof | ) | const |
get m/z from time of flight
tof | time of flight |
Definition at line 149 of file timsframebase.cpp.
References m_mzCalibrationArr, and pappso::y.
Referenced by pappso::TimsFrame::cumulateScanToTrace(), pappso::TimsFrame::getMassSpectrumSPtr(), getTraceFromCumulatedScans(), and getTraceFromCumulatedScansBuiltinCentroid().
|
virtual |
Reimplemented in pappso::TimsFrame.
Definition at line 97 of file timsframebase.cpp.
double pappso::TimsFrameBase::getOneOverK0Transformation | ( | std::size_t | scanNum | ) | const |
get 1/K0 value of a given scan (mobility value)
scanNum | the scan number |
Definition at line 375 of file timsframebase.cpp.
References getVoltageTransformation(), m_timsC6, and m_timsC7.
quint32 pappso::TimsFrameBase::getRawIndexFromMz | ( | double | mz | ) | const |
get raw index of a given m/z
mz | the mass to transform |
Definition at line 257 of file timsframebase.cpp.
References m_digitizerDelay, m_digitizerTimebase, m_mzCalibrationArr, and pappso::unset.
Referenced by pappso::TimsFrame::XicComputeStructure::XicComputeStructure().
std::size_t pappso::TimsFrameBase::getScanNumFromOneOverK0 | ( | double | one_over_k0 | ) | const |
get the scan number from a given 1/Ko mobility value
one_over_k0 | the mobility value to tranform |
Definition at line 382 of file timsframebase.cpp.
References m_timsC6, m_timsC7, m_timsDvStart, m_timsNdelay, m_timsSlope, and m_timsTtrans.
double pappso::TimsFrameBase::getTime | ( | ) | const |
double pappso::TimsFrameBase::getTofFromIndex | ( | double | index | ) | const |
get time of flight from double index
Definition at line 137 of file timsframebase.cpp.
References m_digitizerDelay, and m_digitizerTimebase.
double pappso::TimsFrameBase::getTofFromIndex | ( | quint32 | index | ) | const |
get time of flight from raw index
index | digitizer x raw value |
Definition at line 143 of file timsframebase.cpp.
References m_digitizerDelay, and m_digitizerTimebase.
Referenced by pappso::TimsFrame::cumulateScanToTrace().
pappso::Trace pappso::TimsFrameBase::getTraceFromCumulatedScans | ( | std::map< quint32, quint32 > & | accumulated_scans | ) | const |
transform accumulation of raw scans into a real mass spectrum
Definition at line 409 of file timsframebase.cpp.
References getMzFromTof(), m_accumulationTime, m_digitizerDelay, and m_digitizerTimebase.
pappso::Trace pappso::TimsFrameBase::getTraceFromCumulatedScansBuiltinCentroid | ( | std::map< quint32, quint32 > & | accumulated_scans | ) | const |
transform accumulation of raw scans into a real mass spectrum with a simple centroid on raw integers
Definition at line 441 of file timsframebase.cpp.
References getMzFromTof(), m_accumulationTime, m_digitizerDelay, m_digitizerTimebase, pappso::Trace::sortX(), pappso::DataPoint::x, and pappso::DataPoint::y.
double pappso::TimsFrameBase::getVoltageTransformation | ( | std::size_t | scanNum | ) | const |
Definition at line 347 of file timsframebase.cpp.
References m_timsDvStart, m_timsNdelay, m_timsSlope, m_timsTtrans, m_timsVmax, and m_timsVmin.
Referenced by getOneOverK0Transformation().
|
virtual |
tells if 2 tims frame has the same calibration data Usefull to know if raw data can be handled between frames
Definition at line 394 of file timsframebase.cpp.
References m_timsC6, m_timsC7, m_timsDvStart, m_timsNdelay, m_timsSlope, m_timsTtrans, m_timsVmax, and m_timsVmin.
void pappso::TimsFrameBase::setAccumulationTime | ( | double | accumulation_time_ms | ) |
Definition at line 54 of file timsframebase.cpp.
References m_accumulationTime.
void pappso::TimsFrameBase::setMsMsType | ( | quint8 | type | ) |
Definition at line 289 of file timsframebase.cpp.
References m_msMsType.
void pappso::TimsFrameBase::setMzCalibration | ( | double | temperature_correction, |
double | digitizerTimebase, | ||
double | digitizerDelay, | ||
double | C0, | ||
double | C1, | ||
double | C2, | ||
double | C3 | ||
) |
Definition at line 61 of file timsframebase.cpp.
References m_digitizerDelay, m_digitizerTimebase, and m_mzCalibrationArr.
void pappso::TimsFrameBase::setTime | ( | double | time | ) |
void pappso::TimsFrameBase::setTimsCalibration | ( | int | tims_model_type, |
double | C0, | ||
double | C1, | ||
double | C2, | ||
double | C3, | ||
double | C4, | ||
double | C5, | ||
double | C6, | ||
double | C7, | ||
double | C8, | ||
double | C9 | ||
) |
Definition at line 316 of file timsframebase.cpp.
References m_timsC6, m_timsC7, m_timsDvStart, m_timsNdelay, m_timsSlope, m_timsTtrans, m_timsVmax, and m_timsVmin.
|
protected |
accumulation time in milliseconds
Definition at line 183 of file timsframebase.h.
Referenced by pappso::TimsFrame::cumulateScanToTrace(), getDriftTime(), pappso::TimsFrame::getMassSpectrumSPtr(), pappso::TimsFrame::getRawTraceSPtr(), getTraceFromCumulatedScans(), getTraceFromCumulatedScansBuiltinCentroid(), and setAccumulationTime().
|
protected |
Definition at line 186 of file timsframebase.h.
Referenced by pappso::TimsFrame::getMassSpectrumSPtr(), getRawIndexFromMz(), getTofFromIndex(), getTraceFromCumulatedScans(), getTraceFromCumulatedScansBuiltinCentroid(), and setMzCalibration().
|
protected |
Definition at line 185 of file timsframebase.h.
Referenced by pappso::TimsFrame::getMassSpectrumSPtr(), getRawIndexFromMz(), getTofFromIndex(), getTraceFromCumulatedScans(), getTraceFromCumulatedScansBuiltinCentroid(), and setMzCalibration().
|
protected |
Definition at line 192 of file timsframebase.h.
Referenced by getMsLevel(), and setMsMsType().
|
protected |
MZ calibration parameters.
Definition at line 190 of file timsframebase.h.
Referenced by getMzFromTof(), getRawIndexFromMz(), and setMzCalibration().
|
protected |
total number of scans contained in this frame
Definition at line 173 of file timsframebase.h.
Referenced by pappso::TimsFrame::TimsFrame(), TimsFrameBase(), checkScanNum(), getDriftTime(), and pappso::TimsFrame::getNbrPeaks().
|
protected |
retention time
Definition at line 196 of file timsframebase.h.
Referenced by pappso::TimsFrame::extractTimsXicListInRtRange(), getTime(), and setTime().
|
protected |
Definition at line 206 of file timsframebase.h.
Referenced by getOneOverK0Transformation(), getScanNumFromOneOverK0(), hasSameCalibrationData(), and setTimsCalibration().
|
protected |
Definition at line 207 of file timsframebase.h.
Referenced by getOneOverK0Transformation(), getScanNumFromOneOverK0(), hasSameCalibrationData(), and setTimsCalibration().
|
protected |
Definition at line 198 of file timsframebase.h.
Referenced by getScanNumFromOneOverK0(), getVoltageTransformation(), hasSameCalibrationData(), and setTimsCalibration().
|
protected |
Tims frame database id (the SQL identifier of this frame)
Definition at line 179 of file timsframebase.h.
Referenced by pappso::TimsFrame::TimsFrame(), TimsFrameBase(), and getId().
|
protected |
Definition at line 203 of file timsframebase.h.
Referenced by getScanNumFromOneOverK0(), getVoltageTransformation(), hasSameCalibrationData(), and setTimsCalibration().
|
protected |
Definition at line 199 of file timsframebase.h.
Referenced by getScanNumFromOneOverK0(), getVoltageTransformation(), hasSameCalibrationData(), and setTimsCalibration().
|
protected |
Definition at line 202 of file timsframebase.h.
Referenced by getScanNumFromOneOverK0(), getVoltageTransformation(), hasSameCalibrationData(), and setTimsCalibration().
|
protected |
Definition at line 205 of file timsframebase.h.
Referenced by getVoltageTransformation(), hasSameCalibrationData(), and setTimsCalibration().
|
protected |
Definition at line 204 of file timsframebase.h.
Referenced by getVoltageTransformation(), hasSameCalibrationData(), and setTimsCalibration().