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 | |
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 |
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 | |
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 | |
const OboPsiModTerm | getOboPsiModTermNativeIDFormat () const |
get OboPsiModTerm corresponding to the nativeID format format of mz data | |
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 | |
![]() | |
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. | |
virtual std::vector< double > | getRetentionTimeLine () |
retention timeline get retention times along the MSrun in seconds | |
virtual Trace | getTicChromatogram () |
get a TIC chromatogram | |
void | setMonoThread (bool is_mono_thread) |
set only one is_mono_thread to true | |
bool | isMonoThread () const |
Protected Member Functions | |
virtual void | readSpectrumCollectionWithMsrunReadConfig (const MsRunReadConfig &config, SpectrumCollectionHandlerInterface &handler) |
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 | |
bool | processRetentionTime (pwiz::msdata::Spectrum *spectrum_p, QualifiedMassSpectrum &qualified_mass_spectrum) const |
bool | processDriftTime (pwiz::msdata::Spectrum *spectrum_p, QualifiedMassSpectrum &qualified_mass_spectrum) const |
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 |
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 | |
Static Protected Member Functions | |
static std::string | setGlobalLocaleToEnglish () |
static void | setGlobalLocaleToCurrentOs (const std::string &environment_locale) |
Protected Attributes | |
pwiz::msdata::MSDataPtr | msp_msData = nullptr |
![]() | |
MsRunIdCstSPtr | mcsp_msRunId |
MsRunReaderScanNumberMultiMap * | mpa_multiMapScanNumber = nullptr |
Static Protected Attributes | |
static QMutex | m_mutex |
Private Attributes | |
bool | m_hasScanNumbers = false |
Friends | |
class | MsFileAccessor |
Definition at line 45 of file pwizmsrunreader.h.
pappso::PwizMsRunReader::PwizMsRunReader | ( | MsRunIdCstSPtr & | msrun_id_csp | ) |
Definition at line 56 of file pwizmsrunreader.cpp.
References pappso::MsRunReader::MsRunReader(), and initialize().
Referenced by MsFileAccessor.
|
virtual |
Definition at line 166 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 729 of file pwizmsrunreader.cpp.
Referenced by MsFileAccessor.
|
overridevirtual |
acquire data back end device
Implements pappso::MsRunReader.
Definition at line 1106 of file pwizmsrunreader.cpp.
References initialize(), and msp_msData.
Referenced by MsFileAccessor, readSpectrumCollectionByMsLevel(), readSpectrumCollectionWithMsrunReadConfig(), and spectrumStringIdentifier2SpectrumIndex().
|
overrideprotectedvirtual |
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
Velos Plus: Thermo Scientific second generation Velos.
LTQ Orbitrap Elite: Thermo Scientific LTQ Orbitrap Elite, often just referred to as the Orbitrap Elite.
Orbitrap Fusion: Thermo Scientific Orbitrap Fusion.
LTQ Orbitrap Elite: Thermo Scientific LTQ Orbitrap Elite, often just referred to as the Orbitrap Elite.
Q Exactive HF: Thermo Scientific Q Exactive.
LTQ Orbitrap Elite: Thermo Scientific LTQ Orbitrap Elite, often just referred to as the Orbitrap Elite.
Exactive Plus: Thermo Scientific Exactive Plus MS.
Q Exactive Plus: Thermo Scientific Q Exactive Plus.
Orbitrap Fusion Lumos: Thermo Scientific Orbitrap Fusion Lumos mass spectrometer with Tribrid architecture consisting of quadrupole mass filter, linear ion trap and Orbitrap mass analyzers.
Q Exactive HF-X: Thermo Scientific Q Exactive HF-X Hybrid Quadrupole Orbitrap MS.
Orbitrap Exploris 480: Thermo Scientific Orbitrap Exploris 480 Quadrupole Orbitrap MS.
Orbitrap Eclipse: Thermo Scientific Orbitrap Eclipse mass spectrometer with Tribrid architecture consisting of quadrupole mass filter, linear ion trap and Orbitrap mass analyzers.
Orbitrap Exploris 240: Thermo Scientific Orbitrap Exploris 240 Quadrupole Orbitrap MS.
Orbitrap Exploris 120: Thermo Scientific Orbitrap Exploris 120 Quadrupole Orbitrap MS.
LTQ Orbitrap Velos Pro: Thermo Scientific LTQ Orbitrap Velos Pro, often just referred to as the Orbitrap Velos Pro.
Q Exactive UHMR: Thermo Scientific Q Exactive UHMR (Ultra High Mass Range) Hybrid Quadrupole Orbitrap MS.
TSQ Altis Plus: Thermo Scientific TSQ Altis Plus Triple Quadrupole MS.
Orbitrap Ascend: Thermo Scientific Orbitrap Ascend mass spectrometer with Tribrid architecture consisting of quadrupole mass filter, linear ion trap and Orbitrap mass analyzers.
Orbitrap Astral: Thermo Scientific Orbitrap Astral mass spectrometer contains three mass analyzers: a quadrupole analyzer, an Orbitrap analyzer, and the Astral analyzer.
Reimplemented from pappso::MsRunReader.
Definition at line 1202 of file pwizmsrunreader.cpp.
References getOboPsiModTermNativeIDFormat(), pappso::FilterOboPsiModMap::getOboPsiModTermWithAccession(), pappso::MsRunReader::mcsp_msRunId, and msp_msData.
Referenced by MsFileAccessor.
const OboPsiModTerm pappso::PwizMsRunReader::getOboPsiModTermNativeIDFormat | ( | ) | const |
get OboPsiModTerm corresponding to the nativeID format format of mz data
Definition at line 172 of file pwizmsrunreader.cpp.
References pappso::OboPsiModTerm::m_definition, pappso::OboPsiModTerm::m_name, msp_msData, and pappso::OboPsiModTerm::setAccession().
Referenced by getOboPsiModTermInstrumentModelName(), and MsFileAccessor.
|
protected |
Definition at line 203 of file pwizmsrunreader.cpp.
Referenced by MsFileAccessor, qualifiedMassSpectrumFromPwizMSData(), readSpectrumCollectionByMsLevel(), and readSpectrumCollectionWithMsrunReadConfig().
|
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 1093 of file pwizmsrunreader.cpp.
References m_hasScanNumbers.
Referenced by MsFileAccessor.
|
overrideprotectedvirtual |
Implements pappso::MsRunReader.
Definition at line 67 of file pwizmsrunreader.cpp.
References m_hasScanNumbers, pappso::MsRunReader::mcsp_msRunId, msp_msData, pappso::Enums::mzXML, and pappso::Utils::toUtf8StandardString().
Referenced by PwizMsRunReader(), acquireDevice(), and MsFileAccessor.
|
overridevirtual |
Implements pappso::MsRunReader.
Definition at line 751 of file pwizmsrunreader.cpp.
References pappso::QualifiedMassSpectrum::getMassSpectrumCstSPtr(), and qualifiedMassSpectrum().
Referenced by MsFileAccessor.
|
overridevirtual |
get a MassSpectrumSPtr class given its spectrum index
Implements pappso::MsRunReader.
Definition at line 744 of file pwizmsrunreader.cpp.
References pappso::QualifiedMassSpectrum::getMassSpectrumSPtr(), and qualifiedMassSpectrum().
Referenced by MsFileAccessor.
|
overridevirtual |
get a xic coordinate object from a given spectrum
Implements pappso::MsRunReader.
Definition at line 1127 of file pwizmsrunreader.cpp.
References pappso::QualifiedMassSpectrum::getPrecursorMz(), and pappso::QualifiedMassSpectrum::getRtInSeconds().
Referenced by MsFileAccessor, and newXicCoordSPtrFromSpectrumIndex().
|
overridevirtual |
get a xic coordinate object from a given spectrum index
Implements pappso::MsRunReader.
Definition at line 1117 of file pwizmsrunreader.cpp.
References newXicCoordSPtrFromQualifiedMassSpectrum(), and qualifiedMassSpectrum().
Referenced by MsFileAccessor.
|
protected |
Definition at line 306 of file pwizmsrunreader.cpp.
References pappso::QualifiedMassSpectrum::setDtInMilliSeconds().
Referenced by MsFileAccessor, and qualifiedMassSpectrumFromPwizSpectrumPtr().
|
protected |
Definition at line 243 of file pwizmsrunreader.cpp.
References pappso::MsRunReader::mcsp_msRunId, pappso::Enums::MGF, and pappso::QualifiedMassSpectrum::setRtInSeconds().
Referenced by MsFileAccessor, and qualifiedMassSpectrumFromPwizSpectrumPtr().
|
overridevirtual |
get a QualifiedMassSpectrum class given its scan number
Implements pappso::MsRunReader.
Definition at line 758 of file pwizmsrunreader.cpp.
References pappso::QualifiedMassSpectrum::getRtInSeconds(), pappso::MsRunReader::mcsp_msRunId, pappso::Enums::MGF, and qualifiedMassSpectrumFromPwizMSData().
Referenced by massSpectrumCstSPtr(), massSpectrumSPtr(), MsFileAccessor, and newXicCoordSPtrFromSpectrumIndex().
|
protected |
Definition at line 685 of file pwizmsrunreader.cpp.
References getPwizSpectrumPtr(), pappso::MsRunReader::mcsp_msRunId, msp_msData, qualifiedMassSpectrumFromPwizSpectrumPtr(), setGlobalLocaleToCurrentOs(), setGlobalLocaleToEnglish(), pappso::MassSpectrumId::setNativeId(), and pappso::MassSpectrumId::setSpectrumIndex().
Referenced by MsFileAccessor, and qualifiedMassSpectrum().
|
protected |
Definition at line 371 of file pwizmsrunreader.cpp.
References pappso::QualifiedMassSpectrum::appendPrecursorIonData(), pappso::QualifiedMassSpectrum::getPrecursorIonData(), pappso::QualifiedMassSpectrum::getPrecursorNativeId(), pappso::MassSpectrum::makeMassSpectrumSPtr(), pappso::MsRunReader::mcsp_msRunId, pappso::Enums::MGF, msp_msData, processDriftTime(), processRetentionTime(), pappso::PappsoException::qwhat(), pappso::ScanNumber, setGlobalLocaleToEnglish(), pappso::QualifiedMassSpectrum::setMassSpectrumSPtr(), pappso::QualifiedMassSpectrum::setMsLevel(), pappso::QualifiedMassSpectrum::setParameterValue(), pappso::QualifiedMassSpectrum::setPrecursorNativeId(), pappso::QualifiedMassSpectrum::setPrecursorSpectrumIndex(), and pappso::MassSpectrum::sortMz().
Referenced by MsFileAccessor, qualifiedMassSpectrumFromPwizMSData(), readSpectrumCollectionByMsLevel(), and readSpectrumCollectionWithMsrunReadConfig().
|
overridevirtual |
function to visit an MsRunReader and get each Spectrum in a spectrum collection handler
Implements pappso::MsRunReader.
Definition at line 782 of file pwizmsrunreader.cpp.
References readSpectrumCollectionByMsLevel().
Referenced by MsFileAccessor.
|
overridevirtual |
Implements pappso::MsRunReader.
Definition at line 800 of file pwizmsrunreader.cpp.
References readSpectrumCollectionWithMsrunReadConfig().
Referenced by MsFileAccessor.
|
overridevirtual |
function to visit an MsRunReader and get each Spectrum in a spectrum collection handler by Ms Levels
Implements pappso::MsRunReader.
Definition at line 820 of file pwizmsrunreader.cpp.
References acquireDevice(), pappso::QualifiedMassSpectrum::getMsLevel(), getPwizSpectrumPtr(), pappso::SpectrumCollectionHandlerInterface::loadingEnded(), pappso::MsRunReader::mcsp_msRunId, msp_msData, pappso::SpectrumCollectionHandlerInterface::needPeakList(), qualifiedMassSpectrumFromPwizSpectrumPtr(), pappso::QualifiedMassSpectrum::setEmptyMassSpectrum(), setGlobalLocaleToCurrentOs(), setGlobalLocaleToEnglish(), pappso::MassSpectrumId::setNativeId(), pappso::SpectrumCollectionHandlerInterface::setQualifiedMassSpectrum(), pappso::SpectrumCollectionHandlerInterface::shouldStop(), and pappso::SpectrumCollectionHandlerInterface::spectrumListHasSize().
Referenced by MsFileAccessor, and readSpectrumCollection().
|
protectedvirtual |
Definition at line 950 of file pwizmsrunreader.cpp.
References pappso::MsRunReadConfig::acceptMsLevel(), pappso::MsRunReadConfig::acceptRetentionTimeInSeconds(), acquireDevice(), pappso::QualifiedMassSpectrum::getMsLevel(), getPwizSpectrumPtr(), pappso::QualifiedMassSpectrum::getRtInSeconds(), pappso::SpectrumCollectionHandlerInterface::loadingEnded(), pappso::MsRunReader::mcsp_msRunId, msp_msData, pappso::MsRunReadConfig::needPeakList(), qualifiedMassSpectrumFromPwizSpectrumPtr(), pappso::QualifiedMassSpectrum::setEmptyMassSpectrum(), setGlobalLocaleToCurrentOs(), setGlobalLocaleToEnglish(), pappso::MassSpectrumId::setNativeId(), pappso::SpectrumCollectionHandlerInterface::setQualifiedMassSpectrum(), pappso::SpectrumCollectionHandlerInterface::shouldStop(), and pappso::SpectrumCollectionHandlerInterface::spectrumListHasSize().
Referenced by MsFileAccessor, and readSpectrumCollection2().
|
overridevirtual |
release data back end device if a the data back end is released, the developper has to use acquireDevice before using the msrunreader object
Implements pappso::MsRunReader.
Definition at line 1099 of file pwizmsrunreader.cpp.
References msp_msData.
Referenced by MsFileAccessor.
|
staticprotected |
Definition at line 1163 of file pwizmsrunreader.cpp.
Referenced by MsFileAccessor, qualifiedMassSpectrumFromPwizMSData(), readSpectrumCollectionByMsLevel(), and readSpectrumCollectionWithMsrunReadConfig().
|
staticprotected |
Definition at line 1139 of file pwizmsrunreader.cpp.
Referenced by MsFileAccessor, qualifiedMassSpectrumFromPwizMSData(), qualifiedMassSpectrumFromPwizSpectrumPtr(), readSpectrumCollectionByMsLevel(), and readSpectrumCollectionWithMsrunReadConfig().
|
overridevirtual |
get the totat number of spectrum conained in the MSrun data file
Implements pappso::MsRunReader.
Definition at line 1087 of file pwizmsrunreader.cpp.
References msp_msData.
Referenced by MsFileAccessor.
|
overridevirtual |
if possible, get the spectrum index given a string identifier throw a not found exception if spectrum identifier is not found
spectrum_identifier | string identifier of a specific spectrum |
Implements pappso::MsRunReader.
Definition at line 1185 of file pwizmsrunreader.cpp.
References acquireDevice(), and msp_msData.
Referenced by MsFileAccessor.
|
friend |
Definition at line 47 of file pwizmsrunreader.h.
References PwizMsRunReader(), accept(), acquireDevice(), getOboPsiModTermInstrumentModelName(), getOboPsiModTermNativeIDFormat(), getPwizSpectrumPtr(), hasScanNumbers(), initialize(), massSpectrumCstSPtr(), massSpectrumSPtr(), MsFileAccessor, newXicCoordSPtrFromQualifiedMassSpectrum(), newXicCoordSPtrFromSpectrumIndex(), processDriftTime(), processRetentionTime(), qualifiedMassSpectrum(), qualifiedMassSpectrumFromPwizMSData(), qualifiedMassSpectrumFromPwizSpectrumPtr(), readSpectrumCollection(), readSpectrumCollection2(), readSpectrumCollectionByMsLevel(), readSpectrumCollectionWithMsrunReadConfig(), releaseDevice(), setGlobalLocaleToCurrentOs(), setGlobalLocaleToEnglish(), spectrumListSize(), and spectrumStringIdentifier2SpectrumIndex().
Referenced by MsFileAccessor.
|
private |
Definition at line 133 of file pwizmsrunreader.h.
Referenced by hasScanNumbers(), and initialize().
|
staticprotected |
Definition at line 128 of file pwizmsrunreader.h.
|
protected |
Definition at line 129 of file pwizmsrunreader.h.
Referenced by acquireDevice(), getOboPsiModTermInstrumentModelName(), getOboPsiModTermNativeIDFormat(), initialize(), qualifiedMassSpectrumFromPwizMSData(), qualifiedMassSpectrumFromPwizSpectrumPtr(), readSpectrumCollectionByMsLevel(), readSpectrumCollectionWithMsrunReadConfig(), releaseDevice(), spectrumListSize(), and spectrumStringIdentifier2SpectrumIndex().