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 | |
FileReaderType | getFileReaderType () const |
get the file reader type | |
void | setPreferedFileReaderType (MzFormat format, FileReaderType reader_type) |
given an mz format, explicitly set the prefered reader | |
FileReaderType | getPreferedFileReaderType (MzFormat format) |
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 | |
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 prefered_file_reader_type) |
get an MsRunReader directly from a valid MsRun ID | |
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 26 of file msfileaccessor.h.
pappso::MsFileAccessor::MsFileAccessor | ( | const QString & | file_name, |
const QString & | xml_prefix | ||
) |
Definition at line 31 of file msfileaccessor.cpp.
pappso::MsFileAccessor::MsFileAccessor | ( | const MsFileAccessor & | other | ) |
Definition at line 42 of file msfileaccessor.cpp.
|
virtual |
Definition at line 50 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 287 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 |
prefered_file_reader_type | the prefered file reader type to use (depending on the mz format) |
Definition at line 293 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 193 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 63 of file msfileaccessor.cpp.
References m_fileFormat.
Referenced by pappso::TandemWrapperRun::convertOrginalMsData2mzXmlData().
const QString & pappso::MsFileAccessor::getFileName | ( | ) | const |
Definition at line 56 of file msfileaccessor.cpp.
References m_fileName.
FileReaderType pappso::MsFileAccessor::getFileReaderType | ( | ) | const |
get the file reader type
Definition at line 186 of file msfileaccessor.cpp.
References m_fileReaderType.
std::vector< MsRunIdCstSPtr > pappso::MsFileAccessor::getMsRunIds | ( | ) |
Definition at line 70 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 341 of file msfileaccessor.cpp.
References getMsRunIds(), m_fileName, msRunReaderSp(), and pappso::MsRunId::setXmlId().
FileReaderType pappso::MsFileAccessor::getPreferedFileReaderType | ( | MzFormat | format | ) |
Definition at line 172 of file msfileaccessor.cpp.
References m_fileReaderType, and m_preferedFileReaderTypeMap.
Referenced by msRunReaderSp().
MsRunReaderSPtr pappso::MsFileAccessor::msRunReaderSp | ( | MsRunIdCstSPtr | ms_run_id | ) |
Definition at line 225 of file msfileaccessor.cpp.
References getPreferedFileReaderType(), m_fileFormat, m_fileName, 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 157 of file msfileaccessor.cpp.
References m_preferedFileReaderTypeMap.
Referenced by pappso::TandemWrapperRun::convertOrginalMsData2mzXmlData().
|
private |
Definition at line 96 of file msfileaccessor.h.
Referenced by buildTimsMsRunReaderMs2SPtr(), getFileFormat(), getMsRunIds(), and msRunReaderSp().
|
private |
Definition at line 90 of file msfileaccessor.h.
Referenced by buildTimsMsRunReaderMs2SPtr(), getFileName(), getMsRunIds(), getMsRunReaderSPtrByRunId(), and msRunReaderSp().
|
private |
Definition at line 99 of file msfileaccessor.h.
Referenced by buildTimsMsRunReaderMs2SPtr(), getFileReaderType(), getMsRunIds(), and getPreferedFileReaderType().
|
private |
Definition at line 101 of file msfileaccessor.h.
Referenced by getMsRunIds(), getPreferedFileReaderType(), and setPreferedFileReaderType().
|
private |
Definition at line 94 of file msfileaccessor.h.
Referenced by buildTimsMsRunReaderMs2SPtr(), and getMsRunIds().