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

`#include <timsmsrunreaderms2.h>`

Inheritance diagram for pappso::TimsMsRunReaderMs2:

## Public Member Functions

| TimsMsRunReaderMs2 (MsRunIdCstSPtr &msrun_id_csp)
| TimsMsRunReaderMs2 (const TimsMsRunReaderBase &msrun_reader_base)
virtual | ~TimsMsRunReaderMs2 ()
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 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 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 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
void | setMs2FilterCstSPtr (pappso::FilterInterfaceCstSPtr filter)
void | setMs1FilterCstSPtr (pappso::FilterInterfaceCstSPtr filter)
void | setMs2BuiltinCentroid (bool centroid)
| enable or disable simple centroid filter on raw tims data for MS2
virtual std::vector< std::size_t > | getPrecursorsIDFromMzRt (int charge, double mz_val, double rt_sec, double k0)
| Get all the precursors id which match the values.
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 std::vector< double > | getRetentionTimeLine () override
| retention timeline get retention times along the MSrun in seconds
virtual Trace | getTicChromatogram () override
| get a TIC chromatogram
Public Member Functions inherited from pappso::TimsMsRunReaderBase
| TimsMsRunReaderBase (MsRunIdCstSPtr &msrun_id_csp)
| TimsMsRunReaderBase (const TimsMsRunReaderBase &msrun_reader_base)
virtual | ~TimsMsRunReaderBase ()
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

## 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

## Protected Attributes

TimsDdaPrecursors * | mp_timsDdaPrecursors = nullptr
Protected Attributes inherited from pappso::TimsMsRunReaderBase
TimsDataSp | msp_timsData = nullptr
Protected Attributes inherited from pappso::MsRunReader
MsRunIdCstSPtr | mcsp_msRunId
MsRunReaderScanNumberMultiMap * | mpa_multiMapScanNumber = nullptr

## Private Attributes

TimsDataSp | msp_timsData = nullptr
pappso::FilterInterfaceCstSPtr | msp_ms1Filter
pappso::FilterInterfaceCstSPtr | msp_ms2Filter
bool | m_builtinMs2Centroid = true
| enable builtin centroid on raw tims integers by default

## Friends

class | MsFileAccessor

## Detailed Description

Definition at line 38 of file timsmsrunreaderms2.h.

## Constructor & Destructor Documentation

## TimsMsRunReaderMs2() [1/2]

TimsMsRunReaderMs2::TimsMsRunReaderMs2 | ( | MsRunIdCstSPtr & | msrun_id_csp | ) |

Todo:
  write docs

Definition at line 38 of file timsmsrunreaderms2.cpp.

: TimsMsRunReaderBase(msrun_id_csp)
{
initialize();
}
pappso::TimsMsRunReaderBase
Definition timsmsrunreaderbase.h:38
pappso::TimsMsRunReaderMs2::initialize
virtual void initialize() override
Definition timsmsrunreaderms2.cpp:59

References initialize().

## TimsMsRunReaderMs2() [2/2]

TimsMsRunReaderMs2::TimsMsRunReaderMs2 | ( | const TimsMsRunReaderBase & | msrun_reader_base | ) |

Definition at line 44 of file timsmsrunreaderms2.cpp.

: TimsMsRunReaderBase(msrun_reader_base)
{
initialize();
}

References initialize().

## ~TimsMsRunReaderMs2()

TimsMsRunReaderMs2::~TimsMsRunReaderMs2 | ( |  | ) |

virtual

Definition at line 50 of file timsmsrunreaderms2.cpp.

{
if(msp_timsData != nullptr)
{
msp_timsData = nullptr;
}
}
pappso::TimsMsRunReaderMs2::msp_timsData
TimsDataSp msp_timsData
Definition timsmsrunreaderms2.h:118

References msp_timsData.

## Member Function Documentation

## accept()

bool TimsMsRunReaderMs2::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

Reimplemented from pappso::TimsMsRunReaderBase.

Reimplemented in pappso::TimsMsRunReaderMs2Selected.

Definition at line 125 of file timsmsrunreaderms2.cpp.

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

## acquireDevice()

bool TimsMsRunReaderMs2::acquireDevice | ( |  | ) |

override virtual

acquire data back end device

Returns
  bool true if done

Reimplemented from pappso::TimsMsRunReaderBase.

Definition at line 275 of file timsmsrunreaderms2.cpp.

{
if(msp_timsData == nullptr)
{
initialize();
mp_timsDdaPrecursors->setMs2BuiltinCentroid(m_builtinMs2Centroid);
mp_timsDdaPrecursors->setMs1FilterCstSPtr(msp_ms1Filter);
mp_timsDdaPrecursors->setMs2FilterCstSPtr(msp_ms2Filter);
}
return true;
}
pappso::TimsDdaPrecursors::setMs2BuiltinCentroid
void setMs2BuiltinCentroid(bool centroid)
enable or disable simple centroid filter on raw tims data for MS2
Definition timsddaprecursors.cpp:929
pappso::TimsDdaPrecursors::setMs2FilterCstSPtr
void setMs2FilterCstSPtr(pappso::FilterInterfaceCstSPtr &filter)
filter interface to apply just after raw MS2 specturm extraction the filter can be a list of filters ...
Definition timsddaprecursors.cpp:706
pappso::TimsDdaPrecursors::setMs1FilterCstSPtr
void setMs1FilterCstSPtr(pappso::FilterInterfaceCstSPtr &filter)
filter interface to apply just after raw MS1 specturm extraction the filter can be a list of filters ...
Definition timsddaprecursors.cpp:711
pappso::TimsMsRunReaderMs2::msp_ms2Filter
pappso::FilterInterfaceCstSPtr msp_ms2Filter
Definition timsmsrunreaderms2.h:121
pappso::TimsMsRunReaderMs2::mp_timsDdaPrecursors
TimsDdaPrecursors * mp_timsDdaPrecursors
Definition timsmsrunreaderms2.h:115
pappso::TimsMsRunReaderMs2::msp_ms1Filter
pappso::FilterInterfaceCstSPtr msp_ms1Filter
Definition timsmsrunreaderms2.h:120
pappso::TimsMsRunReaderMs2::m_builtinMs2Centroid
bool m_builtinMs2Centroid
enable builtin centroid on raw tims integers by default
Definition timsmsrunreaderms2.h:124

References initialize(), m_builtinMs2Centroid, mp_timsDdaPrecursors, msp_ms1Filter, msp_ms2Filter, msp_timsData, pappso::TimsDdaPrecursors::setMs1FilterCstSPtr(), pappso::TimsDdaPrecursors::setMs2BuiltinCentroid(), and pappso::TimsDdaPrecursors::setMs2FilterCstSPtr().

Referenced by getTicChromatogram().

## getPrecursorsIDFromMzRt()

std::vector< std::size_t > pappso::TimsMsRunReaderMs2::getPrecursorsIDFromMzRt | ( | int | charge,
|  | double | mz_val,
|  | double | rt_sec,
|  | double | k0
| ) |  |

virtual

Get all the precursors id which match the values.

Returns
  list of precursors Ids

Definition at line 288 of file timsmsrunreaderms2.cpp.

{
return mp_timsDdaPrecursors->getPrecursorsByMzRtCharge(
charge, mz_val, rt_sec, k0);
}
pappso::TimsDdaPrecursors::getPrecursorsByMzRtCharge
std::vector< std::size_t > getPrecursorsByMzRtCharge(int charge, double mz_val, double rt_sec, double k0)
guess possible precursor ids given a charge, m/z, retention time and k0
Definition timsddaprecursors.cpp:1463

## getRetentionTimeLine()

std::vector< double > pappso::TimsMsRunReaderMs2::getRetentionTimeLine | ( |  | ) |

override virtual

retention timeline get retention times along the MSrun in seconds

Returns
  vector of retention times (seconds)

Reimplemented from pappso::TimsMsRunReaderBase.

Definition at line 334 of file timsmsrunreaderms2.cpp.

{
return msp_timsData.get()->getRetentionTimeLineInSeconds();
}

## getTicChromatogram()

Trace TimsMsRunReaderMs2::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::TimsMsRunReaderBase.

Definition at line 340 of file timsmsrunreaderms2.cpp.

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

References acquireDevice(), and msp_timsData.

## getTimsDataSPtr()

pappso::TimsDataSp pappso::TimsMsRunReaderMs2::getTimsDataSPtr | ( |  | ) |

virtual

give an access to the underlying raw data pointer

Reimplemented from pappso::TimsMsRunReaderBase.

Definition at line 298 of file timsmsrunreaderms2.cpp.

{
acquireDevice();
return msp_timsData;
}

Referenced by pappso::TimsXicExtractorInterface::TimsXicExtractorInterface().

## hasScanNumbers()

bool TimsMsRunReaderMs2::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::TimsMsRunReaderBase.

Reimplemented in pappso::TimsMsRunReaderMs2Selected.

Definition at line 261 of file timsmsrunreaderms2.cpp.

{
return false;
}

## initialize()

void pappso::TimsMsRunReaderMs2::initialize | ( |  | ) |

override protected virtual

Reimplemented from pappso::TimsMsRunReaderBase.

Reimplemented in pappso::TimsMsRunReaderMs2Selected.

Definition at line 59 of file timsmsrunreaderms2.cpp.

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

Referenced by TimsMsRunReaderMs2(), TimsMsRunReaderMs2(), and acquireDevice().

## massSpectrumCstSPtr()

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

override virtual

Implements pappso::MsRunReader.

Reimplemented in pappso::TimsMsRunReaderMs2Selected.

Definition at line 142 of file timsmsrunreaderms2.cpp.

{
QualifiedMassSpectrum mass_spectrum =
qualifiedMassSpectrum(spectrum_index, true);
return mass_spectrum.getMassSpectrumSPtr();
}
pappso::QualifiedMassSpectrum
Class representing a fully specified mass spectrum.
Definition qualifiedmassspectrum.h:99
pappso::QualifiedMassSpectrum::getMassSpectrumSPtr
MassSpectrumSPtr getMassSpectrumSPtr() const
Get the MassSpectrumSPtr.
Definition qualifiedmassspectrum.cpp:133
pappso::TimsMsRunReaderMs2::qualifiedMassSpectrum
virtual QualifiedMassSpectrum qualifiedMassSpectrum(std::size_t spectrum_index, bool want_binary_data=true) const override
get a QualifiedMassSpectrum class given its scan number
Definition timsmsrunreaderms2.cpp:151

References pappso::QualifiedMassSpectrum::getMassSpectrumSPtr(), and qualifiedMassSpectrum().

## massSpectrumSPtr()

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

override virtual

get a MassSpectrumSPtr class given its spectrum index

Implements pappso::MsRunReader.

Reimplemented in pappso::TimsMsRunReaderMs2Selected.

Definition at line 133 of file timsmsrunreaderms2.cpp.

{
QualifiedMassSpectrum mass_spectrum =
qualifiedMassSpectrum(spectrum_index, true);
return mass_spectrum.getMassSpectrumSPtr();
}

References pappso::QualifiedMassSpectrum::getMassSpectrumSPtr(), and qualifiedMassSpectrum().

## newXicCoordSPtrFromQualifiedMassSpectrum()

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

override virtual

get a xic coordinate object from a given spectrum

Reimplemented from pappso::TimsMsRunReaderBase.

Definition at line 325 of file timsmsrunreaderms2.cpp.

{
return newXicCoordSPtrFromSpectrumIndex(
mass_spectrum.getMassSpectrumId().getSpectrumIndex(), precision);
}
pappso::MassSpectrumId::getSpectrumIndex
std::size_t getSpectrumIndex() const
Definition massspectrumid.cpp:113
pappso::QualifiedMassSpectrum::getMassSpectrumId
const MassSpectrumId & getMassSpectrumId() const
Get the MassSpectrumId.
Definition qualifiedmassspectrum.cpp:157
pappso::TimsMsRunReaderMs2::newXicCoordSPtrFromSpectrumIndex
virtual pappso::XicCoordSPtr newXicCoordSPtrFromSpectrumIndex(std::size_t spectrum_index, pappso::PrecisionPtr precision) const override
get a xic coordinate object from a given spectrum index
Definition timsmsrunreaderms2.cpp:306

References pappso::QualifiedMassSpectrum::getMassSpectrumId(), pappso::MassSpectrumId::getSpectrumIndex(), and newXicCoordSPtrFromSpectrumIndex().

## newXicCoordSPtrFromSpectrumIndex()

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

override virtual

get a xic coordinate object from a given spectrum index

Reimplemented from pappso::TimsMsRunReaderBase.

Definition at line 306 of file timsmsrunreaderms2.cpp.

{
XicCoordTimsSPtr xic_coord = std::make_shared<XicCoordTims>();
std::size_t precursor_index = (spectrum_index / 2) + 1;
auto xic = this->msp_timsData.get()
->getTimsDdaPrecursorsPtr()
->getXicCoordTimsFromPrecursorId(precursor_index, precision);
xic_coord.get()->mzRange = xic.mzRange;
xic_coord.get()->rtTarget = xic.rtTarget;
xic_coord.get()->scanNumBegin = xic.scanNumBegin;
xic_coord.get()->scanNumEnd = xic.scanNumEnd;
return xic_coord;
}
pappso::XicCoordTimsSPtr
std::shared_ptr< XicCoordTims > XicCoordTimsSPtr
Definition xiccoordtims.h:40

References msp_timsData.

Referenced by newXicCoordSPtrFromQualifiedMassSpectrum().

## qualifiedMassSpectrum()

QualifiedMassSpectrum TimsMsRunReaderMs2::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.

Reimplemented in pappso::TimsMsRunReaderMs2Selected.

Definition at line 151 of file timsmsrunreaderms2.cpp.

{
std::size_t precursor_index = (spectrum_index / 2) + 1;
TimsDdaPrecursors::SpectrumDescr spectrum_descr;
try
{
spectrum_descr =
mp_timsDdaPrecursors->getSpectrumDescrWithPrecursorId(precursor_index);
}
catch(ExceptionNotFound &error)
{
throw ExceptionNotFound(
QObject::tr("spectrum_index %1 NOT FOUND in file %2 : %3")
.arg(spectrum_index)
.arg(getMsRunId().get()->getFileName())
.arg(error.qwhat()));
}
if(spectrum_index % 2 == 0)
{
// qDebug() << "MS1 spectrum precursor_index=" << precursor_index;
// this is an MS1 spectrum
QualifiedMassSpectrum mass_spectrum_ms1;
mp_timsDdaPrecursors->getQualifiedMs1MassSpectrumBySpectrumDescr(
getMsRunId(), mass_spectrum_ms1, spectrum_descr, want_binary_data);
// qDebug(); // << mass_spectrum_ms1.toString();
// qDebug() << mass_spectrum_ms1.getMassSpectrumSPtr().get()->toString();
return mass_spectrum_ms1;
}
else
{
// qDebug() << "MS2 spectrum precursor_index=" << precursor_index;
QualifiedMassSpectrum mass_spectrum_ms2;
if(spectrum_descr.ms2_index != spectrum_index)
{
// qDebug();
throw PappsoException(
QObject::tr("ERROR in %1 %2 %3 spectrum_descr.ms2_index(%4) != "
"spectrum_index(%5)")
.arg(__FILE__)
.arg(__FUNCTION__)
.arg(__LINE__)
.arg(spectrum_descr.ms2_index)
.arg(spectrum_index));
}
mp_timsDdaPrecursors->getQualifiedMs2MassSpectrumBySpectrumDescr(
getMsRunId(), mass_spectrum_ms2, spectrum_descr, want_binary_data);
// qDebug() << mass_spectrum_ms2.toString();
// qDebug() << mass_spectrum_ms2.getMassSpectrumSPtr().get()->toString();
return mass_spectrum_ms2;
}
}
pappso::ExceptionNotFound
Definition exceptionnotfound.h:32
pappso::MsRunReader::getMsRunId
const MsRunIdCstSPtr & getMsRunId() const
Definition msrunreader.cpp:57
pappso::PappsoException::qwhat
virtual const QString & qwhat() const
Definition pappsoexception.h:68
pappso::TimsDdaPrecursors::getQualifiedMs1MassSpectrumBySpectrumDescr
void getQualifiedMs1MassSpectrumBySpectrumDescr(const MsRunIdCstSPtr &msrun_id, QualifiedMassSpectrum &mass_spectrum, const SpectrumDescr &spectrum_descr, bool want_binary_data)
Definition timsddaprecursors.cpp:603
pappso::TimsDdaPrecursors::getQualifiedMs2MassSpectrumBySpectrumDescr
void getQualifiedMs2MassSpectrumBySpectrumDescr(const MsRunIdCstSPtr &msrun_id, QualifiedMassSpectrum &mass_spectrum, const SpectrumDescr &spectrum_descr, bool want_binary_data)
Definition timsddaprecursors.cpp:717
pappso::TimsDdaPrecursors::getSpectrumDescrWithPrecursorId
TimsDdaPrecursors::SpectrumDescr getSpectrumDescrWithPrecursorId(std::size_t precursor_id) const
get an intermediate structure describing a spectrum
Definition timsddaprecursors.cpp:414
pappso::TimsDdaPrecursors::SpectrumDescr
Definition timsddaprecursors.h:61
pappso::TimsDdaPrecursors::SpectrumDescr::ms2_index
std::size_t ms2_index
Definition timsddaprecursors.h:67

References pappso::MsRunReader::getMsRunId(), pappso::TimsDdaPrecursors::getQualifiedMs1MassSpectrumBySpectrumDescr(), pappso::TimsDdaPrecursors::getQualifiedMs2MassSpectrumBySpectrumDescr(), pappso::TimsDdaPrecursors::getSpectrumDescrWithPrecursorId(), mp_timsDdaPrecursors, pappso::TimsDdaPrecursors::SpectrumDescr::ms2_index, and pappso::PappsoException::qwhat().

Referenced by massSpectrumCstSPtr(), and massSpectrumSPtr().

## readSpectrumCollection()

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

override virtual

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

Implements pappso::MsRunReader.

Reimplemented in pappso::TimsMsRunReaderMs2Selected.

Definition at line 211 of file timsmsrunreaderms2.cpp.

{
readSpectrumCollectionByMsLevel(handler, 0);
}
pappso::TimsMsRunReaderMs2::readSpectrumCollectionByMsLevel
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
Definition timsmsrunreaderms2.cpp:226

References readSpectrumCollectionByMsLevel().

## readSpectrumCollection2()

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

override virtual

Implements pappso::MsRunReader.

Reimplemented in pappso::TimsMsRunReaderMs2Selected.

Definition at line 218 of file timsmsrunreaderms2.cpp.

{
readSpectrumCollectionByMsLevel(handler, 0);
}

References readSpectrumCollectionByMsLevel().

## readSpectrumCollectionByMsLevel()

void TimsMsRunReaderMs2::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 226 of file timsmsrunreaderms2.cpp.

{
// qDebug() << " ms_level=" << ms_level;
// We'll need it to perform the looping in the spectrum list.
std::size_t spectrum_list_size = spectrumListSize();
// qDebug() << "The spectrum list has size:" << spectrum_list_size;
// Inform the handler of the spectrum list so that it can handle feedback to
// the user.
handler.spectrumListHasSize(spectrum_list_size);
mp_timsDdaPrecursors->setMonoThread(isMonoThread());
mp_timsDdaPrecursors->ms2ReaderSpectrumCollectionByMsLevel(
getMsRunId(), handler, ms_level);
// Now let the loading handler know that the loading of the data has ended.
// The handler might need this "signal" to perform additional tasks or to
// cleanup cruft.
// qDebug() << "Loading ended";
handler.loadingEnded();
}
pappso::MsRunReader::isMonoThread
bool isMonoThread() const
Definition msrunreader.cpp:76
pappso::SpectrumCollectionHandlerInterface::loadingEnded
virtual void loadingEnded()
Definition spectrumcollectionhandlerinterface.cpp:43
pappso::SpectrumCollectionHandlerInterface::spectrumListHasSize
virtual void spectrumListHasSize(std::size_t size)
Definition spectrumcollectionhandlerinterface.cpp:47
pappso::TimsDdaPrecursors::ms2ReaderSpectrumCollectionByMsLevel
void ms2ReaderSpectrumCollectionByMsLevel(const MsRunIdCstSPtr &msrun_id, SpectrumCollectionHandlerInterface &handler, unsigned int ms_level)
function to visit an MsRunReader and get each Spectrum in a spectrum collection handler by Ms Levels
Definition timsddaprecursors.cpp:941
pappso::TimsDdaPrecursors::setMonoThread
void setMonoThread(bool is_mono_thread)
set only one is_mono_thread to true
Definition timsddaprecursors.cpp:1174
pappso::TimsMsRunReaderMs2::spectrumListSize
virtual std::size_t spectrumListSize() const override
get the totat number of spectrum conained in the MSrun data file
Definition timsmsrunreaderms2.cpp:254

References pappso::MsRunReader::getMsRunId(), pappso::MsRunReader::isMonoThread(), pappso::SpectrumCollectionHandlerInterface::loadingEnded(), mp_timsDdaPrecursors, pappso::TimsDdaPrecursors::ms2ReaderSpectrumCollectionByMsLevel(), pappso::TimsDdaPrecursors::setMonoThread(), pappso::SpectrumCollectionHandlerInterface::spectrumListHasSize(), and spectrumListSize().

Referenced by readSpectrumCollection(), and readSpectrumCollection2().

## releaseDevice()

bool TimsMsRunReaderMs2::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

Reimplemented from pappso::TimsMsRunReaderBase.

Definition at line 268 of file timsmsrunreaderms2.cpp.

{
msp_timsData = nullptr;
return true;
}

References msp_timsData.

## setMs1FilterCstSPtr()

void TimsMsRunReaderMs2::setMs1FilterCstSPtr | ( | pappso::FilterInterfaceCstSPtr | filter | ) |

Definition at line 109 of file timsmsrunreaderms2.cpp.

{
msp_ms1Filter = filter;
if(mp_timsDdaPrecursors != nullptr)
{
mp_timsDdaPrecursors->setMs1FilterCstSPtr(filter);
}
else
{
throw PappsoException(
QObject::tr("ERROR in TimsMsRunReaderMs2::setMs1FilterCstSPtr "
"msp_timsData is null"));
}
}

References mp_timsDdaPrecursors, msp_ms1Filter, and pappso::TimsDdaPrecursors::setMs1FilterCstSPtr().

## setMs2BuiltinCentroid()

void TimsMsRunReaderMs2::setMs2BuiltinCentroid | ( | bool | centroid | ) |

enable or disable simple centroid filter on raw tims data for MS2

Definition at line 77 of file timsmsrunreaderms2.cpp.

{
m_builtinMs2Centroid = centroid;
if(mp_timsDdaPrecursors != nullptr)
{
mp_timsDdaPrecursors->setMs2BuiltinCentroid(m_builtinMs2Centroid);
}
else
{
throw PappsoException(
QObject::tr("ERROR in TimsMsRunReaderMs2::setMs2BuiltinCentroid "
"mp_timsDdaPrecursors is null"));
}
}

References m_builtinMs2Centroid, mp_timsDdaPrecursors, and pappso::TimsDdaPrecursors::setMs2BuiltinCentroid().

Referenced by pappso::TandemWrapperRun::convertOrginalMsData2mzXmlData().

## setMs2FilterCstSPtr()

void TimsMsRunReaderMs2::setMs2FilterCstSPtr | ( | pappso::FilterInterfaceCstSPtr | filter | ) |

Definition at line 93 of file timsmsrunreaderms2.cpp.

{
msp_ms2Filter = filter;
if(mp_timsDdaPrecursors != nullptr)
{
mp_timsDdaPrecursors->setMs2FilterCstSPtr(msp_ms2Filter);
}
else
{
throw PappsoException(
QObject::tr("ERROR in TimsMsRunReaderMs2::setMs2FilterCstSPtr "
"mp_timsDdaPrecursors is null"));
}
}

References mp_timsDdaPrecursors, msp_ms2Filter, and pappso::TimsDdaPrecursors::setMs2FilterCstSPtr().

Referenced by pappso::TandemWrapperRun::convertOrginalMsData2mzXmlData().

## spectrumListSize()

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

override virtual

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

Implements pappso::MsRunReader.

Reimplemented in pappso::TimsMsRunReaderMs2Selected.

Definition at line 254 of file timsmsrunreaderms2.cpp.

{
return (mp_timsDdaPrecursors->getTotalPrecursorCount() * 2);
}
pappso::TimsDdaPrecursors::getTotalPrecursorCount
std::size_t getTotalPrecursorCount() const
get the number of precursors analyzed by PASEF
Definition timsddaprecursors.cpp:300

References pappso::TimsDdaPrecursors::getTotalPrecursorCount(), and mp_timsDdaPrecursors.

Referenced by readSpectrumCollectionByMsLevel().

## Friends And Related Symbol Documentation

## MsFileAccessor

friend class MsFileAccessor

friend

Definition at line 40 of file timsmsrunreaderms2.h.

## Member Data Documentation

## m_builtinMs2Centroid

bool pappso::TimsMsRunReaderMs2::m_builtinMs2Centroid = true

private

enable builtin centroid on raw tims integers by default

Definition at line 124 of file timsmsrunreaderms2.h.

Referenced by acquireDevice(), and setMs2BuiltinCentroid().

## mp_timsDdaPrecursors

TimsDdaPrecursors* pappso::TimsMsRunReaderMs2::mp_timsDdaPrecursors = nullptr

protected

Definition at line 115 of file timsmsrunreaderms2.h.

Referenced by acquireDevice(), qualifiedMassSpectrum(), pappso::TimsMsRunReaderMs2Selected::qualifiedMassSpectrum(), readSpectrumCollectionByMsLevel(), setMs1FilterCstSPtr(), pappso::TimsMsRunReaderMs2Selected::setMs1FilterCstSPtr(), setMs2BuiltinCentroid(), setMs2FilterCstSPtr(), pappso::TimsMsRunReaderMs2Selected::setMs2FilterCstSPtr(), spectrumListSize(), and pappso::TimsMsRunReaderMs2Selected::spectrumListSize().

## msp_ms1Filter

pappso::FilterInterfaceCstSPtr pappso::TimsMsRunReaderMs2::msp_ms1Filter

private

Definition at line 120 of file timsmsrunreaderms2.h.

Referenced by acquireDevice(), and setMs1FilterCstSPtr().

## msp_ms2Filter

pappso::FilterInterfaceCstSPtr pappso::TimsMsRunReaderMs2::msp_ms2Filter

private

Definition at line 121 of file timsmsrunreaderms2.h.

Referenced by acquireDevice(), and setMs2FilterCstSPtr().

## msp_timsData

TimsDataSp pappso::TimsMsRunReaderMs2::msp_timsData = nullptr

private

Definition at line 118 of file timsmsrunreaderms2.h.

Referenced by ~TimsMsRunReaderMs2(), acquireDevice(), getTicChromatogram(), newXicCoordSPtrFromSpectrumIndex(), and releaseDevice().

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

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