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 |
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 | |
FileReaderType | getFileReaderType () const |
get the file reader type | |
void | setPreferredFileReaderType (MsDataFormat format, FileReaderType reader_type) |
given an mz format, explicitly set the preferred reader | |
FileReaderType | getpreferredFileReaderType (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, pappso::FileReaderType preferred_file_reader_type) |
get an MsRunReader directly from a valid MsRun ID | |
Private Attributes | |
QString | m_fileName |
const QString | m_xmlPrefix |
MsDataFormat | m_fileFormat = MsDataFormat::unknown |
FileReaderType | m_fileReaderType |
std::map< MsDataFormat, 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 35 of file msfileaccessor.cpp.
References pappso::OboPsiModTerm::m_accession, pappso::OboPsiModTerm::m_definition, pappso::OboPsiModTerm::m_name, and m_oboPsiModTermNativeIDFormat.
pappso::MsFileAccessor::MsFileAccessor | ( | const MsFileAccessor & | other | ) |
Definition at line 53 of file msfileaccessor.cpp.
References m_oboPsiModTermNativeIDFormat.
|
virtual |
Definition at line 62 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 507 of file msfileaccessor.cpp.
References buildMsRunReaderSPtr(), and pappso::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 513 of file msfileaccessor.cpp.
References pappso::brukerBafAscii, pappso::brukerTims, pappso::tims, pappso::tims_frames, pappso::tims_ms2, pappso::unknown, and pappso::xy.
TimsMsRunReaderMs2SPtr pappso::MsFileAccessor::buildTimsMsRunReaderMs2SPtr | ( | ) |
if possible, builds directly a dedicated Tims TOF tdf file reader
Definition at line 373 of file msfileaccessor.cpp.
References pappso::TimsMsFileReader::getFileFormat(), pappso::TimsMsFileReader::getMsRunIds(), m_fileFormat, m_fileName, m_fileReaderType, m_xmlPrefix, and pappso::tims_ms2.
MsDataFormat pappso::MsFileAccessor::getFileFormat | ( | ) | const |
get the raw format of mz data
Definition at line 75 of file msfileaccessor.cpp.
References m_fileFormat.
Referenced by pappso::TandemWrapperRun::convertOrginalMsData2mzXmlData().
const QString & pappso::MsFileAccessor::getFileName | ( | ) | const |
Definition at line 68 of file msfileaccessor.cpp.
References m_fileName.
FileReaderType pappso::MsFileAccessor::getFileReaderType | ( | ) | const |
get the file reader type
Definition at line 353 of file msfileaccessor.cpp.
References m_fileReaderType.
std::vector< MsRunIdCstSPtr > pappso::MsFileAccessor::getMsRunIds | ( | ) |
Definition at line 196 of file msfileaccessor.cpp.
References pappso::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::pwiz, pappso::PappsoException::qwhat(), pappso::tims, pappso::unknown, and pappso::xy.
Referenced by pappso::TandemWrapperRun::convertOrginalMsData2mzXmlData(), getMsRunReaderSPtrByRunId(), and msRunReaderSPtr().
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 571 of file msfileaccessor.cpp.
References getMsRunIds(), m_fileName, msRunReaderSPtr(), and pappso::MsRunId::setXmlId().
const OboPsiModTerm pappso::MsFileAccessor::getOboPsiModTermFileFormat | ( | ) | const |
get OboPsiModTerm corresponding to the raw format of mz data
Definition at line 81 of file msfileaccessor.cpp.
References pappso::abSciexT2D, pappso::abSciexWiff, pappso::agilentMassHunter, pappso::brukerBaf, pappso::brukerBafAscii, pappso::brukerFid, pappso::brukerTims, pappso::brukerYep, pappso::OboPsiModTerm::m_accession, pappso::OboPsiModTerm::m_definition, m_fileFormat, pappso::OboPsiModTerm::m_name, pappso::MGF, pappso::msn, pappso::mz5, pappso::mzML, pappso::mzXML, pappso::SQLite3, pappso::thermoRaw, pappso::unknown, pappso::watersRaw, and pappso::xy.
const OboPsiModTerm & pappso::MsFileAccessor::getOboPsiModTermNativeIDFormat | ( | ) | const |
get OboPsiModTerm corresponding to the nativeID format format of mz data
Definition at line 187 of file msfileaccessor.cpp.
References m_oboPsiModTermNativeIDFormat.
FileReaderType pappso::MsFileAccessor::getpreferredFileReaderType | ( | MsDataFormat | format | ) |
Definition at line 337 of file msfileaccessor.cpp.
References m_fileReaderType, and m_preferredFileReaderTypeMap.
Referenced by msRunReaderSPtr().
MsRunIdCstSPtr pappso::MsFileAccessor::getSelectedMsRunId | ( | ) | const |
Definition at line 367 of file msfileaccessor.cpp.
References mcsp_selectedMsRunId.
MsRunReaderSPtr pappso::MsFileAccessor::msRunReaderSPtr | ( | MsRunIdCstSPtr | ms_run_id | ) |
Definition at line 405 of file msfileaccessor.cpp.
References pappso::bafascii, getpreferredFileReaderType(), m_fileFormat, m_fileName, m_oboPsiModTermNativeIDFormat, pappso::pwiz, pappso::tims, pappso::tims_dia, pappso::tims_frames, pappso::tims_ms2, pappso::unknown, and pappso::xy.
Referenced by pappso::TandemWrapperRun::convertOrginalMsData2mzXmlData(), getMsRunReaderSPtrByRunId(), msRunReaderSPtr(), and msRunReaderSPtrForSelectedMsRunId().
MsRunReaderSPtr pappso::MsFileAccessor::msRunReaderSPtr | ( | std::size_t | ms_run_id_index | ) |
Definition at line 487 of file msfileaccessor.cpp.
References getMsRunIds(), and msRunReaderSPtr().
MsRunReaderSPtr pappso::MsFileAccessor::msRunReaderSPtrForSelectedMsRunId | ( | ) |
Definition at line 498 of file msfileaccessor.cpp.
References mcsp_selectedMsRunId, and msRunReaderSPtr().
void pappso::MsFileAccessor::setPreferredFileReaderType | ( | MsDataFormat | format, |
FileReaderType | reader_type ) |
given an mz format, explicitly set the preferred reader
Definition at line 320 of file msfileaccessor.cpp.
References m_preferredFileReaderTypeMap.
Referenced by pappso::TandemWrapperRun::convertOrginalMsData2mzXmlData().
void pappso::MsFileAccessor::setSelectedMsRunId | ( | MsRunIdCstSPtr | ms_run_id_csp | ) |
Definition at line 360 of file msfileaccessor.cpp.
References mcsp_selectedMsRunId.
|
private |
Definition at line 115 of file msfileaccessor.h.
Referenced by buildTimsMsRunReaderMs2SPtr(), getFileFormat(), getMsRunIds(), getOboPsiModTermFileFormat(), and msRunReaderSPtr().
|
private |
Definition at line 109 of file msfileaccessor.h.
Referenced by buildTimsMsRunReaderMs2SPtr(), getFileName(), getMsRunIds(), getMsRunReaderSPtrByRunId(), and msRunReaderSPtr().
|
private |
Definition at line 118 of file msfileaccessor.h.
Referenced by 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 buildTimsMsRunReaderMs2SPtr(), and getMsRunIds().
|
private |
Definition at line 122 of file msfileaccessor.h.
Referenced by getSelectedMsRunId(), msRunReaderSPtrForSelectedMsRunId(), and setSelectedMsRunId().