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

`#include <timsmsrunreaderdia.h>`

Inheritance diagram for pappso::TimsMsRunReaderDia:

## Public Member Functions

| TimsMsRunReaderDia (MsRunIdCstSPtr &msrun_id_csp)
| TimsMsRunReaderDia (const TimsMsRunReaderBase &msrun_reader_base)
virtual | ~TimsMsRunReaderDia ()
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 XicCoordSPtr | newXicCoordSPtrFromSpectrumIndex (std::size_t spectrum_index, PrecisionPtr precision) const override
| get a xic coordinate object from a given spectrum index
virtual XicCoordSPtr | newXicCoordSPtrFromQualifiedMassSpectrum (const QualifiedMassSpectrum &mass_spectrum, 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 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 bool | acquireDevice () override
| acquire data back end device
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 Trace | getTicChromatogram () override
| get a TIC chromatogram
virtual std::vector< double > | getRetentionTimeLine () override
| retention timeline get retention times along the MSrun in seconds
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
Protected Member Functions inherited from pappso::TimsMsRunReaderBase
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

TimsDiaSlices * | mp_timsDiaSlices = nullptr

## Friends

class | MsFileAccessor

## Additional Inherited Members

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 44 of file timsmsrunreaderdia.h.

## Constructor & Destructor Documentation

## TimsMsRunReaderDia() [1/2]

pappso::TimsMsRunReaderDia::TimsMsRunReaderDia | ( | MsRunIdCstSPtr & | msrun_id_csp | ) |

Default constructor

Definition at line 38 of file timsmsrunreaderdia.cpp.

: TimsMsRunReaderBase(msrun_id_csp)
{
// qInfo() << msp_timsData.get();
initialize();
}
pappso::TimsMsRunReaderBase::TimsMsRunReaderBase
TimsMsRunReaderBase(MsRunIdCstSPtr &msrun_id_csp)
Definition timsmsrunreaderbase.cpp:38
pappso::TimsMsRunReaderDia::initialize
virtual void initialize() override
Definition timsmsrunreaderdia.cpp:58

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

Referenced by MsFileAccessor.

## TimsMsRunReaderDia() [2/2]

pappso::TimsMsRunReaderDia::TimsMsRunReaderDia | ( | const TimsMsRunReaderBase & | msrun_reader_base | ) |

Definition at line 46 of file timsmsrunreaderdia.cpp.

: TimsMsRunReaderBase(msrun_reader_base)
{
initialize();
}

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

## ~TimsMsRunReaderDia()

pappso::TimsMsRunReaderDia::~TimsMsRunReaderDia | ( |  | ) |

virtual

Destructor

Definition at line 52 of file timsmsrunreaderdia.cpp.

{
}

## Member Function Documentation

## acquireDevice()

bool pappso::TimsMsRunReaderDia::acquireDevice | ( |  | ) |

override virtual

acquire data back end device

Returns
  bool true if done

Reimplemented from pappso::TimsMsRunReaderBase.

Definition at line 153 of file timsmsrunreaderdia.cpp.

{
if(TimsMsRunReaderBase::acquireDevice())
{
qDebug() << msp_timsData.get();
mp_timsDiaSlices = msp_timsData.get()->getTimsDiaSlicesPtr();
return true;
}
return false;
qDebug();
}
pappso::TimsMsRunReaderBase::msp_timsData
TimsDataSp msp_timsData
Definition timsmsrunreaderbase.h:87
pappso::TimsMsRunReaderBase::acquireDevice
virtual bool acquireDevice() override
acquire data back end device
Definition timsmsrunreaderbase.cpp:93
pappso::TimsMsRunReaderDia::mp_timsDiaSlices
TimsDiaSlices * mp_timsDiaSlices
Definition timsmsrunreaderdia.h:119

References pappso::TimsMsRunReaderBase::acquireDevice(), mp_timsDiaSlices, and pappso::TimsMsRunReaderBase::msp_timsData.

Referenced by MsFileAccessor.

## initialize()

void pappso::TimsMsRunReaderDia::initialize | ( |  | ) |

override protected virtual

Reimplemented from pappso::TimsMsRunReaderBase.

Definition at line 58 of file timsmsrunreaderdia.cpp.

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

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

Referenced by TimsMsRunReaderDia(), TimsMsRunReaderDia(), and MsFileAccessor.

## massSpectrumCstSPtr()

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

override virtual

Implements pappso::MsRunReader.

Definition at line 139 of file timsmsrunreaderdia.cpp.

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

Referenced by MsFileAccessor.

## massSpectrumSPtr()

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

override virtual

get a MassSpectrumSPtr class given its spectrum index

Implements pappso::MsRunReader.

Definition at line 133 of file timsmsrunreaderdia.cpp.

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

Referenced by MsFileAccessor.

## newXicCoordSPtrFromQualifiedMassSpectrum()

pappso::XicCoordSPtr pappso::TimsMsRunReaderDia::newXicCoordSPtrFromQualifiedMassSpectrum | ( | const 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 88 of file timsmsrunreaderdia.cpp.

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

Referenced by MsFileAccessor.

## newXicCoordSPtrFromSpectrumIndex()

XicCoordSPtr pappso::TimsMsRunReaderDia::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 79 of file timsmsrunreaderdia.cpp.

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

Referenced by MsFileAccessor.

## qualifiedMassSpectrum()

QualifiedMassSpectrum pappso::TimsMsRunReaderDia::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 105 of file timsmsrunreaderdia.cpp.

{
// spectrum index is a global slice index
QualifiedMassSpectrum q_dia_spectrum;
mp_timsDiaSlices->getMs2QualifiedSpectrumByGlobalSliceIndex(
getMsRunId(), q_dia_spectrum, spectrum_index, want_binary_data);
return q_dia_spectrum;
}
pappso::MsRunReader::getMsRunId
const MsRunIdCstSPtr & getMsRunId() const
Definition msrunreader.cpp:55

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

Referenced by MsFileAccessor.

## readSpectrumCollection()

void pappso::TimsMsRunReaderDia::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 116 of file timsmsrunreaderdia.cpp.

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

Referenced by MsFileAccessor.

## readSpectrumCollection2()

void pappso::TimsMsRunReaderDia::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 124 of file timsmsrunreaderdia.cpp.

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

Referenced by MsFileAccessor.

## readSpectrumCollectionByMsLevel()

void pappso::TimsMsRunReaderDia::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 96 of file timsmsrunreaderdia.cpp.

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

Referenced by MsFileAccessor.

## spectrumListSize()

std::size_t pappso::TimsMsRunReaderDia::spectrumListSize | ( |  | ) | const

override virtual

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

Implements pappso::MsRunReader.

Definition at line 146 of file timsmsrunreaderdia.cpp.

{
return mp_timsDiaSlices->getTotalSlicesCount();
}

References mp_timsDiaSlices.

Referenced by MsFileAccessor.

## spectrumStringIdentifier2SpectrumIndex()

std::size_t pappso::TimsMsRunReaderDia::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 166 of file timsmsrunreaderdia.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 46 of file timsmsrunreaderdia.h.

References pappso::TimsMsRunReaderBase::TimsMsRunReaderBase(), TimsMsRunReaderDia(), acquireDevice(), initialize(), massSpectrumCstSPtr(), massSpectrumSPtr(), MsFileAccessor, newXicCoordSPtrFromQualifiedMassSpectrum(), newXicCoordSPtrFromSpectrumIndex(), qualifiedMassSpectrum(), readSpectrumCollection(), readSpectrumCollection2(), readSpectrumCollectionByMsLevel(), spectrumListSize(), and spectrumStringIdentifier2SpectrumIndex().

Referenced by MsFileAccessor.

## Member Data Documentation

## mp_timsDiaSlices

TimsDiaSlices* pappso::TimsMsRunReaderDia::mp_timsDiaSlices = nullptr

private

Definition at line 119 of file timsmsrunreaderdia.h.

Referenced by acquireDevice(), initialize(), qualifiedMassSpectrum(), and spectrumListSize().

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

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