Loading...
Searching...
No Matches
pappso::TimsFramesMsRunReader Class Reference

`#include <timsframesmsrunreader.h>`

Inheritance diagram for pappso::TimsFramesMsRunReader:

## Public Member Functions

| TimsFramesMsRunReader (MsRunIdCstSPtr &msrun_id_csp)
virtual | ~TimsFramesMsRunReader ()
virtual MassSpectrumSPtr | massSpectrumSPtr (std::size_t spectrum_index) override
| get a MassSpectrumSPtr class given its spectrum index
virtual MassSpectrumCstSPtr | massSpectrumCstSPtr (std::size_t spectrum_index) override
virtual QualifiedMassSpectrum | qualifiedMassSpectrum (std::size_t spectrum_index, bool want_binary_data=true) const override
| get a QualifiedMassSpectrum class given its scan number
virtual void | readSpectrumCollection (SpectrumCollectionHandlerInterface &handler) override
| function to visit an MsRunReader and get each Spectrum in a spectrum collection handler
virtual void | readSpectrumCollection2 (const MsRunReadConfig &config, SpectrumCollectionHandlerInterface &handler) override
virtual void | readSpectrumCollectionByMsLevel (SpectrumCollectionHandlerInterface &handler, unsigned int ms_level) override
| function to visit an MsRunReader and get each Spectrum in a spectrum collection handler by Ms Levels
virtual pappso::XicCoordSPtr | newXicCoordSPtrFromSpectrumIndex (std::size_t spectrum_index, pappso::PrecisionPtr precision) const override
| get a xic coordinate object from a given spectrum index
virtual pappso::XicCoordSPtr | newXicCoordSPtrFromQualifiedMassSpectrum (const pappso::QualifiedMassSpectrum &mass_spectrum, pappso::PrecisionPtr precision) const override
| get a xic coordinate object from a given spectrum
virtual std::size_t | spectrumListSize () const override
| get the totat number of spectrum conained in the MSrun data file
virtual bool | hasScanNumbers () const override
| tells if spectra can be accessed using scan numbers by default, it returns false. Only overrided functions can check if scan numbers are available in the current file
virtual bool | releaseDevice () override
| release data back end device if a the data back end is released, the developper has to use acquireDevice before using the msrunreader object
virtual bool | acquireDevice () override
| acquire data back end device
virtual TimsDataSp | getTimsDataSPtr ()
| give an access to the underlying raw data pointer
virtual Trace | getTicChromatogram () override
| get a TIC chromatogram
virtual Trace | computeTicChromatogram ()
Public Member Functions inherited from pappso::MsRunReader
| MsRunReader (MsRunIdCstSPtr &ms_run_id)
| MsRunReader (const MsRunReader &other)
virtual | ~MsRunReader ()
const MsRunIdCstSPtr & | getMsRunId () const
virtual std::size_t | scanNumber2SpectrumIndex (std::size_t scan_number)
| if possible, converts a scan number into a spectrum index This is a convenient function to help transition from the old scan number (not implemented by all vendors) to more secure spectrum index (not vendor dependant). It is better to not rely on this function.
virtual std::vector< double > | getRetentionTimeLine ()
| retention timeline get retention times along the MSrun in seconds
void | setMonoThread (bool is_mono_thread)
| set only one is_mono_thread to true
bool | isMonoThread () const

## Protected Member Functions

virtual void | initialize () override
virtual bool | accept (const QString &file_name) const override
| tells if the reader is able to handle this file must be implemented by private MS run reader, specific of one or more file format

## Private Attributes

TimsDataSp | msp_timsData = nullptr

## Friends

class | MsFileAccessor

## Additional Inherited Members

Protected Attributes inherited from pappso::MsRunReader
MsRunIdCstSPtr | mcsp_msRunId
MsRunReaderScanNumberMultiMap * | mpa_multiMapScanNumber = nullptr

## Detailed Description

Definition at line 43 of file timsframesmsrunreader.h.

## Constructor & Destructor Documentation

## TimsFramesMsRunReader()

TimsFramesMsRunReader::TimsFramesMsRunReader | ( | MsRunIdCstSPtr & | msrun_id_csp | ) |

Todo:
  write docs

Definition at line 34 of file timsframesmsrunreader.cpp.

: MsRunReader(msrun_id_csp)
{
qDebug() << "Now initializing the TimsFramesMsRunReader.";
initialize();
}
pappso::MsRunReader
base class to read MSrun the only way to build a MsRunReader object is to use the MsRunReaderFactory
Definition msrunreader.h:63
pappso::TimsFramesMsRunReader::initialize
virtual void initialize() override
Definition timsframesmsrunreader.cpp:48

References initialize().

## ~TimsFramesMsRunReader()

TimsFramesMsRunReader::~TimsFramesMsRunReader | ( |  | ) |

virtual

Definition at line 42 of file timsframesmsrunreader.cpp.

{
msp_timsData = nullptr;
}
pappso::TimsFramesMsRunReader::msp_timsData
TimsDataSp msp_timsData
Definition timsframesmsrunreader.h:103

References msp_timsData.

## Member Function Documentation

## accept()

bool TimsFramesMsRunReader::accept | ( | const QString & | file_name | ) | const

override protected virtual

tells if the reader is able to handle this file must be implemented by private MS run reader, specific of one or more file format

Implements pappso::MsRunReader.

Definition at line 62 of file timsframesmsrunreader.cpp.

{
qDebug() << file_name;
return true;
}

## acquireDevice()

bool TimsFramesMsRunReader::acquireDevice | ( |  | ) |

override virtual

acquire data back end device

Returns
  bool true if done

Implements pappso::MsRunReader.

Definition at line 422 of file timsframesmsrunreader.cpp.

{
if(msp_timsData == nullptr)
{
initialize();
}
return true;
}

References initialize(), and msp_timsData.

Referenced by getTicChromatogram(), and getTimsDataSPtr().

## computeTicChromatogram()

Trace TimsFramesMsRunReader::computeTicChromatogram | ( |  | ) |

virtual

Definition at line 475 of file timsframesmsrunreader.cpp.

{
// We want to compute the TIC chromatogram, not load the chromatogram that
// is located in the SQL database.
//
// For this, we need to iterated into the frames and ask for MS1 spectra
// only. msp_timsData has that information:
//
// std::vector<FrameIdDescr> m_frameIdDescrList;
//
// and
// struct FrameIdDescr
// {
// std::size_t m_frameId; // frame id
// std::size_t m_size; // frame size (number of TOF scans in frame)
// std::size_t m_cumulSize; // cumulative size
// };
Trace tic_chromatogram;
const std::vector<FrameIdDescr> frame_descr_list =
msp_timsData->getFrameIdDescrList();
for(FrameIdDescr frame_id_descr : frame_descr_list)
{
TimsFrameCstSPtr tims_frame_csp =
msp_timsData->getTimsFrameCstSPtrCached(frame_id_descr.m_frameId);
std::size_t scan_begin = 0;
std::size_t scan_end = tims_frame_csp->getTotalNumberOfScans() - 1;
// By convention, a TIC chromatogram is only performed using MS1
// spectra.
if(tims_frame_csp->getMsLevel() == 1)
{
// Retention times are in seconds in the Bruker world.
double rt = tims_frame_csp->getTime();
tic_chromatogram.append(DataPoint(
rt,
tims_frame_csp->cumulateScansIntensities(scan_begin, scan_end)));
}
else
continue;
}
return tic_chromatogram;
}
pappso::Trace
A simple container of DataPoint instances.
Definition trace.h:148
pappso::Trace::append
size_t append(const DataPoint &data_point)
appends a datapoint and return new size
Definition trace.cpp:648
pappso::DataKind::rt
@ rt
Retention time.
pappso::TimsFrameCstSPtr
std::shared_ptr< const TimsFrame > TimsFrameCstSPtr
Definition timsframe.h:42
pappso::DataPoint
Definition datapoint.h:22
pappso::FrameIdDescr
Definition timsdata.h:54

References pappso::Trace::append(), msp_timsData, and pappso::rt.

## getTicChromatogram()

Trace TimsFramesMsRunReader::getTicChromatogram | ( |  | ) |

override virtual

get a TIC chromatogram

for each retention time, computes the sum of all intensities. For IM-MS, combines the mobility spectra

Note that, formally, a TIC chromatogram is computed only for MS1 spectra.

Returns
  a trace (x=rt, y=intensities)

Reimplemented from pappso::MsRunReader.

Definition at line 463 of file timsframesmsrunreader.cpp.

{
// Use the Sqlite database to fetch the total ion current chromatogram (TIC
// chromatogram).
acquireDevice();
return msp_timsData->getTicChromatogram();
}
pappso::TimsFramesMsRunReader::acquireDevice
virtual bool acquireDevice() override
acquire data back end device
Definition timsframesmsrunreader.cpp:422

References acquireDevice(), and msp_timsData.

## getTimsDataSPtr()

TimsDataSp TimsFramesMsRunReader::getTimsDataSPtr | ( |  | ) |

virtual

give an access to the underlying raw data pointer

Definition at line 455 of file timsframesmsrunreader.cpp.

{
acquireDevice();
return msp_timsData;
}

References acquireDevice(), and msp_timsData.

## hasScanNumbers()

bool TimsFramesMsRunReader::hasScanNumbers | ( |  | ) | const

override virtual

tells if spectra can be accessed using scan numbers by default, it returns false. Only overrided functions can check if scan numbers are available in the current file

Reimplemented from pappso::MsRunReader.

Definition at line 408 of file timsframesmsrunreader.cpp.

{
return false;
}

## initialize()

void TimsFramesMsRunReader::initialize | ( |  | ) |

override protected virtual

Implements pappso::MsRunReader.

Definition at line 48 of file timsframesmsrunreader.cpp.

{
msp_timsData = std::make_shared<TimsData>(mcsp_msRunId.get()->getFileName());
if(msp_timsData == nullptr)
{
throw PappsoException(
QObject::tr("ERROR in TimsFramesMsRunReader::initialize "
"msp_timsData is null for MsRunId %1")
.arg(mcsp_msRunId.get()->toString()));
}
}
pappso::MsRunReader::mcsp_msRunId
MsRunIdCstSPtr mcsp_msRunId
Definition msrunreader.h:175
pappso::PappsoException
Definition pappsoexception.h:42

References pappso::MsRunReader::mcsp_msRunId, and msp_timsData.

Referenced by TimsFramesMsRunReader(), and acquireDevice().

## massSpectrumCstSPtr()

pappso::MassSpectrumCstSPtr TimsFramesMsRunReader::massSpectrumCstSPtr | ( | std::size_t | spectrum_index | ) |

override virtual

Implements pappso::MsRunReader.

Definition at line 82 of file timsframesmsrunreader.cpp.

{
return msp_timsData->getMassSpectrumCstSPtrByRawIndex(spectrum_index);
}

References msp_timsData.

## massSpectrumSPtr()

pappso::MassSpectrumSPtr TimsFramesMsRunReader::massSpectrumSPtr | ( | std::size_t | spectrum_index | ) |

override virtual

get a MassSpectrumSPtr class given its spectrum index

Implements pappso::MsRunReader.

Definition at line 70 of file timsframesmsrunreader.cpp.

{
throw ExceptionNotImplemented(
QObject::tr("Not yet implemented in TimsFramesMsRunReader %1.\n")
.arg(__LINE__));
return pappso::MassSpectrumSPtr();
}
pappso::ExceptionNotImplemented
Definition exceptionnotimplemented.h:32
pappso::MassSpectrumSPtr
std::shared_ptr< MassSpectrum > MassSpectrumSPtr
Definition massspectrum.h:56

## newXicCoordSPtrFromQualifiedMassSpectrum()

XicCoordSPtr TimsFramesMsRunReader::newXicCoordSPtrFromQualifiedMassSpectrum | ( | const pappso::QualifiedMassSpectrum & | mass_spectrum,
|  | pappso::PrecisionPtr | precision
| ) |  | const

override virtual

get a xic coordinate object from a given spectrum

Implements pappso::MsRunReader.

Definition at line 444 of file timsframesmsrunreader.cpp.

{
throw ExceptionNotImplemented(QObject::tr("Not implemented %1 %2 %3")
.arg(__FILE__)
.arg(__FUNCTION__)
.arg(__LINE__));
}

## newXicCoordSPtrFromSpectrumIndex()

XicCoordSPtr TimsFramesMsRunReader::newXicCoordSPtrFromSpectrumIndex | ( | std::size_t | spectrum_index,
|  | pappso::PrecisionPtr | precision
| ) |  | const

override virtual

get a xic coordinate object from a given spectrum index

Implements pappso::MsRunReader.

Definition at line 433 of file timsframesmsrunreader.cpp.

{
throw ExceptionNotImplemented(QObject::tr("Not implemented %1 %2 %3")
.arg(__FILE__)
.arg(__FUNCTION__)
.arg(__LINE__));
}

## qualifiedMassSpectrum()

QualifiedMassSpectrum TimsFramesMsRunReader::qualifiedMassSpectrum | ( | std::size_t | spectrum_index,
|  | bool | want_binary_data = `true`
| ) |  | const

override virtual

get a QualifiedMassSpectrum class given its scan number

Implements pappso::MsRunReader.

Definition at line 89 of file timsframesmsrunreader.cpp.

{
QualifiedMassSpectrum mass_spectrum;
msp_timsData->getQualifiedMassSpectrumByRawIndex(
getMsRunId(), mass_spectrum, spectrum_index, want_binary_data);
return mass_spectrum;
}
pappso::MsRunReader::getMsRunId
const MsRunIdCstSPtr & getMsRunId() const
Definition msrunreader.cpp:56
pappso::QualifiedMassSpectrum
Class representing a fully specified mass spectrum.
Definition qualifiedmassspectrum.h:93

References pappso::MsRunReader::getMsRunId(), and msp_timsData.

## readSpectrumCollection()

void TimsFramesMsRunReader::readSpectrumCollection | ( | SpectrumCollectionHandlerInterface & | handler | ) |

override virtual

function to visit an MsRunReader and get each Spectrum in a spectrum collection handler

Implements pappso::MsRunReader.

Definition at line 102 of file timsframesmsrunreader.cpp.

{
qDebug() << "Reading the spectrum collection with no specific configuration.";
MsRunReadConfig config;
readSpectrumCollection2(config, handler);
}
pappso::MsRunReadConfig
Definition msrunreadconfig.h:52
pappso::TimsFramesMsRunReader::readSpectrumCollection2
virtual void readSpectrumCollection2(const MsRunReadConfig &config, SpectrumCollectionHandlerInterface &handler) override
Definition timsframesmsrunreader.cpp:112

References readSpectrumCollection2().

## readSpectrumCollection2()

void TimsFramesMsRunReader::readSpectrumCollection2 | ( | const MsRunReadConfig & | config,
|  | SpectrumCollectionHandlerInterface & | handler
| ) |  |

override virtual

Implements pappso::MsRunReader.

Definition at line 112 of file timsframesmsrunreader.cpp.

{
qDebug().noquote() << "20231129 Reading the spectrum collection with this "
"specific configuration:"
<< config.toString();
// We want to restrict the data reading process to the configuration provided
// as parameter.
// The frame record subset will include all frames fulfiling the config
// requirements (retention time and ms levels)
std::vector<std::size_t> subset_of_tims_frame_ids;
// The very first sorting of frames is perfomed on the basis of the
// retention time range that the user might have defined. Otherwise, all the
// frames are deemed suitable for next processing steps.
// Then, the MS level is checked against the config provided by the user.
for(auto const &frame_record : msp_timsData->getTimsFrameRecordList())
{
if(frame_record.frame_id == 0)
continue;
if(config.acceptRetentionTimeInSeconds(frame_record.frame_time))
{
std::size_t ms_level = 2;
if(frame_record.msms_type == 0)
ms_level = 1;
if(config.acceptMsLevel(ms_level))
{
subset_of_tims_frame_ids.push_back(frame_record.frame_id);
}
}
}
// At this point, we have a subset of frame records.
std::size_t frames_count = subset_of_tims_frame_ids.size();
qDebug() << "The number of retained RT range-matching frames:"
<< frames_count;
// Inform the handler of the spectrum list so that it can handle feedback to
// the user.
handler.spectrumListHasSize(frames_count);
// Check for ion mobility range :
bool asked_ion_mobility_range = false;
quint32 mobility_scan_num_begin = 0;
quint32 mobility_scan_num_end = 0;
if(!config
.getParameterValue(
MsRunReadConfigParameter::TimsFramesMsRunReader_mobility_index_begin)
.isNull())
{
asked_ion_mobility_range = true;
mobility_scan_num_begin =
config
.getParameterValue(MsRunReadConfigParameter::
TimsFramesMsRunReader_mobility_index_begin)
.toUInt();
mobility_scan_num_end =
config
.getParameterValue(
MsRunReadConfigParameter::TimsFramesMsRunReader_mobility_index_end)
.toUInt();
}
// Check for m/z resolution downgrading
std::size_t mz_index_merge_window = 0;
if(!config
.getParameterValue(
MsRunReadConfigParameter::TimsFramesMsRunReader_mz_index_merge_window)
.isNull())
{
mz_index_merge_window =
config
.getParameterValue(MsRunReadConfigParameter::
TimsFramesMsRunReader_mz_index_merge_window)
.toUInt();
}
// Check for m/z range selection
bool asked_mz_range = false;
double mz_range_begin = -1;
double mz_range_end = -1;
if(!config
.getParameterValue(
MsRunReadConfigParameter::TimsFramesMsRunReader_mz_begin)
.isNull())
{
asked_mz_range = true;
mz_range_begin =
config
.getParameterValue(
MsRunReadConfigParameter::TimsFramesMsRunReader_mz_begin)
.toDouble();
mz_range_end = config
.getParameterValue(
MsRunReadConfigParameter::TimsFramesMsRunReader_mz_end)
.toDouble();
qDebug() << "The m/z range asked is: " << mz_range_begin << "--"
<< mz_range_end;
}
// Now that we have gathered all the configuration bits from the user,
// iterate in the vector of frames records and for each frame ask that
// all its scans be combined into a single mass spectrum, by taking into
// account the configuration bits provided by the user.
const std::vector<FrameIdDescr> &frame_id_descr_list =
msp_timsData->getFrameIdDescrList();
// The scan index is the index of the scan in the *whole* mass data file, it
// is a sequential number of scans over all the frames.
std::size_t scan_index = 0; // iterate in each spectrum
for(std::size_t tims_frame_id : subset_of_tims_frame_ids)
{
const FrameIdDescr &current_frame_record =
frame_id_descr_list[tims_frame_id];
scan_index = current_frame_record.m_cumulSize;
TimsFrameCstSPtr tims_frame_csp =
msp_timsData->getTimsFrameCstSPtrCached(tims_frame_id);
// If the user wants to select specific 1/Ko values, we need to
// compute the ion mobility scan value starting from that 1/Ko value in
// each frame.
if(!config
.getParameterValue(
MsRunReadConfigParameter::
TimsFramesMsRunReader_mobility_one_over_k0_begin)
.isNull())
{
asked_ion_mobility_range = true;
mobility_scan_num_begin =
tims_frame_csp.get()->getScanNumFromOneOverK0(
config
.getParameterValue(
MsRunReadConfigParameter::
TimsFramesMsRunReader_mobility_one_over_k0_begin)
.toDouble());
mobility_scan_num_end = tims_frame_csp.get()->getScanNumFromOneOverK0(
config
.getParameterValue(
MsRunReadConfigParameter::
TimsFramesMsRunReader_mobility_one_over_k0_end)
.toDouble());
}
// Get to know the size of the frame, that is,
// the number of mobility scans in it.
quint32 mobility_scans_count = tims_frame_csp->getTotalNumberOfScans();
// Provide these two variables for the function below to fill in the
// values.
quint32 min_mz_index_out = 0;
quint32 max_mz_index_out = 0;
Trace spectrum;
if(config.needPeakList())
{
if(asked_ion_mobility_range)
{
if(mobility_scan_num_end > (mobility_scans_count - 1))
{
mobility_scan_num_end = mobility_scans_count - 1;
}
}
else
{
mobility_scan_num_begin = 0;
mobility_scan_num_end = mobility_scans_count - 1;
}
if(asked_mz_range)
{
spectrum = tims_frame_csp->cumulateScansToTraceMzDownResolution2(
mz_index_merge_window,
mz_range_begin,
mz_range_end,
mobility_scan_num_begin,
mobility_scan_num_end,
min_mz_index_out,
max_mz_index_out);
}
else
{
spectrum = tims_frame_csp->cumulateScansToTraceMzDownResolution(
mz_index_merge_window,
mobility_scan_num_begin,
mobility_scan_num_end,
min_mz_index_out,
max_mz_index_out);
}
}
// qDebug() << "Got min_mz_index_out:" << min_mz_index_out;
// qDebug() << "Got max_mz_index_out:" << max_mz_index_out;
// Now, with or without the peak list, we have to craft a qualified mass
// spectrum that will hold all the data about the data in it.
QualifiedMassSpectrum mass_spectrum;
MassSpectrumId spectrum_id;
spectrum_id.setSpectrumIndex(tims_frame_id);
spectrum_id.setMsRunId(getMsRunId());
// Can be modified to add bits that might help our case
spectrum_id.setNativeId(
QString("frame id=%1 scan index=%2 im_begin=%3 im_end=%4")
.arg(tims_frame_id)
.arg(scan_index)
.arg(mobility_scan_num_begin)
.arg(mobility_scan_num_end));
mass_spectrum.setMassSpectrumId(spectrum_id);
// We want to document the retention time!
mass_spectrum.setRtInSeconds(tims_frame_csp.get()->getTime());
// We do want to document the ms level of the spectrum and possibly
// the precursor's m/z and charge.
unsigned int frame_ms_level = tims_frame_csp.get()->getMsLevel();
mass_spectrum.setMsLevel(frame_ms_level);
// We cannot set this value because the inverse mobility (1/Ko) measured
// by Bruker does not correspond formally to a drift time.
mass_spectrum.setDtInMilliSeconds(-1);
mass_spectrum.setParameterValue(
QualifiedMassSpectrumParameter::TimsFrameScansCount,
(qlonglong)tims_frame_csp->getTotalNumberOfScans());
mass_spectrum.setParameterValue(
QualifiedMassSpectrumParameter::TimsFrameInvKoBegin,
tims_frame_csp->getOneOverK0Transformation(0));
mass_spectrum.setParameterValue(
QualifiedMassSpectrumParameter::TimsFrameInvKoEnd,
tims_frame_csp->getOneOverK0Transformation(
tims_frame_csp->getTotalNumberOfScans() - 1));
// qDebug() << "Setting mass spectrum parameter value mz index begin to:"
// << min_mz_index_out;
mass_spectrum.setParameterValue(
QualifiedMassSpectrumParameter::TimsFrameMzIndexBegin,
min_mz_index_out);
// qDebug() << "Setting mass spectrum parameter value mz index end to:"
// << max_mz_index_out;
mass_spectrum.setParameterValue(
QualifiedMassSpectrumParameter::TimsFrameMzIndexEnd, max_mz_index_out);
if(config.needPeakList())
{
mass_spectrum.setEmptyMassSpectrum(false);
mass_spectrum.setMassSpectrumSPtr(
std::make_shared<MassSpectrum>(spectrum));
}
else
{
mass_spectrum.setEmptyMassSpectrum(true);
}
handler.setQualifiedMassSpectrum(mass_spectrum);
}
}
pappso::MassSpectrumId
Definition massspectrumid.h:40
pappso::MassSpectrumId::setNativeId
void setNativeId(const QString &native_id)
Definition massspectrumid.cpp:92
pappso::MassSpectrumId::setMsRunId
void setMsRunId(MsRunIdCstSPtr other)
Definition massspectrumid.cpp:77
pappso::MassSpectrumId::setSpectrumIndex
void setSpectrumIndex(std::size_t index)
Definition massspectrumid.cpp:106
pappso::MsRunReadConfig::needPeakList
bool needPeakList() const
Definition msrunreadconfig.cpp:170
pappso::MsRunReadConfig::toString
QString toString() const
Definition msrunreadconfig.cpp:230
pappso::MsRunReadConfig::getParameterValue
const QVariant getParameterValue(MsRunReadConfigParameter parameter) const
Definition msrunreadconfig.cpp:196
pappso::MsRunReadConfig::acceptMsLevel
bool acceptMsLevel(std::size_t ms_level) const
Definition msrunreadconfig.cpp:135
pappso::MsRunReadConfig::acceptRetentionTimeInSeconds
bool acceptRetentionTimeInSeconds(double retention_time_in_seconds) const
Definition msrunreadconfig.cpp:144
pappso::QualifiedMassSpectrum::setDtInMilliSeconds
void setDtInMilliSeconds(pappso_double rt)
Set the drift time in milliseconds.
Definition qualifiedmassspectrum.cpp:219
pappso::QualifiedMassSpectrum::setMassSpectrumId
void setMassSpectrumId(const MassSpectrumId &iD)
Set the MassSpectrumId.
Definition qualifiedmassspectrum.cpp:149
pappso::QualifiedMassSpectrum::setMsLevel
void setMsLevel(uint ms_level)
Set the mass spectrum level.
Definition qualifiedmassspectrum.cpp:179
pappso::QualifiedMassSpectrum::setParameterValue
void setParameterValue(QualifiedMassSpectrumParameter parameter, const QVariant &value)
Definition qualifiedmassspectrum.cpp:482
pappso::QualifiedMassSpectrum::setMassSpectrumSPtr
void setMassSpectrumSPtr(MassSpectrumSPtr massSpectrum)
Set the MassSpectrumSPtr.
Definition qualifiedmassspectrum.cpp:125
pappso::QualifiedMassSpectrum::setRtInSeconds
void setRtInSeconds(pappso_double rt)
Set the retention time in seconds.
Definition qualifiedmassspectrum.cpp:195
pappso::QualifiedMassSpectrum::setEmptyMassSpectrum
void setEmptyMassSpectrum(bool is_empty_mass_spectrum)
Definition qualifiedmassspectrum.cpp:164
pappso::SpectrumCollectionHandlerInterface::spectrumListHasSize
virtual void spectrumListHasSize(std::size_t size)
Definition spectrumcollectionhandlerinterface.cpp:47
pappso::SpectrumCollectionHandlerInterface::setQualifiedMassSpectrum
virtual void setQualifiedMassSpectrum(const QualifiedMassSpectrum &spectrum)=0
pappso::QualifiedMassSpectrumParameter::TimsFrameInvKoBegin
@ TimsFrameInvKoBegin
Bruker's Tims tof 1/K0 frame start range.
pappso::QualifiedMassSpectrumParameter::TimsFrameMzIndexBegin
@ TimsFrameMzIndexBegin
Bruker's Tims tof mz index frame start range.
pappso::QualifiedMassSpectrumParameter::TimsFrameScansCount
@ TimsFrameScansCount
pappso::QualifiedMassSpectrumParameter::TimsFrameMzIndexEnd
@ TimsFrameMzIndexEnd
Bruker's Tims tof mz index frame end range.
pappso::QualifiedMassSpectrumParameter::TimsFrameInvKoEnd
@ TimsFrameInvKoEnd
Bruker's Tims tof 1/K0 frame end range.
pappso::MsRunReadConfigParameter
MsRunReadConfigParameter
Definition msrunreadconfig.h:37
pappso::MsRunReadConfigParameter::TimsFramesMsRunReader_mobility_index_end
@ TimsFramesMsRunReader_mobility_index_end
pappso::MsRunReadConfigParameter::TimsFramesMsRunReader_mz_end
@ TimsFramesMsRunReader_mz_end
pappso::MsRunReadConfigParameter::TimsFramesMsRunReader_mz_index_merge_window
@ TimsFramesMsRunReader_mz_index_merge_window
pappso::MsRunReadConfigParameter::TimsFramesMsRunReader_mobility_index_begin
@ TimsFramesMsRunReader_mobility_index_begin
pappso::MsRunReadConfigParameter::TimsFramesMsRunReader_mz_begin
@ TimsFramesMsRunReader_mz_begin
pappso::MsRunReadConfigParameter::TimsFramesMsRunReader_mobility_one_over_k0_begin
@ TimsFramesMsRunReader_mobility_one_over_k0_begin
pappso::MsRunReadConfigParameter::TimsFramesMsRunReader_mobility_one_over_k0_end
@ TimsFramesMsRunReader_mobility_one_over_k0_end
pappso::FrameIdDescr::m_cumulSize
std::size_t m_cumulSize
Definition timsdata.h:57

References pappso::MsRunReadConfig::acceptMsLevel(), pappso::MsRunReadConfig::acceptRetentionTimeInSeconds(), pappso::MsRunReader::getMsRunId(), pappso::MsRunReadConfig::getParameterValue(), pappso::FrameIdDescr::m_cumulSize, msp_timsData, pappso::MsRunReadConfig::needPeakList(), pappso::QualifiedMassSpectrum::setDtInMilliSeconds(), pappso::QualifiedMassSpectrum::setEmptyMassSpectrum(), pappso::QualifiedMassSpectrum::setMassSpectrumId(), pappso::QualifiedMassSpectrum::setMassSpectrumSPtr(), pappso::QualifiedMassSpectrum::setMsLevel(), pappso::MassSpectrumId::setMsRunId(), pappso::MassSpectrumId::setNativeId(), pappso::QualifiedMassSpectrum::setParameterValue(), pappso::SpectrumCollectionHandlerInterface::setQualifiedMassSpectrum(), pappso::QualifiedMassSpectrum::setRtInSeconds(), pappso::MassSpectrumId::setSpectrumIndex(), pappso::SpectrumCollectionHandlerInterface::spectrumListHasSize(), pappso::TimsFrameInvKoBegin, pappso::TimsFrameInvKoEnd, pappso::TimsFrameMzIndexBegin, pappso::TimsFrameMzIndexEnd, pappso::TimsFrameScansCount, pappso::TimsFramesMsRunReader_mobility_index_begin, pappso::TimsFramesMsRunReader_mobility_index_end, pappso::TimsFramesMsRunReader_mobility_one_over_k0_begin, pappso::TimsFramesMsRunReader_mobility_one_over_k0_end, pappso::TimsFramesMsRunReader_mz_begin, pappso::TimsFramesMsRunReader_mz_end, pappso::TimsFramesMsRunReader_mz_index_merge_window, and pappso::MsRunReadConfig::toString().

Referenced by readSpectrumCollection().

## readSpectrumCollectionByMsLevel()

void TimsFramesMsRunReader::readSpectrumCollectionByMsLevel | ( | SpectrumCollectionHandlerInterface & | handler,
|  | unsigned int | ms_level
| ) |  |

override virtual

function to visit an MsRunReader and get each Spectrum in a spectrum collection handler by Ms Levels

Implements pappso::MsRunReader.

Definition at line 392 of file timsframesmsrunreader.cpp.

{
qDebug();
}

## releaseDevice()

bool TimsFramesMsRunReader::releaseDevice | ( |  | ) |

override virtual

release data back end device if a the data back end is released, the developper has to use acquireDevice before using the msrunreader object

Returns
  bool true if done

Implements pappso::MsRunReader.

Definition at line 415 of file timsframesmsrunreader.cpp.

{
msp_timsData = nullptr;
return true;
}

References msp_timsData.

## spectrumListSize()

std::size_t TimsFramesMsRunReader::spectrumListSize | ( |  | ) | const

override virtual

get the totat number of spectrum conained in the MSrun data file

Implements pappso::MsRunReader.

Definition at line 401 of file timsframesmsrunreader.cpp.

{
return msp_timsData->getTotalNumberOfScans();
}

References msp_timsData.

## Friends And Related Symbol Documentation

## MsFileAccessor

friend class MsFileAccessor

friend

Definition at line 45 of file timsframesmsrunreader.h.

## Member Data Documentation

## msp_timsData

TimsDataSp pappso::TimsFramesMsRunReader::msp_timsData = nullptr

private

Definition at line 103 of file timsframesmsrunreader.h.

Referenced by ~TimsFramesMsRunReader(), acquireDevice(), computeTicChromatogram(), getTicChromatogram(), getTimsDataSPtr(), initialize(), massSpectrumCstSPtr(), qualifiedMassSpectrum(), readSpectrumCollection2(), releaseDevice(), and spectrumListSize().

The documentation for this class was generated from the following files:

- pappsomspp/msrun/private/timsframesmsrunreader.h
- pappsomspp/msrun/private/timsframesmsrunreader.cpp