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

calculate a TIC chromatogram More...

`#include <spectrumcollectionhandlerinterface.h>`

Inheritance diagram for pappso::MsRunReaderTicChromatogram:

## Public Member Functions

| MsRunReaderTicChromatogram ()
virtual | ~MsRunReaderTicChromatogram ()
virtual void | setQualifiedMassSpectrum (const QualifiedMassSpectrum &qualified_mass_spectrum) override
virtual bool | needPeakList () const override
| tells if we need the peak list (if we want the binary data) for each spectrum
Trace | getTicChromatogram () const
Public Member Functions inherited from pappso::SpectrumCollectionHandlerInterface
virtual bool | needMsLevelPeakList (unsigned int ms_level) const final
| tells if we need the peak list (if we want the binary data) for each spectrum, given an MS level
virtual void | setNeedMsLevelPeakList (unsigned int ms_level, bool want_peak_list) final
| tells if we need the peak list given
virtual bool | shouldStop ()
virtual void | loadingEnded ()
virtual void | spectrumListHasSize (std::size_t size)
virtual void | setReadAhead (bool is_read_ahead) final
| use threads to read a spectrum by batch of batch_size
virtual bool | isReadAhead () const
| tells if we want to read ahead spectrum

## Private Attributes

MapTrace | m_ticChromMapTrace

## Detailed Description

calculate a TIC chromatogram

Definition at line 167 of file spectrumcollectionhandlerinterface.h.

## Constructor & Destructor Documentation

## MsRunReaderTicChromatogram()

pappso::MsRunReaderTicChromatogram::MsRunReaderTicChromatogram | ( |  | ) |

Definition at line 251 of file spectrumcollectionhandlerinterface.cpp.

{
}

## ~MsRunReaderTicChromatogram()

pappso::MsRunReaderTicChromatogram::~MsRunReaderTicChromatogram | ( |  | ) |

virtual

Definition at line 256 of file spectrumcollectionhandlerinterface.cpp.

{
}

## Member Function Documentation

## getTicChromatogram()

Trace pappso::MsRunReaderTicChromatogram::getTicChromatogram | ( |  | ) | const

Definition at line 305 of file spectrumcollectionhandlerinterface.cpp.

{
return m_ticChromMapTrace.toTrace();
}
pappso::MapTrace::toTrace
Trace toTrace() const
Definition maptrace.cpp:219
pappso::MsRunReaderTicChromatogram::m_ticChromMapTrace
MapTrace m_ticChromMapTrace
Definition spectrumcollectionhandlerinterface.h:180

References m_ticChromMapTrace, and pappso::MapTrace::toTrace().

Referenced by pappso::MsRunReader::getTicChromatogram().

## needPeakList()

bool pappso::MsRunReaderTicChromatogram::needPeakList | ( |  | ) | const

override virtual

tells if we need the peak list (if we want the binary data) for each spectrum

Implements pappso::SpectrumCollectionHandlerInterface.

Definition at line 262 of file spectrumcollectionhandlerinterface.cpp.

{
return true;
}

## setQualifiedMassSpectrum()

void pappso::MsRunReaderTicChromatogram::setQualifiedMassSpectrum | ( | const QualifiedMassSpectrum & | qualified_mass_spectrum | ) |

override virtual

Implements pappso::SpectrumCollectionHandlerInterface.

Definition at line 269 of file spectrumcollectionhandlerinterface.cpp.

{
// In this specialized reader we want to compute the total ion current
// chromatogram that plot the sum of all the ion intensities in the spectra as
// a function of the retention time.
uint spectrum_ms_level = qualified_mass_spectrum.getMsLevel();
if(spectrum_ms_level != 1)
return;
double sumY = qualified_mass_spectrum.getMassSpectrumSPtr()->sumY();
if(!sumY)
return;
double rt = qualified_mass_spectrum.getRtInMinutes();
using Pair = std::pair<double, double>;
using Map = std::map<double, double>;
using Iterator = Map::iterator;
std::pair<Iterator, bool> res = m_ticChromMapTrace.insert(Pair(rt, sumY));
if(!res.second)
{
// One other same rt value was seen already (like in ion mobility mass
// spectrometry, for example). Only increment the y value.
res.first->second += sumY;
}
}
pappso::PrecisionUnit::res
@ res
pappso::DataKind::rt
@ rt
Retention time.
pappso::uint
unsigned int uint
Definition types.h:57

References pappso::QualifiedMassSpectrum::getMassSpectrumSPtr(), pappso::QualifiedMassSpectrum::getMsLevel(), pappso::QualifiedMassSpectrum::getRtInMinutes(), m_ticChromMapTrace, pappso::res, and pappso::rt.

## Member Data Documentation

## m_ticChromMapTrace

MapTrace pappso::MsRunReaderTicChromatogram::m_ticChromMapTrace

private

Definition at line 180 of file spectrumcollectionhandlerinterface.h.

Referenced by getTicChromatogram(), and setQualifiedMassSpectrum().

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

- pappsomspp/msrun/spectrumcollectionhandlerinterface.h
- pappsomspp/msrun/spectrumcollectionhandlerinterface.cpp