|
libpappsomspp
Library for mass spectrometry
|
#include <bafasciimsrunreader.h>
Public Member Functions | |
| BafAsciiMsRunReader (MsRunIdCstSPtr &msrun_id_csp) | |
| virtual | ~BafAsciiMsRunReader () |
| 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 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 More... | |
| virtual pappso::XicCoordSPtr | newXicCoordSPtrFromQualifiedMassSpectrum (const pappso::QualifiedMassSpectrum &mass_spectrum, pappso::PrecisionPtr precision) const override |
| get a xic coordinate object from a given spectrum More... | |
| 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 More... | |
| virtual std::size_t | spectrumListSize () const override |
| get the totat number of spectrum conained in the MSrun data file More... | |
| 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 More... | |
| virtual bool | acquireDevice () override |
| acquire data back end device More... | |
| 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 More... | |
Public Member Functions inherited from pappso::MsRunReader | |
| MsRunReader (const MsRunIdCstSPtr &ms_run_id) | |
| MsRunReader (const MsRunReader &other) | |
| virtual | ~MsRunReader () |
| const MsRunIdCstSPtr & | getMsRunId () const |
| virtual MassSpectrumSPtr | massSpectrumSPtr (std::size_t spectrum_index)=0 |
| get a MassSpectrumSPtr class given its spectrum index More... | |
| virtual MassSpectrumCstSPtr | massSpectrumCstSPtr (std::size_t spectrum_index)=0 |
| virtual QualifiedMassSpectrum | qualifiedMassSpectrum (std::size_t spectrum_index, bool want_binary_data=true) const =0 |
| get a QualifiedMassSpectrum class given its scan number More... | |
| virtual XicCoordSPtr | newXicCoordSPtrFromSpectrumIndex (std::size_t spectrum_index, PrecisionPtr precision) const =0 |
| get a xic coordinate object from a given spectrum index More... | |
| virtual XicCoordSPtr | newXicCoordSPtrFromQualifiedMassSpectrum (const QualifiedMassSpectrum &mass_spectrum, PrecisionPtr precision) const =0 |
| get a xic coordinate object from a given spectrum More... | |
| virtual std::size_t | spectrumListSize () const =0 |
| get the totat number of spectrum conained in the MSrun data file More... | |
| virtual void | readSpectrumCollection (SpectrumCollectionHandlerInterface &handler)=0 |
| function to visit an MsRunReader and get each Spectrum in a spectrum collection handler More... | |
| virtual void | readSpectrumCollection2 (const MsRunReadConfig &config, SpectrumCollectionHandlerInterface &handler)=0 |
| virtual void | readSpectrumCollectionByMsLevel (SpectrumCollectionHandlerInterface &handler, unsigned int ms_level)=0 |
| function to visit an MsRunReader and get each Spectrum in a spectrum collection handler by Ms Levels More... | |
| 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... | |
| virtual bool | hasScanNumbers () const |
| 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... | |
| virtual std::size_t | spectrumStringIdentifier2SpectrumIndex (const QString &spectrum_identifier)=0 |
| if possible, get the spectrum index given a string identifier throw a not found exception if spectrum identifier is not found More... | |
| virtual bool | releaseDevice ()=0 |
| release data back end device if a the data back end is released, the developper has to use acquireDevice before using the msrunreader object More... | |
| virtual bool | acquireDevice ()=0 |
| acquire data back end device More... | |
| virtual std::vector< double > | getRetentionTimeLine () |
| retention timeline get retention times along the MSrun in seconds More... | |
| virtual Trace | getTicChromatogram () |
| get a TIC chromatogram More... | |
| void | setMonoThread (bool is_mono_thread) |
| set only one is_mono_thread to true More... | |
| bool | isMonoThread () const |
| virtual const OboPsiModTerm | getOboPsiModTermInstrumentModelName () const |
| 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 More... | |
Protected Member Functions | |
| QString | craftLineParserRegExpPattern () const |
| QRegularExpression | craftLineParserRegExp (QString &pattern) const |
| bool | parseMassSpectrumLine (QString &line, MassSpectrumLineData &ms_line_data, QRegularExpression &line_regexp) const |
| 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 | qualifiedMassSpectrumFromBafAsciiMSDataFile (std::size_t spectrum_index, bool want_binary_data) const |
| virtual void | initialize ()=0 |
| virtual bool | accept (const QString &file_name) const =0 |
| 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... | |
Protected Attributes | |
| QString | m_fileName |
| std::size_t | m_spectrumCount = 0 |
Protected Attributes inherited from pappso::MsRunReader | |
| MsRunIdCstSPtr | mcsp_msRunId |
| MsRunReaderScanNumberMultiMap * | mpa_multiMapScanNumber = nullptr |
Friends | |
| class | MsFileAccessor |
Definition at line 23 of file bafasciimsrunreader.h.
| pappso::BafAsciiMsRunReader::BafAsciiMsRunReader | ( | MsRunIdCstSPtr & | msrun_id_csp | ) |
Definition at line 27 of file bafasciimsrunreader.cpp.
References initialize().
|
virtual |
Definition at line 52 of file bafasciimsrunreader.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 220 of file bafasciimsrunreader.cpp.
References craftLineParserRegExp(), craftLineParserRegExpPattern(), line, m_spectrumCount, and parseMassSpectrumLine().
Referenced by initialize().
|
overridevirtual |
acquire data back end device
Implements pappso::MsRunReader.
Definition at line 663 of file bafasciimsrunreader.cpp.
|
protected |
Definition at line 99 of file bafasciimsrunreader.cpp.
Referenced by accept(), qualifiedMassSpectrumFromBafAsciiMSDataFile(), and readSpectrumCollectionByMsLevel().
|
protected |
Definition at line 57 of file bafasciimsrunreader.cpp.
References pappso::Utils::unsignedDoubleNumberNoExponentialRegExp.
Referenced by accept(), qualifiedMassSpectrumFromBafAsciiMSDataFile(), and readSpectrumCollectionByMsLevel().
|
overrideprotectedvirtual |
Implements pappso::MsRunReader.
Definition at line 37 of file bafasciimsrunreader.cpp.
References accept(), and pappso::MsRunReader::mcsp_msRunId.
Referenced by BafAsciiMsRunReader().
|
overridevirtual |
Implements pappso::MsRunReader.
Definition at line 290 of file bafasciimsrunreader.cpp.
References pappso::QualifiedMassSpectrum::getMassSpectrumCstSPtr(), and qualifiedMassSpectrum().
|
overridevirtual |
get a MassSpectrumSPtr class given its spectrum index
Implements pappso::MsRunReader.
Definition at line 283 of file bafasciimsrunreader.cpp.
References pappso::QualifiedMassSpectrum::getMassSpectrumSPtr(), and qualifiedMassSpectrum().
|
overridevirtual |
get a xic coordinate object from a given spectrum
Implements pappso::MsRunReader.
Definition at line 678 of file bafasciimsrunreader.cpp.
|
overridevirtual |
get a xic coordinate object from a given spectrum index
Implements pappso::MsRunReader.
Definition at line 669 of file bafasciimsrunreader.cpp.
|
protected |
Definition at line 113 of file bafasciimsrunreader.cpp.
References pappso::MassSpectrumLineData::dash, pappso::MassSpectrumLineData::ionizationMode, pappso::MassSpectrumLineData::ionSourceType, line, pappso::MassSpectrumLineData::msLevel, pappso::MassSpectrumLineData::mz_range, pappso::MassSpectrumLineData::peakCount, pappso::MassSpectrumLineData::peakList, pappso::MassSpectrumLineData::peakShapeType, and pappso::MassSpectrumLineData::retentionTime.
Referenced by accept(), qualifiedMassSpectrumFromBafAsciiMSDataFile(), and readSpectrumCollectionByMsLevel().
|
overridevirtual |
get a QualifiedMassSpectrum class given its scan number
Implements pappso::MsRunReader.
Definition at line 445 of file bafasciimsrunreader.cpp.
References qualifiedMassSpectrumFromBafAsciiMSDataFile().
Referenced by massSpectrumCstSPtr(), and massSpectrumSPtr().
|
protected |
Definition at line 297 of file bafasciimsrunreader.cpp.
References craftLineParserRegExp(), craftLineParserRegExpPattern(), line, pappso::MassSpectrum::makeMassSpectrumSPtr(), pappso::MsRunReader::mcsp_msRunId, pappso::MassSpectrumLineData::msLevel, pappso::mz, parseMassSpectrumLine(), pappso::MassSpectrumLineData::peakList, pappso::MassSpectrumLineData::retentionTime, pappso::QualifiedMassSpectrum::setMassSpectrumId(), pappso::QualifiedMassSpectrum::setMassSpectrumSPtr(), pappso::QualifiedMassSpectrum::setMsLevel(), and pappso::QualifiedMassSpectrum::setRtInSeconds().
Referenced by qualifiedMassSpectrum().
|
overridevirtual |
function to visit an MsRunReader and get each Spectrum in a spectrum collection handler
Implements pappso::MsRunReader.
Definition at line 460 of file bafasciimsrunreader.cpp.
References readSpectrumCollectionByMsLevel().
Referenced by readSpectrumCollection2().
|
overridevirtual |
Implements pappso::MsRunReader.
Definition at line 644 of file bafasciimsrunreader.cpp.
References readSpectrumCollection().
|
overridevirtual |
function to visit an MsRunReader and get each Spectrum in a spectrum collection handler by Ms Levels
Implements pappso::MsRunReader.
Definition at line 467 of file bafasciimsrunreader.cpp.
References craftLineParserRegExp(), craftLineParserRegExpPattern(), pappso::QualifiedMassSpectrum::getMsLevel(), line, pappso::SpectrumCollectionHandlerInterface::loadingEnded(), pappso::MassSpectrum::makeMassSpectrumSPtr(), pappso::MsRunReader::mcsp_msRunId, pappso::MassSpectrumLineData::msLevel, pappso::mz, pappso::SpectrumCollectionHandlerInterface::needPeakList(), parseMassSpectrumLine(), pappso::MassSpectrumLineData::peakList, pappso::MassSpectrumLineData::retentionTime, pappso::QualifiedMassSpectrum::setMassSpectrumSPtr(), pappso::QualifiedMassSpectrum::setMsLevel(), pappso::SpectrumCollectionHandlerInterface::setQualifiedMassSpectrum(), pappso::QualifiedMassSpectrum::setRtInSeconds(), and pappso::SpectrumCollectionHandlerInterface::shouldStop().
Referenced by readSpectrumCollection().
|
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 657 of file bafasciimsrunreader.cpp.
|
overridevirtual |
get the totat number of spectrum conained in the MSrun data file
Implements pappso::MsRunReader.
Definition at line 651 of file bafasciimsrunreader.cpp.
References m_spectrumCount.
|
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 687 of file bafasciimsrunreader.cpp.
|
friend |
Definition at line 25 of file bafasciimsrunreader.h.
|
protected |
Definition at line 65 of file bafasciimsrunreader.h.
|
mutableprotected |
Definition at line 68 of file bafasciimsrunreader.h.
Referenced by accept(), and spectrumListSize().