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
| function to visit an MsRunReader and get each Spectrum in a spectrum collection handler
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 std::size_t | spectrumListSize () const override
| get the totat number of spectrum conained in the MSrun data file
virtual Trace | computeTicChromatogram ()
virtual std::size_t | spectrumStringIdentifier2SpectrumIndex (const QString &spectrum_identifier) override
| if possible, get the spectrum index given a string identifier throw a not found exception if spectrum identifier is not found
Public Member Functions inherited from pappso::TimsMsRunReaderBase
| TimsMsRunReaderBase (MsRunIdCstSPtr &msrun_id_csp)
| TimsMsRunReaderBase (const TimsMsRunReaderBase &msrun_reader_base)
virtual | ~TimsMsRunReaderBase ()
virtual TimsDataSp | getTimsDataSPtr ()
| give an access to the underlying raw data pointer
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 Trace | getTicChromatogram () override
| get a TIC chromatogram
virtual std::vector< double > | getRetentionTimeLine () override
| retention timeline get retention times along the MSrun in seconds
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 const OboPsiModTerm | getOboPsiModTermInstrumentModelName () const override
| get OboPsiModTerm corresponding to the instrument model name child of : [Term] id: MS:1000031 name: instrument model def: "Instrument model name not including the vendor's name." [PSI:MS] relationship: part_of MS:1000463 ! instrument
Public Member Functions inherited from pappso::MsRunReader
| MsRunReader (const 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.
void | setMonoThread (bool is_mono_thread)
| set only one is_mono_thread to true
bool | isMonoThread () const

## Friends

class | MsFileAccessor

## Additional Inherited Members

Protected Member Functions inherited from pappso::TimsMsRunReaderBase
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
Protected Attributes inherited from pappso::TimsMsRunReaderBase
TimsDataSp | msp_timsData = nullptr
Protected Attributes inherited from pappso::MsRunReader
MsRunIdCstSPtr | mcsp_msRunId
MsRunReaderScanNumberMultiMap * | mpa_multiMapScanNumber = nullptr

## Detailed Description

Definition at line 42 of file timsframesmsrunreader.h.

## Constructor & Destructor Documentation

## TimsFramesMsRunReader()

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

Todo
  write docs

Definition at line 37 of file timsframesmsrunreader.cpp.

: TimsMsRunReaderBase(msrun_id_csp)
{
}
pappso::TimsMsRunReaderBase::TimsMsRunReaderBase
TimsMsRunReaderBase(MsRunIdCstSPtr &msrun_id_csp)
Definition timsmsrunreaderbase.cpp:38

References pappso::TimsMsRunReaderBase::TimsMsRunReaderBase().

Referenced by MsFileAccessor.

## ~TimsFramesMsRunReader()

TimsFramesMsRunReader::~TimsFramesMsRunReader | ( |  | ) |

virtual

Definition at line 42 of file timsframesmsrunreader.cpp.

{
msp_timsData = nullptr;
}
pappso::TimsMsRunReaderBase::msp_timsData
TimsDataSp msp_timsData
Definition timsmsrunreaderbase.h:87

References pappso::TimsMsRunReaderBase::msp_timsData.

## Member Function Documentation

## computeTicChromatogram()

Trace TimsFramesMsRunReader::computeTicChromatogram | ( |  | ) |

virtual

Definition at line 445 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->getRtInSeconds();
tic_chromatogram.append(
DataPoint(rt, tims_frame_csp->cumulateScanRangeIntensities(scan_begin, scan_end)));
}
else
continue;
}
return tic_chromatogram;
}
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:125
pappso::TimsFrameBase::getRtInSeconds
double getRtInSeconds() const
Definition timsframebase.cpp:269
pappso::TimsFrameBase::getMsLevel
unsigned int getMsLevel() const
Definition timsframebase.cpp:261
pappso::TimsFrame::cumulateScanRangeIntensities
virtual quint64 cumulateScanRangeIntensities(std::size_t scanNumBegin, std::size_t scanNumEnd) const override
...
Definition timsframe.cpp:252
pappso::Trace::append
size_t append(const DataPoint &data_point)
appends a datapoint and return new size
Definition trace.cpp:657
pappso::Enums::DataKind::rt
@ rt
Retention time.
Definition types.h:251
pappso::TimsFrameCstSPtr
std::shared_ptr< const TimsFrame > TimsFrameCstSPtr
Definition timsframe.h:44

References pappso::Trace::append(), pappso::TimsFrame::cumulateScanRangeIntensities(), pappso::TimsFrameBase::getMsLevel(), pappso::TimsFrameBase::getRtInSeconds(), pappso::TimsFrameBase::getTotalNumberOfScans(), and pappso::TimsMsRunReaderBase::msp_timsData.

Referenced by MsFileAccessor.

## massSpectrumCstSPtr()

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

override virtual

Implements pappso::MsRunReader.

Definition at line 59 of file timsframesmsrunreader.cpp.

{
return msp_timsData->getMassSpectrumCstSPtrByGlobalScanIndex(spectrum_index);
}

References pappso::TimsMsRunReaderBase::msp_timsData.

Referenced by MsFileAccessor.

## 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 49 of file timsframesmsrunreader.cpp.

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

Referenced by MsFileAccessor.

## 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 66 of file timsframesmsrunreader.cpp.

{
QualifiedMassSpectrum mass_spectrum;
msp_timsData->getQualifiedMassSpectrumByGlobalScanIndex(
getMsRunId(), mass_spectrum, spectrum_index, want_binary_data);
return mass_spectrum;
}
pappso::MsRunReader::getMsRunId
const MsRunIdCstSPtr & getMsRunId() const
Definition msrunreader.cpp:55

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

Referenced by MsFileAccessor.

## 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 79 of file timsframesmsrunreader.cpp.

{
// qDebug() << "Reading the spectrum collection with no specific
// configuration.";
MsRunReadConfig config;
readSpectrumCollection2(config, handler);
}
pappso::TimsFramesMsRunReader::readSpectrumCollection2
virtual void readSpectrumCollection2(const MsRunReadConfig &config, SpectrumCollectionHandlerInterface &handler) override
function to visit an MsRunReader and get each Spectrum in a spectrum collection handler
Definition timsframesmsrunreader.cpp:89

References readSpectrumCollection2().

Referenced by MsFileAccessor.

## readSpectrumCollection2()

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

override virtual

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

Implements pappso::MsRunReader.

Definition at line 89 of file timsframesmsrunreader.cpp.

{
// qDebug().noquote() << "Reading the spectrum collection with this "
// "specific configuration:"
// << config.toString();
std::vector<std::size_t> subset_of_tims_frame_ids;
bool asked_ion_mobility_scan_num_range = false;
quint32 mobility_scan_num_range_begin = std::numeric_limits<quint32>::max();
quint32 mobility_scan_num_range_end = std::numeric_limits<quint32>::max();
quint32 mobility_scan_num_range_width = std::numeric_limits<quint32>::max();
double mobility_one_over_k0 = std::numeric_limits<double>::max();
double mobility_one_over_k0_range_begin = std::numeric_limits<double>::max();
double mobility_one_over_k0_range_end = std::numeric_limits<double>::max();
if(!config.getParameterValue(MsRunReadConfigParameter::TimsFrameIonMobScanIndexBegin).isNull() &&
!config.getParameterValue(MsRunReadConfigParameter::TimsFrameIonMobScanIndexEnd).isNull())
{
mobility_scan_num_range_begin =
config.getParameterValue(MsRunReadConfigParameter::TimsFrameIonMobScanIndexBegin).toUInt();
mobility_scan_num_range_end =
config.getParameterValue(MsRunReadConfigParameter::TimsFrameIonMobScanIndexEnd).toUInt();
// We need the range width below.
mobility_scan_num_range_width =
mobility_scan_num_range_end + 1 - mobility_scan_num_range_begin;
asked_ion_mobility_scan_num_range = true;
// Be sure to check in the frames loop below that the user might
// have asked for an ion mobility range but on the basis of the 1/K0 unit.
}
const std::vector<FrameIdDescr> &frame_id_descr_list = msp_timsData->getFrameIdDescrList();
// Just for the feedback to the user.
std::size_t scan_count = 0;
for(auto const &frame_record : msp_timsData->getTimsFrameRecordList())
{
if(handler.shouldStop())
{
// qDebug() << "The operation was cancelled. Breaking the loop.";
throw ExceptionInterrupted(QObject::tr("Reading timsTOF data cancelled by the user."));
}
if(frame_record.frame_id == 0)
continue;
if(!config.acceptRetentionTimeInSeconds(frame_record.frame_time))
continue;
std::size_t ms_level = 2;
if(frame_record.msms_type == 0)
ms_level = 1;
if(!config.acceptMsLevel(ms_level))
continue;
// FIXME: this might be the place where to actually get the list of
// precursors' m/z and charge values.
subset_of_tims_frame_ids.push_back(frame_record.frame_id);
if(mobility_scan_num_range_width != std::numeric_limits<int>::max())
{
scan_count += mobility_scan_num_range_width;
}
else
{
scan_count += frame_id_descr_list[frame_record.frame_id].m_scanCount;
}
}
// At this point, we have a subset of frame records.
std::size_t frame_count = subset_of_tims_frame_ids.size();
qDebug() << "The number of retained RT range- and MS level-matching frames : " << frame_count;
// Inform the handler of the spectrum list so that it can handle feedback to
// the user.
// FIXME:
// Either we document the number of frames (because we assume we will
// flatten them all)...
handler.spectrumListHasSize(frame_count);
// Or we document the number of actual scans because we might not flatten
// all the frames.
// handler.spectrumListHasSize(scan_count);
// 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::MzRangeBegin).isNull())
{
asked_mz_range = true;
mz_range_begin = config.getParameterValue(MsRunReadConfigParameter::MzRangeBegin).toDouble();
mz_range_end = config.getParameterValue(MsRunReadConfigParameter::MzRangeEnd).toDouble();
// qDebug() << "The m/z range asked is: " << mz_range_begin << "--"
// << mz_range_end;
}
// Check for m/z resolution downgrading
// The idea is that we merge a number of mz indices into a single index,
// which is essentially an increase of the m/z bin size, and therefore
// of the resolution/definition of the mass spectrum.
std::size_t mz_index_merge_window = 0;
if(!config.getParameterValue(MsRunReadConfigParameter::TimsFrameMzIndexMergeWindow).isNull())
{
mz_index_merge_window =
config.getParameterValue(MsRunReadConfigParameter::TimsFrameMzIndexMergeWindow).toUInt();
// qDebug() << "mz_index_merge_window=" << mz_index_merge_window;
}
// 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)
{
if(handler.shouldStop())
{
// qDebug() << "The operation was cancelled. Breaking the loop.";
throw ExceptionInterrupted(QObject::tr("Reading timsTOF data cancelled by the user."));
}
// qDebug() << "tims_frame_id=" << tims_frame_id;
const FrameIdDescr &current_frame_record = frame_id_descr_list[tims_frame_id];
// qDebug() << "tims_frame_id=" << tims_frame_id;
// FIXME: from an outsider point of view, cumulated size does not
// convey the notion of sequential scan number.
scan_index = current_frame_record.m_globalScanIndex;
TimsFrameCstSPtr tims_frame_csp = msp_timsData->getTimsFrameCstSPtrCached(tims_frame_id);
// If the user wants to select 1/Ko values in a given range, we need to
// compute the ion mobility scan value starting from that 1/Ko value in
// *each* frame. Note that the computed mobility_scan_num_begin and
// mobility_scan_num_end would override thoses possibly set with
// TimsFramesMsRunReader_mobility_index_begin/end above.
if(!config.getParameterValue(MsRunReadConfigParameter::TimsFrameIonMobOneOverK0Begin)
.isNull() &&
!config.getParameterValue(MsRunReadConfigParameter::TimsFrameIonMobOneOverK0End).isNull())
{
mobility_one_over_k0_range_begin =
config.getParameterValue(MsRunReadConfigParameter::TimsFrameIonMobOneOverK0Begin)
.toDouble();
mobility_one_over_k0_range_end =
config.getParameterValue(MsRunReadConfigParameter::TimsFrameIonMobOneOverK0End)
.toDouble();
mobility_scan_num_range_begin =
tims_frame_csp.get()->getScanIndexFromOneOverK0(mobility_one_over_k0_range_begin);
mobility_scan_num_range_end =
tims_frame_csp.get()->getScanIndexFromOneOverK0(mobility_one_over_k0_range_end);
asked_ion_mobility_scan_num_range = true;
}
// Now that we know if the user has asked for an ion mobility range,
// either using scan indices or 1/K0 values, we need to double check the
// range borders.
quint32 count_of_mobility_scans = tims_frame_csp->getTotalNumberOfScans();
if(asked_ion_mobility_scan_num_range)
{
if(mobility_scan_num_range_end > (count_of_mobility_scans - 1))
{
mobility_scan_num_range_end = count_of_mobility_scans - 1;
}
}
else
{
mobility_scan_num_range_begin = 0;
mobility_scan_num_range_end = count_of_mobility_scans - 1;
}
// Now that we know the mobility index range, if we did not set the
// mobility one over K0 because that was not the unit used by
// the caller, then we can compute these values and set them
// later to the qualified mass spectrum parameters.
if(mobility_one_over_k0_range_begin == std::numeric_limits<double>::max())
mobility_one_over_k0_range_begin =
tims_frame_csp->getOneOverK0Transformation(mobility_scan_num_range_begin);
if(mobility_one_over_k0_range_end == std::numeric_limits<double>::max())
mobility_one_over_k0_range_end =
tims_frame_csp->getOneOverK0Transformation(mobility_scan_num_range_end);
mobility_scan_num_range_width =
mobility_scan_num_range_end + 1 - mobility_scan_num_range_begin;
// We want to provide the inverse mobility for the scan that sits in the
// middle of the defined range or the whole range if none is defined..
mobility_one_over_k0 = tims_frame_csp.get()->getScanIndexFromOneOverK0(
mobility_scan_num_range_begin + (mobility_scan_num_range_width / 2));
// 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 qualified_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 global_scan_index=%2 im_scan_range_begin=%3 "
"im_scan_range_end=%4")
.arg(tims_frame_id)
.arg(scan_index)
.arg(mobility_scan_num_range_begin)
.arg(mobility_scan_num_range_end));
qualified_mass_spectrum.setMassSpectrumId(spectrum_id);
// We want to document the retention time!
qualified_mass_spectrum.setRtInSeconds(tims_frame_csp.get()->getRtInSeconds());
// 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();
qualified_mass_spectrum.setMsLevel(frame_ms_level);
// Arrival time at half the range.
qualified_mass_spectrum.setDtInMilliSeconds(tims_frame_csp.get()->getDriftTimeInMilliseconds(
mobility_scan_num_range_begin + (mobility_scan_num_range_width / 2)));
// 1/K0
qDebug() << "mobility_one_over_k0:" << mobility_one_over_k0
<< "mobility_one_over_k0_range_begin:" << mobility_one_over_k0_range_begin
<< "mobility_one_over_k0_range_end" << mobility_one_over_k0_range_end;
if(mobility_one_over_k0 == std::numeric_limits<double>::max() ||
mobility_one_over_k0_range_begin == std::numeric_limits<double>::max() ||
mobility_one_over_k0_range_end == std::numeric_limits<double>::max())
throw(
ExceptionNotPossible("Not possible that mobility_one_over_k0 and its "
"range are undefined."));
qualified_mass_spectrum.setParameterValue(QualifiedMassSpectrumParameter::IonMobOneOverK0,
mobility_one_over_k0);
qualified_mass_spectrum.setParameterValue(
QualifiedMassSpectrumParameter::IonMobOneOverK0Begin, mobility_one_over_k0_range_begin);
qualified_mass_spectrum.setParameterValue(QualifiedMassSpectrumParameter::IonMobOneOverK0End,
mobility_one_over_k0_range_end);
// qDebug() << "mobility_scan_num_range_begin:"
// << mobility_scan_num_range_begin
// << "mobility_scan_num_range_end:" <<
// mobility_scan_num_range_end;
if(mobility_scan_num_range_begin == std::numeric_limits<quint32>::max() ||
mobility_scan_num_range_end == std::numeric_limits<quint32>::max())
throw(
ExceptionNotPossible("Not possible that mobility_scan_num_range values are undefined."));
qualified_mass_spectrum.setParameterValue(QualifiedMassSpectrumParameter::TimsIonMobScanIndex,
mobility_scan_num_range_begin +
(mobility_scan_num_range_width / 2));
qualified_mass_spectrum.setParameterValue(
QualifiedMassSpectrumParameter::TimsFrameIonMobScanIndexBegin,
mobility_scan_num_range_begin);
qualified_mass_spectrum.setParameterValue(
QualifiedMassSpectrumParameter::TimsFrameIonMobScanIndexEnd, mobility_scan_num_range_end);
qualified_mass_spectrum.setParameterValue(
QualifiedMassSpectrumParameter::TimsFrameScansCount,
static_cast<qlonglong>(tims_frame_csp->getTotalNumberOfScans()));
Trace trace;
if(config.needPeakList())
{
// Provide these two variables for the function below to fill in the
// values. We will need them later.
quint32 min_mz_index_out = 0;
quint32 max_mz_index_out = 0;
if(asked_mz_range)
{
trace = tims_frame_csp->combineScansToTraceWithDowngradedMzResolution2(
mz_index_merge_window,
mz_range_begin,
mz_range_end,
mobility_scan_num_range_begin,
mobility_scan_num_range_end,
min_mz_index_out,
max_mz_index_out);
}
else
{
trace = tims_frame_csp->combineScansToTraceWithDowngradedMzResolution(
mz_index_merge_window,
mobility_scan_num_range_begin,
mobility_scan_num_range_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;
qualified_mass_spectrum.setParameterValue(
QualifiedMassSpectrumParameter::TimsFrameMzIndexBegin, min_mz_index_out);
qualified_mass_spectrum.setParameterValue(
QualifiedMassSpectrumParameter::TimsFrameMzIndexEnd, max_mz_index_out);
qualified_mass_spectrum.setMassSpectrumSPtr(std::make_shared<MassSpectrum>(trace));
qualified_mass_spectrum.setEmptyMassSpectrum(false);
}
else
{
qualified_mass_spectrum.setEmptyMassSpectrum(true);
}
handler.setQualifiedMassSpectrum(qualified_mass_spectrum);
}
}
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:167
pappso::MsRunReadConfig::getParameterValue
const QVariant getParameterValue(MsRunReadConfigParameter parameter) const
Definition msrunreadconfig.cpp:192
pappso::MsRunReadConfig::acceptMsLevel
bool acceptMsLevel(std::size_t ms_level) const
Definition msrunreadconfig.cpp:133
pappso::MsRunReadConfig::acceptRetentionTimeInSeconds
bool acceptRetentionTimeInSeconds(double retention_time_in_seconds) const
Definition msrunreadconfig.cpp:142
pappso::QualifiedMassSpectrum::setDtInMilliSeconds
void setDtInMilliSeconds(pappso_double rt)
Set the drift time in milliseconds.
Definition qualifiedmassspectrum.cpp:221
pappso::QualifiedMassSpectrum::setMassSpectrumId
void setMassSpectrumId(const MassSpectrumId &iD)
Set the MassSpectrumId.
Definition qualifiedmassspectrum.cpp:146
pappso::QualifiedMassSpectrum::setMsLevel
void setMsLevel(uint ms_level)
Set the mass spectrum level.
Definition qualifiedmassspectrum.cpp:181
pappso::QualifiedMassSpectrum::setParameterValue
void setParameterValue(QualifiedMassSpectrumParameter parameter, const QVariant &value)
Definition qualifiedmassspectrum.cpp:472
pappso::QualifiedMassSpectrum::setMassSpectrumSPtr
void setMassSpectrumSPtr(MassSpectrumSPtr massSpectrum)
Set the MassSpectrumSPtr.
Definition qualifiedmassspectrum.cpp:122
pappso::QualifiedMassSpectrum::setRtInSeconds
void setRtInSeconds(pappso_double rt)
Set the retention time in seconds.
Definition qualifiedmassspectrum.cpp:197
pappso::QualifiedMassSpectrum::setEmptyMassSpectrum
void setEmptyMassSpectrum(bool is_empty_mass_spectrum)
Definition qualifiedmassspectrum.cpp:166
pappso::SpectrumCollectionHandlerInterface::shouldStop
virtual bool shouldStop()
Definition spectrumcollectionhandlerinterface.cpp:38
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::TimsFrameBase::getDriftTimeInMilliseconds
double getDriftTimeInMilliseconds(std::size_t scan_index) const
get drift time of a scan number in milliseconds
Definition timsframebase.cpp:335
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:348
pappso::TimsFrameBase::getOneOverK0Transformation
double getOneOverK0Transformation(std::size_t scan_index) const
get 1/K0 value of a given scan (mobility value)
Definition timsframebase.cpp:341
pappso::TimsFrame::combineScansToTraceWithDowngradedMzResolution
virtual Trace combineScansToTraceWithDowngradedMzResolution(std::size_t mzindex_merge_window, std::size_t scanNumBegin, std::size_t scanNumEnd, quint32 &mz_minimum_index, quint32 &mz_maximum_index) const override
cumulate spectrum given a scan number range need the binary file The intensities are normalized with ...
Definition timsframe.cpp:425
pappso::TimsFrame::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 override
cumulate spectrum given a scan number range need the binary file The intensities are normalized with ...
Definition timsframe.cpp:525
pappso::QualifiedMassSpectrumParameter::TimsFrameIonMobScanIndexBegin
@ TimsFrameIonMobScanIndexBegin
Definition qualifiedmassspectrum.h:55
pappso::QualifiedMassSpectrumParameter::TimsIonMobScanIndex
@ TimsIonMobScanIndex
Definition qualifiedmassspectrum.h:54
pappso::QualifiedMassSpectrumParameter::TimsFrameIonMobScanIndexEnd
@ TimsFrameIonMobScanIndexEnd
Definition qualifiedmassspectrum.h:56
pappso::QualifiedMassSpectrumParameter::TimsFrameMzIndexBegin
@ TimsFrameMzIndexBegin
Bruker's timsTOF mz index frame start range.
Definition qualifiedmassspectrum.h:65
pappso::QualifiedMassSpectrumParameter::IonMobOneOverK0Begin
@ IonMobOneOverK0Begin
1/K0 range's begin value
Definition qualifiedmassspectrum.h:51
pappso::QualifiedMassSpectrumParameter::IonMobOneOverK0End
@ IonMobOneOverK0End
1/K0 range's end value
Definition qualifiedmassspectrum.h:52
pappso::QualifiedMassSpectrumParameter::TimsFrameScansCount
@ TimsFrameScansCount
Bruker's timsTOF frame's total ion mobility slots.
Definition qualifiedmassspectrum.h:63
pappso::QualifiedMassSpectrumParameter::TimsFrameMzIndexEnd
@ TimsFrameMzIndexEnd
Bruker's timsTOF mz index frame end range.
Definition qualifiedmassspectrum.h:66
pappso::QualifiedMassSpectrumParameter::IonMobOneOverK0
@ IonMobOneOverK0
1/kO value
Definition qualifiedmassspectrum.h:50
pappso::MsRunReadConfigParameter::MzRangeBegin
@ MzRangeBegin
Definition msrunreadconfig.h:49
pappso::MsRunReadConfigParameter::TimsFrameIonMobOneOverK0Begin
@ TimsFrameIonMobOneOverK0Begin
Definition msrunreadconfig.h:44
pappso::MsRunReadConfigParameter::TimsFrameIonMobOneOverK0End
@ TimsFrameIonMobOneOverK0End
Definition msrunreadconfig.h:45
pappso::MsRunReadConfigParameter::TimsFrameIonMobScanIndexBegin
@ TimsFrameIonMobScanIndexBegin
Definition msrunreadconfig.h:39
pappso::MsRunReadConfigParameter::TimsFrameMzIndexMergeWindow
@ TimsFrameMzIndexMergeWindow
Definition msrunreadconfig.h:54
pappso::MsRunReadConfigParameter::TimsFrameIonMobScanIndexEnd
@ TimsFrameIonMobScanIndexEnd
Definition msrunreadconfig.h:40
pappso::MsRunReadConfigParameter::MzRangeEnd
@ MzRangeEnd
Definition msrunreadconfig.h:50
pappso::FrameIdDescr::m_globalScanIndex
std::size_t m_globalScanIndex
Definition timsdata.h:61

References pappso::MsRunReadConfig::acceptMsLevel(), pappso::MsRunReadConfig::acceptRetentionTimeInSeconds(), pappso::TimsFrame::combineScansToTraceWithDowngradedMzResolution(), pappso::TimsFrame::combineScansToTraceWithDowngradedMzResolution2(), pappso::TimsFrameBase::getDriftTimeInMilliseconds(), pappso::TimsFrameBase::getMsLevel(), pappso::MsRunReader::getMsRunId(), pappso::TimsFrameBase::getOneOverK0Transformation(), pappso::MsRunReadConfig::getParameterValue(), pappso::TimsFrameBase::getRtInSeconds(), pappso::TimsFrameBase::getScanIndexFromOneOverK0(), pappso::TimsFrameBase::getTotalNumberOfScans(), pappso::IonMobOneOverK0, pappso::IonMobOneOverK0Begin, pappso::IonMobOneOverK0End, pappso::FrameIdDescr::m_globalScanIndex, pappso::TimsMsRunReaderBase::msp_timsData, pappso::MzRangeBegin, pappso::MzRangeEnd, 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::shouldStop(), pappso::SpectrumCollectionHandlerInterface::spectrumListHasSize(), pappso::TimsFrameIonMobOneOverK0Begin, pappso::TimsFrameIonMobOneOverK0End, pappso::TimsFrameIonMobScanIndexBegin, pappso::TimsFrameIonMobScanIndexEnd, pappso::TimsFrameMzIndexBegin, pappso::TimsFrameMzIndexEnd, pappso::TimsFrameMzIndexMergeWindow, pappso::TimsFrameScansCount, and pappso::TimsIonMobScanIndex.

Referenced by MsFileAccessor, and 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 429 of file timsframesmsrunreader.cpp.

{
qDebug();
}

Referenced by MsFileAccessor.

## 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 438 of file timsframesmsrunreader.cpp.

{
return msp_timsData->getTotalScanCount();
}

References pappso::TimsMsRunReaderBase::msp_timsData.

Referenced by MsFileAccessor.

## spectrumStringIdentifier2SpectrumIndex()

std::size_t TimsFramesMsRunReader::spectrumStringIdentifier2SpectrumIndex | ( | const QString & | spectrum_identifier | ) |

override virtual

if possible, get the spectrum index given a string identifier throw a not found exception if spectrum identifier is not found

Parameters

  spectrum_identifier | string identifier of a specific spectrum

Returns
  the spectrum index

Implements pappso::MsRunReader.

Definition at line 496 of file timsframesmsrunreader.cpp.

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

Referenced by MsFileAccessor.

## Friends And Related Symbol Documentation

## MsFileAccessor

friend class MsFileAccessor

friend

Definition at line 44 of file timsframesmsrunreader.h.

References TimsFramesMsRunReader(), computeTicChromatogram(), massSpectrumCstSPtr(), massSpectrumSPtr(), MsFileAccessor, qualifiedMassSpectrum(), readSpectrumCollection(), readSpectrumCollection2(), readSpectrumCollectionByMsLevel(), spectrumListSize(), and spectrumStringIdentifier2SpectrumIndex().

Referenced by MsFileAccessor.

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

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