Loading...
Searching...
No Matches
timsframebase.cpp
Go to the documentation of this file.
/**
* \file pappsomspp/vendors/tims/timsframebase.cpp
* \date 16/12/2019
* \author Olivier Langella
* \brief handle a single Bruker's TimsTof frame without binary data
*/
/*******************************************************************************
* Copyright (c) 2019 Olivier Langella <Olivier.Langella@u-psud.fr>.
*
* This file is part of the PAPPSOms++ library.
*
* PAPPSOms++ is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* PAPPSOms++ is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with PAPPSOms++. If not, see <http://www.gnu.org/licenses/>.
*
******************************************************************************/
#include "timsframebase.h"
#include "../../../pappsomspp/pappsoexception.h"
#include "../../../pappsomspp/exception/exceptionoutofrange.h"
#include "mzcalibration/mzcalibrationmodel1.h"
#include <QDebug>
#include <QObject>
#include <cmath>
#include <algorithm>
namespace pappso
{
TimsFrameBase::TimsFrameBase(std::size_t frame_id, quint32 scanCount)
{
qDebug() << frame_id;
m_frameId = frame_id;
m_scanCount = scanCount;
}
TimsFrameBase::TimsFrameBase([[maybe_unused]] const TimsFrameBase &other)
{
}
TimsFrameBase::~TimsFrameBase()
{
}
void
TimsFrameBase::setAcqDurationInMilliseconds(double acquisition_duration_ms)
{
m_acqDurationInMilliseconds = acquisition_duration_ms;
}
void
TimsFrameBase::setMzCalibration(double T1_frame,
double T2_frame,
double digitizerTimebase,
double digitizerDelay,
double C0,
double C1,
double C2,
double C3,
double C4,
double T1_ref,
double T2_ref,
double dC1,
double dC2)
{
/* MzCalibrationModel1 mzCalibration(temperature_correction,
digitizerTimebase,
digitizerDelay,
C0,
C1,
C2,
C3,
C4);
*/
msp_mzCalibration = std::make_shared<MzCalibrationModel1>(T1_frame,
T2_frame,
digitizerTimebase,
digitizerDelay,
C0,
C1,
C2,
C3,
C4,
T1_ref,
T2_ref,
dC1,
dC2);
}
bool
TimsFrameBase::checkScanNum(std::size_t scanNum) const
{
if(scanNum >= m_scanCount)
{
throw pappso::ExceptionOutOfRange(
QObject::tr("Invalid scan number : scanNum %1 > m_scanNumber %2")
.arg(scanNum)
.arg(m_scanCount));
}
return true;
}
std::size_t
TimsFrameBase::getScanPeakCount(std::size_t scanNum) const
{
throw PappsoException(
QObject::tr(
"ERROR unable to get number of peaks in TimsFrameBase for scan number %1")
.arg(scanNum));
}
std::size_t
TimsFrameBase::getTotalNumberOfScans() const
{
return m_scanCount;
}
MassSpectrumSPtr
TimsFrameBase::getMassSpectrumSPtr(std::size_t scanNum) const
{
throw PappsoException(
QObject::tr(
"ERROR unable to getMassSpectrumSPtr in TimsFrameBase for scan number %1")
.arg(scanNum));
}
pappso::MassSpectrumCstSPtr
TimsFrameBase::getMassSpectrumCstSPtr(std::size_t scanNum) const
{
// qDebug();
return getMassSpectrumSPtr(scanNum);
}
Trace
TimsFrameBase::cumulateScansToTrace(std::size_t scanNumBegin,
std::size_t scanNumEnd) const
{
throw PappsoException(
QObject::tr("ERROR unable to cumulateScanToTrace in TimsFrameBase for scan "
"number begin %1 end %2")
.arg(scanNumBegin)
.arg(scanNumEnd));
}
Trace
TimsFrameBase::combineScansToTraceWithDowngradedMzResolution(
std::size_t mzindex_merge_window [[maybe_unused]],
std::size_t scanNumBegin [[maybe_unused]],
std::size_t scanNumEnd [[maybe_unused]],
quint32 &minimum_tof_index_out [[maybe_unused]],
quint32 &maximum_tof_index_out [[maybe_unused]]) const
{
throw PappsoException(QObject::tr("Non implemented function %1 %2 %3")
.arg(__FILE__)
.arg(__FUNCTION__)
.arg(__LINE__));
}
Trace
TimsFrameBase::combineScansToTraceWithDowngradedMzResolution2(
std::size_t mz_index_merge_window [[maybe_unused]],
double mz_range_begin [[maybe_unused]],
double mz_range_end [[maybe_unused]],
std::size_t mobility_scan_begin [[maybe_unused]],
std::size_t mobility_scan_end [[maybe_unused]],
quint32 &mz_minimum_index_out [[maybe_unused]],
quint32 &mz_maximum_index_out [[maybe_unused]]) const
{
throw PappsoException(QObject::tr("Non implemented function %1 %2 %3")
.arg(__FILE__)
.arg(__FUNCTION__)
.arg(__LINE__));
}
Trace
TimsFrameBase::getMobilityScan(std::size_t scanNum [[maybe_unused]],
std::size_t mz_index_merge_window
[[maybe_unused]],
double mz_range_begin [[maybe_unused]],
double mz_range_end [[maybe_unused]],
quint32 &mz_minimum_index_out [[maybe_unused]],
quint32 &mz_maximum_index_out
[[maybe_unused]]) const
{
throw PappsoException(QObject::tr("Non implemented function %1 %2 %3")
.arg(__FILE__)
.arg(__FUNCTION__)
.arg(__LINE__));
}
void
TimsFrameBase::combineScansInTofIndexIntensityMap(TimsDataFastMap &rawSpectrum
[[maybe_unused]],
std::size_t scanNumBegin,
std::size_t scanNumEnd) const
{
throw PappsoException(
QObject::tr(
"ERROR unable to cumulateScansInRawMap in TimsFrameBase for scan "
"number begin %1 end %2")
.arg(scanNumBegin)
.arg(scanNumEnd));
}
void
TimsFrameBase::combineScansInTofIndexIntensityMap(TimsDataFastMap &rawSpectrum
[[maybe_unused]],
std::size_t scanNumBegin,
std::size_t scanNumEnd,
quint32 tof_index_begin,
quint32 tof_index_end) const
{
throw PappsoException(
QObject::tr(
"ERROR unable to cumulateScansInRawMap in TimsFrameBase for scan "
"number begin %1 end %2, tof index begin %3, tof index end %4")
.arg(scanNumBegin)
.arg(scanNumEnd)
.arg(tof_index_begin)
.arg(tof_index_end));
}
quint64
TimsFrameBase::cumulateScanIntensities(std::size_t scanNum) const
{
throw PappsoException(
QObject::tr(
"ERROR unable to cumulateSingleScanIntensities in TimsFrameBase for scan "
"number %1.")
.arg(scanNum));
return 0;
}
quint64
TimsFrameBase::cumulateScanRangeIntensities(std::size_t scanNumBegin,
std::size_t scanNumEnd) const
{
throw PappsoException(
QObject::tr(
"ERROR unable to cumulateScansInRawMap in TimsFrameBase for scan "
"number begin %1 end %2")
.arg(scanNumBegin)
.arg(scanNumEnd));
return 0;
}
void
TimsFrameBase::setRtInSeconds(double time)
{
m_rtInSeconds = time;
}
void
TimsFrameBase::setMsMsType(quint8 type)
{
qDebug() << " m_msMsType=" << type;
m_msMsType = type;
}
unsigned int
TimsFrameBase::getMsLevel() const
{
if(m_msMsType == 0)
return 1;
return 2;
}
double
TimsFrameBase::getRtInSeconds() const
{
return m_rtInSeconds;
}
std::size_t
TimsFrameBase::getId() const
{
return m_frameId;
}
void
TimsFrameBase::setTimsCalibration(int tims_model_type,
double C0,
double C1,
double C2,
double C3,
double C4,
[[maybe_unused]] double C5,
double C6,
double C7,
double C8,
double C9)
{
if(tims_model_type != 2)
{
throw pappso::PappsoException(QObject::tr(
"ERROR in TimsFrame::setTimsCalibration tims_model_type != 2"));
}
m_timsDvStart = C2; // C2 from TimsCalibration
m_timsTtrans = C4; // C4 from TimsCalibration
m_timsNdelay = C0; // C0 from TimsCalibration
m_timsVmin = C8; // C8 from TimsCalibration
m_timsVmax = C9; // C9 from TimsCalibration
m_timsC6 = C6;
m_timsC7 = C7;
m_timsSlope =
(C3 - m_timsDvStart) / C1; // //C3 from TimsCalibration // C2 from
// TimsCalibration // C1 from TimsCalibration
}
double
TimsFrameBase::getVoltageTransformation(std::size_t scanNum) const
{
double v = m_timsDvStart +
m_timsSlope * ((double)scanNum - m_timsTtrans - m_timsNdelay);
if(v < m_timsVmin)
{
throw pappso::PappsoException(
QObject::tr("ERROR in TimsFrame::getVoltageTransformation invalid tims "
"calibration, v < m_timsVmin %1 < %2")
.arg(v)
.arg(m_timsVmin));
}
if(v > m_timsVmax)
{
throw pappso::PappsoException(
QObject::tr("ERROR in TimsFrame::getVoltageTransformation invalid tims "
"calibration, v > m_timsVmax %1 > %2")
.arg(v)
.arg(m_timsVmax));
}
return v;
}
double
TimsFrameBase::getDriftTimeInMilliseconds(std::size_t scanNum) const
{
return (m_acqDurationInMilliseconds / (double)m_scanCount) *
((double)scanNum);
}
double
TimsFrameBase::getOneOverK0Transformation(std::size_t scanNum) const
{
return 1 / (m_timsC6 + (m_timsC7 / getVoltageTransformation(scanNum)));
}
std::size_t
TimsFrameBase::getScanIndexFromOneOverK0(double one_over_k0) const
{
double temp = 1 / one_over_k0;
temp = temp - m_timsC6;
temp = temp / m_timsC7;
temp = 1 / temp;
temp = temp - m_timsDvStart;
temp = temp / m_timsSlope + m_timsTtrans + m_timsNdelay;
return (std::size_t)std::round(temp);
}
bool
TimsFrameBase::hasSameCalibrationData(const TimsFrameBase &other) const
{
if((m_timsDvStart == other.m_timsDvStart) &&
(m_timsTtrans == other.m_timsTtrans) &&
(m_timsNdelay == other.m_timsNdelay) && (m_timsVmin == other.m_timsVmin) &&
(m_timsVmax == other.m_timsVmax) && (m_timsC6 == other.m_timsC6) &&
(m_timsC7 == other.m_timsC7) && (m_timsSlope == other.m_timsSlope))
{
return true;
}
return false;
}
pappso::Trace
TimsFrameBase::getTraceFromTofIndexIntensityMap(
TimsDataFastMap &accumulated_scans) const
{
qDebug();
// qDebug();
// add flanking peaks
pappso::Trace local_trace;
MzCalibrationInterface *mz_calibration_p =
getMzCalibrationInterfaceSPtr().get();
DataPoint element;
for(quint32 tof_index : accumulated_scans.getTofIndexList())
{
// intensity normalization
element.y = ((double)accumulated_scans.readIntensity(tof_index)) * 100.0 /
m_acqDurationInMilliseconds;
// mz calibration
element.x = mz_calibration_p->getMzFromTofIndex(tof_index);
local_trace.push_back(element);
}
local_trace.sortX();
qDebug();
// qDebug();
return local_trace;
}
const MzCalibrationInterfaceSPtr &
TimsFrameBase::getMzCalibrationInterfaceSPtr() const
{
if(msp_mzCalibration == nullptr)
{
throw pappso::PappsoException(
QObject::tr("ERROR in %1, %2, %3 msp_mzCalibration is null")
.arg(__FILE__)
.arg(__FUNCTION__)
.arg(__LINE__));
}
return msp_mzCalibration;
}
void
TimsFrameBase::setMzCalibrationInterfaceSPtr(
MzCalibrationInterfaceSPtr mzCalibration)
{
if(mzCalibration == nullptr)
{
throw pappso::PappsoException(
QObject::tr("ERROR in %1, %2, %3 msp_mzCalibration is null")
.arg(__FILE__)
.arg(__FUNCTION__)
.arg(__LINE__));
}
msp_mzCalibration = mzCalibration;
}
quint32
TimsFrameBase::getMaximumRawMassIndex() const
{
quint32 max_value = 0;
for(quint32 i = 0; i < m_scanCount; i++)
{
qDebug() << "m_scanNumber=" << m_scanCount << " i=" << i;
std::vector<quint32> index_list = getScanTofIndexList(i);
auto it = std::max_element(index_list.begin(), index_list.end());
if(it != index_list.end())
{
max_value = std::max(max_value, *it);
}
}
return max_value;
}
std::vector<quint32>
TimsFrameBase::getScanTofIndexList(std::size_t scanNum) const
{
throw PappsoException(
QObject::tr(
"ERROR unable to getScanIndexList in TimsFrameBase for scan number %1")
.arg(scanNum));
}
std::vector<quint32>
TimsFrameBase::getScanIntensityList(std::size_t scanNum) const
{
throw PappsoException(
QObject::tr(
"ERROR unable to getScanIntensities in TimsFrameBase for scan number %1")
.arg(scanNum));
}
Trace
TimsFrameBase::getIonMobilityTraceByTofIndexRange(
std::size_t tof_index_begin,
std::size_t tof_index_end,
XicExtractMethod method,
std::size_t scan_index_begin,
std::size_t scan_index_end) const
{
Trace im_trace;
DataPoint data_point;
if(scan_index_end > m_scanCount)
scan_index_end = m_scanCount;
for(quint32 i = scan_index_begin; i < (scan_index_end + 1); i++)
{
data_point.x = i;
data_point.y = 0;
qDebug() << "m_scanNumber=" << m_scanCount << " i=" << i;
std::vector<quint32> index_list = getScanTofIndexList(i);
auto it_lower = std::find_if(index_list.begin(),
index_list.end(),
[tof_index_begin](quint32 to_compare) {
if(to_compare < tof_index_begin)
{
return false;
}
return true;
});
if(it_lower == index_list.end())
{
}
else
{
auto it_upper = std::find_if(index_list.begin(),
index_list.end(),
[tof_index_end](quint32 to_compare) {
if(tof_index_end >= to_compare)
{
return false;
}
return true;
});
std::vector<quint32> intensity_list = getScanIntensityList(i);
for(int j = std::distance(index_list.begin(), it_lower);
j < std::distance(index_list.begin(), it_upper);
j++)
{
if(method == XicExtractMethod::sum)
{
data_point.y += intensity_list[j];
}
else
{
data_point.y =
std::max((double)intensity_list[j], data_point.y);
}
}
}
im_trace.push_back(data_point);
}
qDebug();
return im_trace;
}
std::vector<TimsFrameBase::TofIndexIntensityPair> &
TimsFrameBase::downgradeResolutionOfTofIndexIntensityPairList(
std::size_t mzindex_merge_window,
std::vector<TimsFrameBase::TofIndexIntensityPair> &rawSpectrum) const
{
qDebug() << rawSpectrum.size();
std::vector<TimsFrameBase::TofIndexIntensityPair> new_spectrum;
TimsFrameBase::TofIndexIntensityPair current_point;
current_point.intensity_index = 0;
current_point.tof_index = 0;
for(auto &pair_mz_intensity : rawSpectrum)
{
quint32 mzkey = (pair_mz_intensity.tof_index / mzindex_merge_window);
mzkey = (mzkey * mzindex_merge_window) + (mzindex_merge_window / 2);
if(current_point.tof_index != mzkey)
{
if(current_point.tof_index > 0)
{
new_spectrum.push_back(current_point);
}
current_point.intensity_index = pair_mz_intensity.intensity_index;
current_point.tof_index = mzkey;
}
else
{
current_point.intensity_index += pair_mz_intensity.intensity_index;
}
}
if(current_point.tof_index > 0)
{
new_spectrum.push_back(current_point);
}
rawSpectrum = new_spectrum;
qDebug() << rawSpectrum.size();
return rawSpectrum;
}
// namespace pappso
} // namespace pappso
pappso::ExceptionOutOfRange
Definition exceptionoutofrange.h:32
pappso::MzCalibrationInterface
Definition mzcalibrationinterface.h:43
pappso::MzCalibrationInterface::getMzFromTofIndex
virtual double getMzFromTofIndex(quint32 tof_index)=0
get m/z from time of flight raw index
pappso::PappsoException
Definition pappsoexception.h:42
pappso::TimsDataFastMap
replacement for std::map
Definition timsdatafastmap.h:46
pappso::TimsDataFastMap::getTofIndexList
const std::vector< quint32 > & getTofIndexList() const
Definition timsdatafastmap.cpp:198
pappso::TimsDataFastMap::readIntensity
std::size_t readIntensity(quint32)
reads intensity for a tof_index
Definition timsdatafastmap.cpp:88
pappso::TimsFrameBase
Definition timsframebase.h:49
pappso::TimsFrameBase::m_rtInSeconds
double m_rtInSeconds
retention time
Definition timsframebase.h:399
pappso::TimsFrameBase::getVoltageTransformation
double getVoltageTransformation(std::size_t scanNum) const
get voltage for a given scan number
Definition timsframebase.cpp:330
pappso::TimsFrameBase::getTotalNumberOfScans
virtual std::size_t getTotalNumberOfScans() const
get the number of scans contained in this frame each scan represents an ion mobility slice
Definition timsframebase.cpp:126
pappso::TimsFrameBase::m_timsSlope
double m_timsSlope
Definition timsframebase.h:402
pappso::TimsFrameBase::getMassSpectrumCstSPtr
virtual pappso::MassSpectrumCstSPtr getMassSpectrumCstSPtr(std::size_t scan_index) const final
get the mass spectrum corresponding to a scan index
Definition timsframebase.cpp:142
pappso::TimsFrameBase::msp_mzCalibration
MzCalibrationInterfaceSPtr msp_mzCalibration
Definition timsframebase.h:412
pappso::TimsFrameBase::m_msMsType
quint8 m_msMsType
Definition timsframebase.h:395
pappso::TimsFrameBase::getScanPeakCount
virtual std::size_t getScanPeakCount(std::size_t scanIndex) const
get the number of peaks in this spectrum need the binary file
Definition timsframebase.cpp:117
pappso::TimsFrameBase::m_timsNdelay
double m_timsNdelay
Definition timsframebase.h:406
pappso::TimsFrameBase::getDriftTimeInMilliseconds
double getDriftTimeInMilliseconds(std::size_t scan_index) const
get drift time of a scan number in milliseconds
Definition timsframebase.cpp:356
pappso::TimsFrameBase::cumulateScansToTrace
virtual Trace cumulateScansToTrace(std::size_t scanIndexBegin, std::size_t scanIndexEnd) const
cumulate spectrum given a scan number range need the binary file The intensities are normalized with ...
Definition timsframebase.cpp:149
pappso::TimsFrameBase::getScanIndexFromOneOverK0
std::size_t getScanIndexFromOneOverK0(double one_over_k0) const
get the scan number from a given 1/Ko mobility value
Definition timsframebase.cpp:370
pappso::TimsFrameBase::hasSameCalibrationData
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 betwee...
Definition timsframebase.cpp:382
pappso::TimsFrameBase::combineScansToTraceWithDowngradedMzResolution
virtual Trace combineScansToTraceWithDowngradedMzResolution(std::size_t tof_index_merge_window, std::size_t scanIndexBegin, std::size_t scanIndexEnd, quint32 &minimum_tof_index_out, quint32 &maximum_tof_index_out) const
cumulate spectrum given a scan index range need the binary file The intensities are normalized with r...
Definition timsframebase.cpp:160
pappso::TimsFrameBase::getIonMobilityTraceByTofIndexRange
virtual Trace getIonMobilityTraceByTofIndexRange(std::size_t tof_index_begin, std::size_t tof_index_end, XicExtractMethod method, std::size_t scan_index_begin, std::size_t scan_index_end) const
get a mobility trace cumulating intensities inside the given mass index range
Definition timsframebase.cpp:498
pappso::TimsFrameBase::m_acqDurationInMilliseconds
double m_acqDurationInMilliseconds
acquisition duration in milliseconds
Definition timsframebase.h:393
pappso::TimsFrameBase::getRtInSeconds
double getRtInSeconds() const
Definition timsframebase.cpp:288
pappso::TimsFrameBase::m_timsVmax
double m_timsVmax
Definition timsframebase.h:408
pappso::TimsFrameBase::getMaximumRawMassIndex
virtual quint32 getMaximumRawMassIndex() const
get the maximum raw mass index contained in this frame
Definition timsframebase.cpp:462
pappso::TimsFrameBase::TimsFrameBase
TimsFrameBase(std::size_t frameId, quint32 scanCount)
constructor for binary independant tims frame
Definition timsframebase.cpp:39
pappso::TimsFrameBase::m_timsC6
double m_timsC6
Definition timsframebase.h:409
pappso::TimsFrameBase::getTraceFromTofIndexIntensityMap
pappso::Trace getTraceFromTofIndexIntensityMap(TimsDataFastMap &accumulated_scans) const
transform accumulation of raw scans into a real mass spectrum
Definition timsframebase.cpp:397
pappso::TimsFrameBase::combineScansToTraceWithDowngradedMzResolution2
virtual Trace combineScansToTraceWithDowngradedMzResolution2(std::size_t mz_index_merge_window, double mz_range_begin, double mz_range_end, std::size_t mobility_scan_begin, std::size_t mobility_scan_end, quint32 &mz_minimum_index_out, quint32 &mz_maximum_index_out) const
cumulate spectrum given a scan number range need the binary file The intensities are normalized with ...
Definition timsframebase.cpp:174
pappso::TimsFrameBase::m_timsTtrans
double m_timsTtrans
Definition timsframebase.h:405
pappso::TimsFrameBase::getMsLevel
unsigned int getMsLevel() const
Definition timsframebase.cpp:280
pappso::TimsFrameBase::setTimsCalibration
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)
Definition timsframebase.cpp:299
pappso::TimsFrameBase::getMassSpectrumSPtr
virtual MassSpectrumSPtr getMassSpectrumSPtr(std::size_t scan_index) const
get Mass spectrum with peaks for this scan index need the binary file
Definition timsframebase.cpp:132
pappso::TimsFrameBase::getMzCalibrationInterfaceSPtr
virtual const MzCalibrationInterfaceSPtr & getMzCalibrationInterfaceSPtr() const final
get the MzCalibration model to compute mz and TOF for this frame
Definition timsframebase.cpp:429
pappso::TimsFrameBase::cumulateScanRangeIntensities
virtual quint64 cumulateScanRangeIntensities(std::size_t scan_index_begin, std::size_t scan_index_end) const
Definition timsframebase.cpp:252
pappso::TimsFrameBase::m_timsC7
double m_timsC7
Definition timsframebase.h:410
pappso::TimsFrameBase::setRtInSeconds
void setRtInSeconds(double time)
Definition timsframebase.cpp:266
pappso::TimsFrameBase::getOneOverK0Transformation
double getOneOverK0Transformation(std::size_t scan_index) const
get 1/K0 value of a given scan (mobility value)
Definition timsframebase.cpp:363
pappso::TimsFrameBase::setMsMsType
void setMsMsType(quint8 type)
Definition timsframebase.cpp:272
pappso::TimsFrameBase::m_timsVmin
double m_timsVmin
Definition timsframebase.h:407
pappso::TimsFrameBase::m_timsDvStart
double m_timsDvStart
Definition timsframebase.h:401
pappso::TimsFrameBase::setMzCalibration
void setMzCalibration(double T1_frame, double T2_frame, double digitizerTimebase, double digitizerDelay, double C0, double C1, double C2, double C3, double C4, double T1_ref, double T2_ref, double dC1, double dC2)
Definition timsframebase.cpp:63
pappso::TimsFrameBase::m_scanCount
quint32 m_scanCount
total number of scans contained in this frame
Definition timsframebase.h:383
pappso::TimsFrameBase::~TimsFrameBase
virtual ~TimsFrameBase()
Definition timsframebase.cpp:51
pappso::TimsFrameBase::m_frameId
std::size_t m_frameId
Tims frame database id (the SQL identifier of this frame)
Definition timsframebase.h:389
pappso::TimsFrameBase::setAcqDurationInMilliseconds
void setAcqDurationInMilliseconds(double acquisition_duration_ms)
Definition timsframebase.cpp:56
pappso::TimsFrameBase::getMobilityScan
virtual Trace getMobilityScan(std::size_t scan_index, std::size_t tof_index_merge_window, double mz_range_begin, double mz_range_end, quint32 &mz_minimum_index_out, quint32 &mz_maximum_index_out) const
get a single mobility scan m/z + intensities
Definition timsframebase.cpp:190
pappso::TimsFrameBase::checkScanNum
bool checkScanNum(std::size_t scanNum) const
check that this scan number exists
Definition timsframebase.cpp:103
pappso::TimsFrameBase::combineScansInTofIndexIntensityMap
virtual void combineScansInTofIndexIntensityMap(TimsDataFastMap &tof_index_intensity_map, std::size_t scan_index_begin, std::size_t scan_index_end) const
cumulate scan list into a trace into a raw spectrum map The intensities are NOT normalized with respe...
Definition timsframebase.cpp:206
pappso::TimsFrameBase::setMzCalibrationInterfaceSPtr
void setMzCalibrationInterfaceSPtr(MzCalibrationInterfaceSPtr mzCalibration)
Definition timsframebase.cpp:444
pappso::TimsFrameBase::getScanTofIndexList
virtual std::vector< quint32 > getScanTofIndexList(std::size_t scan_index) const
get raw index list for one given scan index are not TOF nor m/z, just index on digitizer
Definition timsframebase.cpp:479
pappso::TimsFrameBase::getScanIntensityList
virtual std::vector< quint32 > getScanIntensityList(std::size_t scan_index) const
get raw intensities without transformation from one scan it needs intensity normalization
Definition timsframebase.cpp:489
pappso::TimsFrameBase::getId
std::size_t getId() const
Definition timsframebase.cpp:294
pappso::TimsFrameBase::cumulateScanIntensities
virtual quint64 cumulateScanIntensities(std::size_t scan_index) const
Definition timsframebase.cpp:239
pappso::Trace
A simple container of DataPoint instances.
Definition trace.h:148
pappso::Trace::sortX
void sortX(SortOrder sort_order=SortOrder::ascending)
Definition trace.cpp:1086
mzcalibrationmodel1.h
implement Bruker's model type 1 formula to compute m/z
pappso
tries to keep as much as possible monoisotopes, removing any possible C13 peaks and changes multichar...
Definition aa.cpp:39
pappso::MzCalibrationInterfaceSPtr
std::shared_ptr< MzCalibrationInterface > MzCalibrationInterfaceSPtr
Definition mzcalibrationinterface.h:38
pappso::MassSpectrumCstSPtr
std::shared_ptr< const MassSpectrum > MassSpectrumCstSPtr
Definition massspectrum.h:57
pappso::MassSpectrumSPtr
std::shared_ptr< MassSpectrum > MassSpectrumSPtr
Definition massspectrum.h:56
pappso::XicExtractMethod
XicExtractMethod
Definition types.h:247
pappso::XicExtractMethod::sum
@ sum
sum of intensities
pappso::DataPoint
Definition datapoint.h:22
pappso::DataPoint::x
pappso_double x
Definition datapoint.h:23
pappso::DataPoint::y
pappso_double y
Definition datapoint.h:24
pappso::TimsFrameBase::TofIndexIntensityPair
Definition timsframebase.h:355
pappso::TimsFrameBase::TofIndexIntensityPair::tof_index
quint32 tof_index
Definition timsframebase.h:356
pappso::TimsFrameBase::TofIndexIntensityPair::intensity_index
quint32 intensity_index
Definition timsframebase.h:357
timsframebase.h
handle a single Bruker's TimsTof frame without binary data