libpappsomspp
Library for mass spectrometry
|
#include <pwizmsrunreader.h>
Public Member Functions | |
PwizMsRunReader (MsRunIdCstSPtr &msrun_id_csp) | |
virtual | ~PwizMsRunReader () |
virtual MassSpectrumSPtr | massSpectrumSPtr (std::size_t spectrum_index) override |
get a MassSpectrumSPtr class given its spectrum index More... | |
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 More... | |
virtual void | readSpectrumCollection (SpectrumCollectionHandlerInterface &handler) override |
function to visit an MsRunReader and get each Spectrum in a spectrum collection handler More... | |
virtual std::size_t | spectrumListSize () const override |
get the totat number of spectrum conained in the MSrun data file More... | |
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 More... | |
![]() | |
MsRunReader (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. More... | |
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 More... | |
QualifiedMassSpectrum | qualifiedMassSpectrumFromPwizMSData (std::size_t spectrum_index, bool want_binary_data, bool &ok) const |
QualifiedMassSpectrum | qualifiedMassSpectrumFromPwizSpectrumPtr (const MassSpectrumId &massSpectrumId, pwiz::msdata::Spectrum *spectrum_p, bool want_binary_data, bool &ok) const |
pwiz::msdata::SpectrumPtr | getPwizSpectrumPtr (pwiz::msdata::SpectrumList *p_spectrum_list, std::size_t spectrum_index, bool want_binary_data) const |
Protected Attributes | |
pwiz::msdata::MSDataPtr | msp_msData = nullptr |
![]() | |
MsRunIdCstSPtr | mcsp_msRunId |
MsRunReaderScanNumberMultiMap * | mpa_multiMapScanNumber = nullptr |
Private Attributes | |
bool | m_hasScanNumbers = false |
Friends | |
class | MsFileAccessor |
Definition at line 45 of file pwizmsrunreader.h.
pappso::PwizMsRunReader::PwizMsRunReader | ( | MsRunIdCstSPtr & | msrun_id_csp | ) |
|
virtual |
Definition at line 164 of file pwizmsrunreader.cpp.
|
overrideprotectedvirtual |
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
Implements pappso::MsRunReader.
Definition at line 699 of file pwizmsrunreader.cpp.
|
protected |
Definition at line 170 of file pwizmsrunreader.cpp.
Referenced by qualifiedMassSpectrumFromPwizMSData(), and readSpectrumCollection().
|
overridevirtual |
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::MsRunReader.
Definition at line 887 of file pwizmsrunreader.cpp.
References m_hasScanNumbers.
|
overrideprotectedvirtual |
Implements pappso::MsRunReader.
Definition at line 65 of file pwizmsrunreader.cpp.
References m_hasScanNumbers, pappso::MsRunReader::mcsp_msRunId, msp_msData, and pappso::Utils::toUtf8StandardString().
Referenced by PwizMsRunReader().
|
overridevirtual |
Implements pappso::MsRunReader.
Definition at line 721 of file pwizmsrunreader.cpp.
References pappso::QualifiedMassSpectrum::getMassSpectrumCstSPtr(), and qualifiedMassSpectrum().
|
overridevirtual |
get a MassSpectrumSPtr class given its spectrum index
Implements pappso::MsRunReader.
Definition at line 714 of file pwizmsrunreader.cpp.
References pappso::QualifiedMassSpectrum::getMassSpectrumSPtr(), and qualifiedMassSpectrum().
|
overridevirtual |
get a QualifiedMassSpectrum class given its scan number
Implements pappso::MsRunReader.
Definition at line 728 of file pwizmsrunreader.cpp.
References pappso::QualifiedMassSpectrum::getRtInSeconds(), pappso::MsRunReader::mcsp_msRunId, and qualifiedMassSpectrumFromPwizMSData().
Referenced by massSpectrumCstSPtr(), and massSpectrumSPtr().
|
protected |
Definition at line 645 of file pwizmsrunreader.cpp.
References getPwizSpectrumPtr(), pappso::MsRunReader::mcsp_msRunId, msp_msData, qualifiedMassSpectrumFromPwizSpectrumPtr(), pappso::MassSpectrumId::setNativeId(), and pappso::MassSpectrumId::setSpectrumIndex().
Referenced by qualifiedMassSpectrum().
|
protected |
Definition at line 215 of file pwizmsrunreader.cpp.
References pappso::QualifiedMassSpectrum::getPrecursorNativeId(), pappso::MassSpectrumId::getSpectrumIndex(), pappso::MassSpectrum::makeMassSpectrumSPtr(), pappso::MsRunReader::mcsp_msRunId, msp_msData, pappso::PappsoException::qwhat(), pappso::QualifiedMassSpectrum::setDtInMilliSeconds(), pappso::QualifiedMassSpectrum::setMassSpectrumSPtr(), pappso::QualifiedMassSpectrum::setMsLevel(), pappso::QualifiedMassSpectrum::setPrecursorCharge(), pappso::QualifiedMassSpectrum::setPrecursorIntensity(), pappso::QualifiedMassSpectrum::setPrecursorMz(), pappso::QualifiedMassSpectrum::setPrecursorNativeId(), pappso::QualifiedMassSpectrum::setPrecursorSpectrumIndex(), pappso::QualifiedMassSpectrum::setRtInSeconds(), and pappso::MassSpectrum::sortMz().
Referenced by qualifiedMassSpectrumFromPwizMSData(), and readSpectrumCollection().
|
overridevirtual |
function to visit an MsRunReader and get each Spectrum in a spectrum collection handler
Implements pappso::MsRunReader.
Definition at line 754 of file pwizmsrunreader.cpp.
References getPwizSpectrumPtr(), pappso::SpectrumCollectionHandlerInterface::loadingEnded(), pappso::MsRunReader::mcsp_msRunId, msp_msData, pappso::SpectrumCollectionHandlerInterface::needPeakList(), qualifiedMassSpectrumFromPwizSpectrumPtr(), pappso::QualifiedMassSpectrum::setEmptyMassSpectrum(), pappso::MassSpectrumId::setNativeId(), pappso::SpectrumCollectionHandlerInterface::setQualifiedMassSpectrum(), pappso::SpectrumCollectionHandlerInterface::shouldStop(), and pappso::SpectrumCollectionHandlerInterface::spectrumListHasSize().
|
overridevirtual |
get the totat number of spectrum conained in the MSrun data file
Implements pappso::MsRunReader.
Definition at line 881 of file pwizmsrunreader.cpp.
References msp_msData.
|
friend |
Definition at line 47 of file pwizmsrunreader.h.
|
private |
Definition at line 90 of file pwizmsrunreader.h.
Referenced by hasScanNumbers(), and initialize().
|
protected |
Definition at line 70 of file pwizmsrunreader.h.
Referenced by initialize(), qualifiedMassSpectrumFromPwizMSData(), qualifiedMassSpectrumFromPwizSpectrumPtr(), readSpectrumCollection(), and spectrumListSize().