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 34 of file msfileaccessor.h.
pappso::MsFileAccessor::MsFileAccessor | ( | const QString & | file_name, |
const QString & | xml_prefix | ||
) |
Definition at line 28 of file msfileaccessor.cpp.
pappso::MsFileAccessor::MsFileAccessor | ( | const MsFileAccessor & | other | ) |
Definition at line 39 of file msfileaccessor.cpp.
|
virtual |
Definition at line 47 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 224 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 230 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 143 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 60 of file msfileaccessor.cpp.
References m_fileFormat.
Referenced by pappso::TandemWrapperRun::convertOrginalMsData2mzXmlData().
const QString & pappso::MsFileAccessor::getFileName | ( | ) | const |
Definition at line 53 of file msfileaccessor.cpp.
References m_fileName.
FileReaderType pappso::MsFileAccessor::getFileReaderType | ( | ) | const |
get the file reader type
Definition at line 329 of file msfileaccessor.cpp.
References m_fileReaderType.
std::vector< MsRunIdCstSPtr > pappso::MsFileAccessor::getMsRunIds | ( | ) |
Definition at line 67 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 278 of file msfileaccessor.cpp.
References getMsRunIds(), m_fileName, msRunReaderSp(), and pappso::MsRunId::setXmlId().
MsRunReaderSPtr pappso::MsFileAccessor::msRunReaderSp | ( | MsRunIdCstSPtr | ms_run_id | ) |
Definition at line 175 of file msfileaccessor.cpp.
References m_fileFormat, m_fileName, m_fileReaderType, pappso::pwiz, pappso::tims, 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 316 of file msfileaccessor.cpp.
References m_preferedFileReaderTypeMap.
Referenced by pappso::TandemWrapperRun::convertOrginalMsData2mzXmlData().
|
private |
Definition at line 103 of file msfileaccessor.h.
Referenced by buildTimsMsRunReaderMs2SPtr(), getFileFormat(), getMsRunIds(), and msRunReaderSp().
|
private |
Definition at line 97 of file msfileaccessor.h.
Referenced by buildTimsMsRunReaderMs2SPtr(), getFileName(), getMsRunIds(), getMsRunReaderSPtrByRunId(), and msRunReaderSp().
|
private |
Definition at line 106 of file msfileaccessor.h.
Referenced by buildTimsMsRunReaderMs2SPtr(), getFileReaderType(), getMsRunIds(), and msRunReaderSp().
|
private |
Definition at line 108 of file msfileaccessor.h.
Referenced by getMsRunIds(), and setPreferedFileReaderType().
|
private |
Definition at line 101 of file msfileaccessor.h.
Referenced by buildTimsMsRunReaderMs2SPtr(), and getMsRunIds().