libpappsomspp
Library for mass spectrometry
|
#include <precursorparser.h>
Public Member Functions | |
PrecursorParser (pappso::MsRunReaderCstSPtr msrun_reader) | |
virtual | ~PrecursorParser () |
virtual void | setQualifiedMassSpectrum (const pappso::QualifiedMassSpectrum &qspectrum) override |
virtual bool | needPeakList () const override |
tells if we need the peak list (if we want the binary data) for each spectrum | |
virtual bool | isReadAhead () const override |
tells if we want to read ahead spectrum | |
const PrecursorSp & | getPrecursorSPtrBySpectrumIndex (std::size_t spectrum_index) const |
const PrecursorSp & | getPrecursorSPtrByScanNumber (std::size_t spectrum_index) const |
![]() | |
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 | |
Private Member Functions | |
void | mapScanNumberPrecursor (std::size_t scan_num, PrecursorSp precursor) |
map precursor to its scan number as parsed in the xml file of this msrun | |
void | mapSpectrumIndexToPrecursor (std::size_t spectrum_index, PrecursorSp precursor) |
map spectrum index to precursor new modern method to replace obsolete scan number | |
Private Attributes | |
pappso::MsRunReaderCstSPtr | msp_msrunReader |
std::map< std::size_t, PrecursorSp > | m_scanNumber2PrecursorMap |
std::map< std::size_t, PrecursorSp > | m_spectrumIndex2PrecursorMap |
Definition at line 40 of file precursorparser.h.
pappso::masschroq::PrecursorParser::PrecursorParser | ( | pappso::MsRunReaderCstSPtr | msrun_reader | ) |
Definition at line 35 of file precursorparser.cpp.
References msp_msrunReader.
|
virtual |
Definition at line 41 of file precursorparser.cpp.
const pappso::masschroq::PrecursorSp & pappso::masschroq::PrecursorParser::getPrecursorSPtrByScanNumber | ( | std::size_t | spectrum_index | ) | const |
Definition at line 168 of file precursorparser.cpp.
References m_scanNumber2PrecursorMap, and msp_msrunReader.
const pappso::masschroq::PrecursorSp & pappso::masschroq::PrecursorParser::getPrecursorSPtrBySpectrumIndex | ( | std::size_t | spectrum_index | ) | const |
Definition at line 150 of file precursorparser.cpp.
References m_spectrumIndex2PrecursorMap, and msp_msrunReader.
|
overridevirtual |
tells if we want to read ahead spectrum
Reimplemented from pappso::SpectrumCollectionHandlerInterface.
Definition at line 111 of file precursorparser.cpp.
|
private |
map precursor to its scan number as parsed in the xml file of this msrun
Definition at line 117 of file precursorparser.cpp.
References pappso::masschroq::Precursor::getXicCoordSPtr(), and m_scanNumber2PrecursorMap.
Referenced by setQualifiedMassSpectrum().
|
private |
map spectrum index to precursor new modern method to replace obsolete scan number
Definition at line 132 of file precursorparser.cpp.
References pappso::masschroq::Precursor::getXicCoordSPtr(), m_spectrumIndex2PrecursorMap, and msp_msrunReader.
Referenced by setQualifiedMassSpectrum().
|
overridevirtual |
tells if we need the peak list (if we want the binary data) for each spectrum
Implements pappso::SpectrumCollectionHandlerInterface.
Definition at line 46 of file precursorparser.cpp.
|
overridevirtual |
adding this new precursor to the msrun's hash map of scan_num -> precursor
Implements pappso::SpectrumCollectionHandlerInterface.
Definition at line 51 of file precursorparser.cpp.
References pappso::Utils::extractScanNumberFromMzmlNativeId(), pappso::QualifiedMassSpectrum::getMassSpectrumId(), pappso::QualifiedMassSpectrum::getMsLevel(), pappso::MassSpectrumId::getNativeId(), pappso::PrecisionFactory::getPpmInstance(), pappso::QualifiedMassSpectrum::getPrecursorIntensity(), pappso::QualifiedMassSpectrum::getPrecursorMz(), pappso::QualifiedMassSpectrum::getPrecursorSpectrumIndex(), pappso::MassSpectrumId::getSpectrumIndex(), pappso::masschroq::Precursor::getXicCoordSPtr(), mapScanNumberPrecursor(), mapSpectrumIndexToPrecursor(), and msp_msrunReader.
|
private |
Definition at line 73 of file precursorparser.h.
Referenced by getPrecursorSPtrByScanNumber(), and mapScanNumberPrecursor().
|
private |
Definition at line 74 of file precursorparser.h.
Referenced by getPrecursorSPtrBySpectrumIndex(), and mapSpectrumIndexToPrecursor().
|
private |
Definition at line 71 of file precursorparser.h.
Referenced by PrecursorParser(), getPrecursorSPtrByScanNumber(), getPrecursorSPtrBySpectrumIndex(), mapSpectrumIndexToPrecursor(), and setQualifiedMassSpectrum().