| 
    libpappsomspp
    
   Library for mass spectrometry 
   | 
 
#include <msfileaccessor.h>
Public Member Functions | |
| MsFileAccessor (const QString &file_name, const QString &xml_prefix) | |
| MsFileAccessor (const MsFileAccessor &other) | |
| virtual | ~MsFileAccessor () | 
| const QString & | getFileName () const | 
| Enums::MsDataFormat | getFileFormat () const | 
| get the raw format of mz data   | |
| const OboPsiModTerm | getOboPsiModTermFileFormat () const | 
| get OboPsiModTerm corresponding to the raw format of mz data   | |
| const OboPsiModTerm & | getOboPsiModTermNativeIDFormat () const | 
| get OboPsiModTerm corresponding to the nativeID format format of mz data   | |
| Enums::FileReaderType | getFileReaderType () const | 
| get the file reader type   | |
| void | setPreferredFileReaderType (Enums::MsDataFormat format, Enums::FileReaderType reader_type) | 
| given an mz format, explicitly set the preferred reader   | |
| Enums::FileReaderType | getpreferredFileReaderType (Enums::MsDataFormat format) | 
| std::vector< MsRunIdCstSPtr > | getMsRunIds () | 
| void | setSelectedMsRunId (MsRunIdCstSPtr ms_run_id_csp) | 
| MsRunIdCstSPtr | getSelectedMsRunId () const | 
| MsRunReaderSPtr | msRunReaderSPtr (MsRunIdCstSPtr ms_run_id) | 
| MsRunReaderSPtr | msRunReaderSPtr (std::size_t ms_run_id_index) | 
| MsRunReaderSPtr | msRunReaderSPtrForSelectedMsRunId () | 
| MsRunReaderSPtr | getMsRunReaderSPtrByRunId (const QString &run_id, const QString &xml_id) | 
| get an msrun reader by finding the run_id in file   | |
| TimsMsRunReaderMs2SPtr | buildTimsMsRunReaderMs2SPtr () | 
| if possible, builds directly a dedicated Tims TOF tdf file reader   | |
Static Public Member Functions | |
| static MsRunReaderSPtr | buildMsRunReaderSPtr (MsRunIdCstSPtr ms_run_id) | 
| get an MsRunReader directly from a valid MsRun ID   | |
| static MsRunReaderSPtr | buildMsRunReaderSPtr (MsRunIdCstSPtr ms_run_id, Enums::FileReaderType preferred_file_reader_type) | 
| get an MsRunReader directly from a valid MsRun ID   | |
Private Attributes | |
| QString | m_fileName | 
| const QString | m_xmlPrefix | 
| Enums::MsDataFormat | m_fileFormat = Enums::MsDataFormat::unknown | 
| Enums::FileReaderType | m_fileReaderType | 
| std::map< Enums::MsDataFormat, Enums::FileReaderType > | m_preferredFileReaderTypeMap | 
| MsRunIdCstSPtr | mcsp_selectedMsRunId = nullptr | 
| OboPsiModTerm | m_oboPsiModTermNativeIDFormat | 
Definition at line 27 of file msfileaccessor.h.
| pappso::MsFileAccessor::MsFileAccessor | ( | const QString & | file_name, | 
| const QString & | xml_prefix ) | 
Definition at line 34 of file msfileaccessor.cpp.
References m_fileName, m_oboPsiModTermNativeIDFormat, and m_xmlPrefix.
Referenced by MsFileAccessor().
| pappso::MsFileAccessor::MsFileAccessor | ( | const MsFileAccessor & | other | ) | 
Definition at line 51 of file msfileaccessor.cpp.
References MsFileAccessor(), m_fileFormat, m_fileName, m_fileReaderType, m_oboPsiModTermNativeIDFormat, and m_xmlPrefix.
      
  | 
  virtual | 
Definition at line 60 of file msfileaccessor.cpp.
      
  | 
  static | 
get an MsRunReader directly from a valid MsRun ID
no need to check the file format or filename : all is already part of the msrunid
| ms_run_id | msrun identifier | 
Definition at line 496 of file msfileaccessor.cpp.
References buildMsRunReaderSPtr(), and pappso::Enums::tims.
Referenced by buildMsRunReaderSPtr().
      
  | 
  static | 
get an MsRunReader directly from a valid MsRun ID
no need to check the file format or filename : all is already part of the msrunid
| ms_run_id | msrun identifier | 
| preferred_file_reader_type | the preferred file reader type to use (depending on the mz format) | 
Definition at line 502 of file msfileaccessor.cpp.
References pappso::Enums::brukerBafAscii, pappso::Enums::brukerTims, pappso::Enums::tims, pappso::Enums::tims_frames, pappso::Enums::tims_ms2, pappso::Enums::unknown, and pappso::Enums::xy.
| TimsMsRunReaderMs2SPtr pappso::MsFileAccessor::buildTimsMsRunReaderMs2SPtr | ( | ) | 
if possible, builds directly a dedicated Tims TOF tdf file reader
Definition at line 367 of file msfileaccessor.cpp.
References pappso::TimsMsFileReader::getFileFormat(), pappso::TimsMsFileReader::getMsRunIds(), m_fileFormat, m_fileName, m_fileReaderType, m_xmlPrefix, and pappso::Enums::tims_ms2.
| Enums::MsDataFormat pappso::MsFileAccessor::getFileFormat | ( | ) | const | 
get the raw format of mz data
Definition at line 73 of file msfileaccessor.cpp.
References m_fileFormat.
Referenced by pappso::TandemWrapperRun::convertOrginalMsData2mzXmlData(), and pappso::masschroq::JsonInput::readMzDataFiles().
| const QString & pappso::MsFileAccessor::getFileName | ( | ) | const | 
Definition at line 66 of file msfileaccessor.cpp.
References m_fileName.
| Enums::FileReaderType pappso::MsFileAccessor::getFileReaderType | ( | ) | const | 
get the file reader type
Definition at line 347 of file msfileaccessor.cpp.
References m_fileReaderType.
| std::vector< MsRunIdCstSPtr > pappso::MsFileAccessor::getMsRunIds | ( | ) | 
Definition at line 193 of file msfileaccessor.cpp.
References pappso::Enums::bafascii, pappso::Utils::fileReaderTypeAsString(), pappso::BafAsciiFileReader::getFileFormat(), pappso::PwizMsFileReader::getFileFormat(), pappso::TimsMsFileReader::getFileFormat(), pappso::XyMsFileReader::getFileFormat(), pappso::BafAsciiFileReader::getMsRunIds(), pappso::PwizMsFileReader::getMsRunIds(), pappso::TimsMsFileReader::getMsRunIds(), pappso::XyMsFileReader::getMsRunIds(), m_fileFormat, m_fileName, m_fileReaderType, m_preferredFileReaderTypeMap, m_xmlPrefix, pappso::Enums::pwiz, pappso::PappsoException::qwhat(), pappso::Enums::tims, pappso::Enums::unknown, and pappso::Enums::xy.
Referenced by pappso::TandemWrapperRun::convertOrginalMsData2mzXmlData(), getMsRunReaderSPtrByRunId(), msRunReaderSPtr(), and pappso::masschroq::JsonInput::readMzDataFiles().
| MsRunReaderSPtr pappso::MsFileAccessor::getMsRunReaderSPtrByRunId | ( | const QString & | run_id, | 
| const QString & | xml_id ) | 
get an msrun reader by finding the run_id in file
| run_id | identifier within file of the MSrun | 
| xml_id | XML identifier given by the user to identify this MSrun in our experiment (not in the file) | 
Definition at line 557 of file msfileaccessor.cpp.
References getMsRunIds(), m_fileName, msRunReaderSPtr(), and pappso::MsRunId::setXmlId().
Referenced by pappso::masschroq::JsonInput::readMzDataFiles().
| const OboPsiModTerm pappso::MsFileAccessor::getOboPsiModTermFileFormat | ( | ) | const | 
get OboPsiModTerm corresponding to the raw format of mz data
Definition at line 79 of file msfileaccessor.cpp.
References pappso::Enums::abSciexT2D, pappso::Enums::abSciexWiff, pappso::Enums::agilentMassHunter, pappso::Enums::brukerBaf, pappso::Enums::brukerBafAscii, pappso::Enums::brukerFid, pappso::Enums::brukerTims, pappso::Enums::brukerYep, pappso::OboPsiModTerm::m_definition, m_fileFormat, pappso::OboPsiModTerm::m_name, pappso::Enums::MGF, pappso::Enums::msn, pappso::Enums::mz5, pappso::Enums::mzML, pappso::Enums::mzXML, pappso::OboPsiModTerm::setAccession(), pappso::Enums::SQLite3, pappso::Enums::thermoRaw, pappso::Enums::unknown, pappso::Enums::watersRaw, and pappso::Enums::xy.
| const OboPsiModTerm & pappso::MsFileAccessor::getOboPsiModTermNativeIDFormat | ( | ) | const | 
get OboPsiModTerm corresponding to the nativeID format format of mz data
Definition at line 184 of file msfileaccessor.cpp.
References m_oboPsiModTermNativeIDFormat.
| Enums::FileReaderType pappso::MsFileAccessor::getpreferredFileReaderType | ( | Enums::MsDataFormat | format | ) | 
Definition at line 331 of file msfileaccessor.cpp.
References m_fileReaderType, and m_preferredFileReaderTypeMap.
Referenced by msRunReaderSPtr().
| MsRunIdCstSPtr pappso::MsFileAccessor::getSelectedMsRunId | ( | ) | const | 
Definition at line 361 of file msfileaccessor.cpp.
References mcsp_selectedMsRunId.
| MsRunReaderSPtr pappso::MsFileAccessor::msRunReaderSPtr | ( | MsRunIdCstSPtr | ms_run_id | ) | 
Definition at line 397 of file msfileaccessor.cpp.
References pappso::Enums::bafascii, getpreferredFileReaderType(), m_fileFormat, m_fileName, m_oboPsiModTermNativeIDFormat, pappso::Enums::pwiz, pappso::Enums::tims, pappso::Enums::tims_dia, pappso::Enums::tims_frames, pappso::Enums::tims_ms2, pappso::Enums::unknown, and pappso::Enums::xy.
Referenced by pappso::TandemWrapperRun::convertOrginalMsData2mzXmlData(), getMsRunReaderSPtrByRunId(), msRunReaderSPtr(), and msRunReaderSPtrForSelectedMsRunId().
| MsRunReaderSPtr pappso::MsFileAccessor::msRunReaderSPtr | ( | std::size_t | ms_run_id_index | ) | 
Definition at line 476 of file msfileaccessor.cpp.
References getMsRunIds(), and msRunReaderSPtr().
| MsRunReaderSPtr pappso::MsFileAccessor::msRunReaderSPtrForSelectedMsRunId | ( | ) | 
Definition at line 487 of file msfileaccessor.cpp.
References mcsp_selectedMsRunId, and msRunReaderSPtr().
| void pappso::MsFileAccessor::setPreferredFileReaderType | ( | Enums::MsDataFormat | format, | 
| Enums::FileReaderType | reader_type ) | 
given an mz format, explicitly set the preferred reader
Definition at line 315 of file msfileaccessor.cpp.
References m_preferredFileReaderTypeMap.
Referenced by pappso::TandemWrapperRun::convertOrginalMsData2mzXmlData(), and pappso::masschroq::JsonInput::readMzDataFiles().
| void pappso::MsFileAccessor::setSelectedMsRunId | ( | MsRunIdCstSPtr | ms_run_id_csp | ) | 
Definition at line 354 of file msfileaccessor.cpp.
References mcsp_selectedMsRunId.
      
  | 
  private | 
Definition at line 115 of file msfileaccessor.h.
Referenced by MsFileAccessor(), buildTimsMsRunReaderMs2SPtr(), getFileFormat(), getMsRunIds(), getOboPsiModTermFileFormat(), and msRunReaderSPtr().
      
  | 
  private | 
Definition at line 109 of file msfileaccessor.h.
Referenced by MsFileAccessor(), MsFileAccessor(), buildTimsMsRunReaderMs2SPtr(), getFileName(), getMsRunIds(), getMsRunReaderSPtrByRunId(), and msRunReaderSPtr().
      
  | 
  private | 
Definition at line 118 of file msfileaccessor.h.
Referenced by MsFileAccessor(), buildTimsMsRunReaderMs2SPtr(), getFileReaderType(), getMsRunIds(), and getpreferredFileReaderType().
      
  | 
  private | 
Definition at line 124 of file msfileaccessor.h.
Referenced by MsFileAccessor(), MsFileAccessor(), getOboPsiModTermNativeIDFormat(), and msRunReaderSPtr().
      
  | 
  private | 
Definition at line 120 of file msfileaccessor.h.
Referenced by getMsRunIds(), getpreferredFileReaderType(), and setPreferredFileReaderType().
      
  | 
  private | 
Definition at line 113 of file msfileaccessor.h.
Referenced by MsFileAccessor(), MsFileAccessor(), buildTimsMsRunReaderMs2SPtr(), and getMsRunIds().
      
  | 
  private | 
Definition at line 122 of file msfileaccessor.h.
Referenced by getSelectedMsRunId(), msRunReaderSPtrForSelectedMsRunId(), and setSelectedMsRunId().