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
| function to visit an MsRunReader and get each Spectrum in a spectrum collection handler
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 () override
| 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
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 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

## 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 39 of file timsmsrunreaderms2.cpp.

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

References pappso::TimsMsRunReaderBase::TimsMsRunReaderBase(), and initialize().

Referenced by pappso::TimsMsRunReaderMs2Selected::TimsMsRunReaderMs2Selected(), and MsFileAccessor.

## TimsMsRunReaderMs2() [2/2]

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

Definition at line 45 of file timsmsrunreaderms2.cpp.

: TimsMsRunReaderBase(msrun_reader_base)
{
initialize();
}

References pappso::TimsMsRunReaderBase::TimsMsRunReaderBase(), and initialize().

## ~TimsMsRunReaderMs2()

TimsMsRunReaderMs2::~TimsMsRunReaderMs2 | ( |  | ) |

virtual

Definition at line 51 of file timsmsrunreaderms2.cpp.

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

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 124 of file timsmsrunreaderms2.cpp.

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

Referenced by MsFileAccessor.

## acquireDevice()

bool TimsMsRunReaderMs2::acquireDevice | ( |  | ) |

override virtual

acquire data back end device

Returns
  bool true if done

Reimplemented from pappso::TimsMsRunReaderBase.

Definition at line 266 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::TimsMsRunReaderMs2::msp_ms2Filter
pappso::FilterInterfaceCstSPtr msp_ms2Filter
Definition timsmsrunreaderms2.h:120
pappso::TimsMsRunReaderMs2::mp_timsDdaPrecursors
TimsDdaPrecursors * mp_timsDdaPrecursors
Definition timsmsrunreaderms2.h:114
pappso::TimsMsRunReaderMs2::msp_ms1Filter
pappso::FilterInterfaceCstSPtr msp_ms1Filter
Definition timsmsrunreaderms2.h:119
pappso::TimsMsRunReaderMs2::m_builtinMs2Centroid
bool m_builtinMs2Centroid
enable builtin centroid on raw tims integers by default
Definition timsmsrunreaderms2.h:123

References initialize(), m_builtinMs2Centroid, mp_timsDdaPrecursors, msp_ms1Filter, msp_ms2Filter, and msp_timsData.

Referenced by getTicChromatogram(), getTimsDataSPtr(), and MsFileAccessor.

## 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 279 of file timsmsrunreaderms2.cpp.

{
return mp_timsDdaPrecursors->getPrecursorsByMzRtCharge(charge, mz_val, rt_sec, k0);
}

References mp_timsDdaPrecursors.

Referenced by MsFileAccessor.

## 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 322 of file timsmsrunreaderms2.cpp.

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

References msp_timsData.

Referenced by MsFileAccessor.

## 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 328 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:266

References acquireDevice(), and msp_timsData.

Referenced by MsFileAccessor.

## getTimsDataSPtr()

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

override virtual

give an access to the underlying raw data pointer

Reimplemented from pappso::TimsMsRunReaderBase.

Definition at line 288 of file timsmsrunreaderms2.cpp.

{
acquireDevice();
return msp_timsData;
}

References acquireDevice(), and msp_timsData.

Referenced by pappso::TimsXicExtractorInterface::TimsXicExtractorInterface(), and MsFileAccessor.

## 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 252 of file timsmsrunreaderms2.cpp.

{
return false;
}

Referenced by MsFileAccessor.

## initialize()

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

override protected virtual

Reimplemented from pappso::TimsMsRunReaderBase.

Reimplemented in pappso::TimsMsRunReaderMs2Selected.

Definition at line 60 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:194

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

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

## massSpectrumCstSPtr()

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

override virtual

Implements pappso::MsRunReader.

Reimplemented in pappso::TimsMsRunReaderMs2Selected.

Definition at line 140 of file timsmsrunreaderms2.cpp.

{
QualifiedMassSpectrum mass_spectrum = qualifiedMassSpectrum(spectrum_index, true);
return mass_spectrum.getMassSpectrumSPtr();
}
pappso::QualifiedMassSpectrum::getMassSpectrumSPtr
MassSpectrumSPtr getMassSpectrumSPtr() const
Get the MassSpectrumSPtr.
Definition qualifiedmassspectrum.cpp:130
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:148

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

Referenced by MsFileAccessor.

## 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 132 of file timsmsrunreaderms2.cpp.

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

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

Referenced by MsFileAccessor.

## 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 314 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:154
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:296

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

Referenced by MsFileAccessor.

## 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 296 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
pappso::XicCoordTims::scanNumEnd
std::size_t scanNumEnd
mobility index end
Definition xiccoordtims.h:101
pappso::XicCoordTims::scanNumBegin
std::size_t scanNumBegin
mobility index begin
Definition xiccoordtims.h:97
pappso::XicCoord::rtTarget
double rtTarget
the targeted retention time to extract around intended in seconds, and related to one msrun....
Definition xiccoord.h:131
pappso::XicCoord::mzRange
MzRange mzRange
the mass to extract
Definition xiccoord.h:125

References msp_timsData, pappso::XicCoord::mzRange, pappso::XicCoord::rtTarget, pappso::XicCoordTims::scanNumBegin, and pappso::XicCoordTims::scanNumEnd.

Referenced by MsFileAccessor, and 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 148 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::MsRunReader::getMsRunId
const MsRunIdCstSPtr & getMsRunId() const
Definition msrunreader.cpp:55
pappso::PappsoException::qwhat
virtual const QString & qwhat() const
Definition pappsoexception.h:66
pappso::TimsDdaPrecursors::SpectrumDescr::ms2_index
std::size_t ms2_index
Definition timsddaprecursors.h:69

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

Referenced by massSpectrumCstSPtr(), massSpectrumSPtr(), and MsFileAccessor.

## 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 204 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:218

References readSpectrumCollectionByMsLevel().

Referenced by MsFileAccessor.

## readSpectrumCollection2()

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

Reimplemented in pappso::TimsMsRunReaderMs2Selected.

Definition at line 210 of file timsmsrunreaderms2.cpp.

{
readSpectrumCollectionByMsLevel(handler, 0);
}

References readSpectrumCollectionByMsLevel().

Referenced by MsFileAccessor.

## 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 218 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:74
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::TimsMsRunReaderMs2::spectrumListSize
virtual std::size_t spectrumListSize() const override
get the totat number of spectrum conained in the MSrun data file
Definition timsmsrunreaderms2.cpp:245

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

Referenced by MsFileAccessor, 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 259 of file timsmsrunreaderms2.cpp.

{
msp_timsData = nullptr;
return true;
}

References msp_timsData.

Referenced by MsFileAccessor.

## setMs1FilterCstSPtr()

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

Definition at line 108 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"));
}
}
pappso::ProjectParamCategory::filter
@ filter
concerning filters (psm, peptide, protein validation)
Definition projectparameters.h:48

References pappso::filter, mp_timsDdaPrecursors, and msp_ms1Filter.

Referenced by MsFileAccessor.

## setMs2BuiltinCentroid()

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

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

Definition at line 76 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, and mp_timsDdaPrecursors.

Referenced by pappso::TandemWrapperRun::convertOrginalMsData2mzXmlData(), and MsFileAccessor.

## setMs2FilterCstSPtr()

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

Definition at line 92 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 pappso::filter, mp_timsDdaPrecursors, and msp_ms2Filter.

Referenced by pappso::TandemWrapperRun::convertOrginalMsData2mzXmlData(), and MsFileAccessor.

## 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 245 of file timsmsrunreaderms2.cpp.

{
return (mp_timsDdaPrecursors->getTotalPrecursorCount() * 2);
}

References mp_timsDdaPrecursors.

Referenced by MsFileAccessor, and readSpectrumCollectionByMsLevel().

## spectrumStringIdentifier2SpectrumIndex()

std::size_t TimsMsRunReaderMs2::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.

Reimplemented in pappso::TimsMsRunReaderMs2Selected.

Definition at line 340 of file timsmsrunreaderms2.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 40 of file timsmsrunreaderms2.h.

References pappso::TimsMsRunReaderBase::TimsMsRunReaderBase(), TimsMsRunReaderMs2(), accept(), acquireDevice(), getPrecursorsIDFromMzRt(), getRetentionTimeLine(), getTicChromatogram(), getTimsDataSPtr(), hasScanNumbers(), initialize(), massSpectrumCstSPtr(), massSpectrumSPtr(), MsFileAccessor, newXicCoordSPtrFromQualifiedMassSpectrum(), newXicCoordSPtrFromSpectrumIndex(), qualifiedMassSpectrum(), readSpectrumCollection(), readSpectrumCollection2(), readSpectrumCollectionByMsLevel(), releaseDevice(), setMs1FilterCstSPtr(), setMs2BuiltinCentroid(), setMs2FilterCstSPtr(), spectrumListSize(), and spectrumStringIdentifier2SpectrumIndex().

Referenced by MsFileAccessor.

## Member Data Documentation

## m_builtinMs2Centroid

bool pappso::TimsMsRunReaderMs2::m_builtinMs2Centroid = true

private

enable builtin centroid on raw tims integers by default

Definition at line 123 of file timsmsrunreaderms2.h.

Referenced by acquireDevice(), and setMs2BuiltinCentroid().

## mp_timsDdaPrecursors

TimsDdaPrecursors* pappso::TimsMsRunReaderMs2::mp_timsDdaPrecursors = nullptr

protected

Definition at line 114 of file timsmsrunreaderms2.h.

Referenced by acquireDevice(), getPrecursorsIDFromMzRt(), initialize(), pappso::TimsMsRunReaderMs2Selected::initialize(), 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 119 of file timsmsrunreaderms2.h.

Referenced by acquireDevice(), and setMs1FilterCstSPtr().

## msp_ms2Filter

pappso::FilterInterfaceCstSPtr pappso::TimsMsRunReaderMs2::msp_ms2Filter

private

Definition at line 120 of file timsmsrunreaderms2.h.

Referenced by acquireDevice(), and setMs2FilterCstSPtr().

## msp_timsData

TimsDataSp pappso::TimsMsRunReaderMs2::msp_timsData = nullptr

private

Definition at line 117 of file timsmsrunreaderms2.h.

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

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

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