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 |
MzFormat | getFileFormat () const |
get the raw format of mz data More... | |
FileReaderType | getFileReaderType () const |
get the file reader type More... | |
void | setPreferedFileReaderType (MzFormat format, FileReaderType reader_type) |
given an mz format, explicitly set the prefered reader More... | |
std::vector< MsRunIdCstSPtr > | getMsRunIds () |
MsRunReaderSPtr | msRunReaderSp (MsRunIdCstSPtr ms_run_id) |
MsRunReaderSPtr | getMsRunReaderSPtrByRunId (const QString &run_id, const QString &xml_id) |
get an msrun reader by finding the run_id in file More... | |
TimsMsRunReaderMs2SPtr | buildTimsMsRunReaderMs2SPtr () |
if possible, builds directly a dedicated Tims TOF tdf file reader More... | |
Static Public Member Functions | |
static MsRunReaderSPtr | buildMsRunReaderSPtr (MsRunIdCstSPtr ms_run_id) |
get an MsRunReader directly from a valid MsRun ID More... | |
static MsRunReaderSPtr | buildMsRunReaderSPtr (MsRunIdCstSPtr ms_run_id, pappso::FileReaderType prefered_file_reader_type) |
get an MsRunReader directly from a valid MsRun ID More... | |
Private Attributes | |
QString | m_fileName |
const QString | m_xmlPrefix |
MzFormat | m_fileFormat = MzFormat::unknown |
FileReaderType | m_fileReaderType |
std::map< MzFormat, FileReaderType > | m_preferedFileReaderTypeMap |
Definition at line 35 of file msfileaccessor.h.
pappso::MsFileAccessor::MsFileAccessor | ( | const QString & | file_name, |
const QString & | xml_prefix | ||
) |
Definition at line 29 of file msfileaccessor.cpp.
pappso::MsFileAccessor::MsFileAccessor | ( | const MsFileAccessor & | other | ) |
Definition at line 40 of file msfileaccessor.cpp.
|
virtual |
Definition at line 48 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 233 of file msfileaccessor.cpp.
References pappso::tims.
|
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 |
prefered_file_reader_type | the prefered file reader type to use (depending on the mz format) |
Definition at line 239 of file msfileaccessor.cpp.
References pappso::brukerTims, pappso::tims, 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 146 of file msfileaccessor.cpp.
References pappso::TimsMsFileReader::getFileFormat(), pappso::TimsMsFileReader::getMsRunIds(), m_fileFormat, m_fileName, m_fileReaderType, m_xmlPrefix, and pappso::tims_ms2.
MzFormat pappso::MsFileAccessor::getFileFormat | ( | ) | const |
get the raw format of mz data
Definition at line 61 of file msfileaccessor.cpp.
References m_fileFormat.
Referenced by pappso::TandemWrapperRun::convertOrginalMsData2mzXmlData().
const QString & pappso::MsFileAccessor::getFileName | ( | ) | const |
Definition at line 54 of file msfileaccessor.cpp.
References m_fileName.
FileReaderType pappso::MsFileAccessor::getFileReaderType | ( | ) | const |
get the file reader type
Definition at line 338 of file msfileaccessor.cpp.
References m_fileReaderType.
std::vector< MsRunIdCstSPtr > pappso::MsFileAccessor::getMsRunIds | ( | ) |
Definition at line 68 of file msfileaccessor.cpp.
References pappso::PwizMsFileReader::getFileFormat(), pappso::TimsMsFileReader::getFileFormat(), pappso::XyMsFileReader::getFileFormat(), pappso::PwizMsFileReader::getMsRunIds(), pappso::TimsMsFileReader::getMsRunIds(), pappso::XyMsFileReader::getMsRunIds(), m_fileFormat, m_fileName, m_fileReaderType, m_preferedFileReaderTypeMap, m_xmlPrefix, pappso::pwiz, pappso::tims, and pappso::xy.
Referenced by pappso::TandemWrapperRun::convertOrginalMsData2mzXmlData(), and getMsRunReaderSPtrByRunId().
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 288 of file msfileaccessor.cpp.
References getMsRunIds(), m_fileName, msRunReaderSp(), and pappso::MsRunId::setXmlId().
MsRunReaderSPtr pappso::MsFileAccessor::msRunReaderSp | ( | MsRunIdCstSPtr | ms_run_id | ) |
Definition at line 179 of file msfileaccessor.cpp.
References m_fileFormat, m_fileName, m_fileReaderType, pappso::pwiz, pappso::tims, pappso::tims_frames, pappso::tims_ms2, pappso::unknown, and pappso::xy.
Referenced by pappso::TandemWrapperRun::convertOrginalMsData2mzXmlData(), and getMsRunReaderSPtrByRunId().
void pappso::MsFileAccessor::setPreferedFileReaderType | ( | MzFormat | format, |
FileReaderType | reader_type | ||
) |
given an mz format, explicitly set the prefered reader
Definition at line 324 of file msfileaccessor.cpp.
References m_preferedFileReaderTypeMap.
Referenced by pappso::TandemWrapperRun::convertOrginalMsData2mzXmlData().
|
private |
Definition at line 104 of file msfileaccessor.h.
Referenced by buildTimsMsRunReaderMs2SPtr(), getFileFormat(), getMsRunIds(), and msRunReaderSp().
|
private |
Definition at line 98 of file msfileaccessor.h.
Referenced by buildTimsMsRunReaderMs2SPtr(), getFileName(), getMsRunIds(), getMsRunReaderSPtrByRunId(), and msRunReaderSp().
|
private |
Definition at line 107 of file msfileaccessor.h.
Referenced by buildTimsMsRunReaderMs2SPtr(), getFileReaderType(), getMsRunIds(), and msRunReaderSp().
|
private |
Definition at line 109 of file msfileaccessor.h.
Referenced by getMsRunIds(), and setPreferedFileReaderType().
|
private |
Definition at line 102 of file msfileaccessor.h.
Referenced by buildTimsMsRunReaderMs2SPtr(), and getMsRunIds().