libpappsomspp
Library for mass spectrometry
|
#include <tandemwrapperrun.h>
Public Member Functions | |
TandemWrapperRun (const QString &tandem_binary, const QString &tmp_dir) | |
prepare a tandem run More... | |
void | run (const QString &tandem_input_file, QTextStream &output_stream, QTextStream &error_stream) |
run a tandem job More... | |
void | readTandemPresetFile (const QString &tandem_preset_file) |
void | setMs2FilterSuite (const std::shared_ptr< FilterSuite > ms2filter) |
sets optional filters to use on MS2 spectrum More... | |
std::shared_ptr< FilterSuite > | getMs2FilterSuite () const |
gets the list of filters used on MS2 spectrum More... | |
~TandemWrapperRun () | |
Private Slots | |
void | readyReadStandardOutput () |
void | readyReadStandardError () |
Private Member Functions | |
void | setTandemBinaryPath (const QString &tandem_binary_path) |
bool | shouldIstop () |
const QString | checkXtandemVersion (const QString &tandem_bin_path) |
void | wrapTandemInputFile (const QString &tandem_input_file) |
void | convertOrginalMsData2mzXmlData (const QString &origin, const QString &target) const |
void | runTandem (const QString &tandem_input_file) |
run a tandem job More... | |
void | writeFinalTandemOutput (const QString &tmp_tandem_output, const QString &final_tandem_output, const QString &original_msdata_file_name) |
tandem output modification tandem output is modified to contain the Bruker's file as input and centroidization parameters More... | |
Private Attributes | |
QString | m_tandemBinary |
QString | m_tandemVersion |
QString | m_tmpDir |
int | m_maxTandemRunTimeMs = (60000 * 60 * 24) |
QProcess * | m_xtProcess = nullptr |
std::shared_ptr< FilterSuite > | msp_ms2FilterSuite |
QTextStream * | mp_outputStream = nullptr |
QTextStream * | mp_errorStream = nullptr |
QTemporaryDir * | mpa_temporaryDirectory = nullptr |
Definition at line 43 of file tandemwrapperrun.h.
pappso::TandemWrapperRun::TandemWrapperRun | ( | const QString & | tandem_binary, |
const QString & | tmp_dir | ||
) |
prepare a tandem run
tandem_binary | file path to tandem.exe if not set, a default value is given in QSettings |
tmp_dir | temporary directory, where to write mzXML file conversion if not set, a default value is given in QSettings |
Definition at line 47 of file tandemwrapperrun.cpp.
References mpa_temporaryDirectory, and setTandemBinaryPath().
pappso::TandemWrapperRun::~TandemWrapperRun | ( | ) |
|
private |
Definition at line 100 of file tandemwrapperrun.cpp.
References m_tandemVersion.
Referenced by setTandemBinaryPath().
|
private |
Definition at line 348 of file tandemwrapperrun.cpp.
References pappso::MzxmlOutput::close(), pappso::PrecisionFactory::getDaltonInstance(), pappso::MsFileAccessor::getMsRunIds(), pappso::MzxmlOutput::maskMs1(), msp_ms2FilterSuite, pappso::MsFileAccessor::msRunReaderSp(), pappso::pwiz, pappso::TimsMsRunReaderMs2::setMs2FilterCstSPtr(), pappso::MsFileAccessor::setPreferedFileReaderType(), pappso::MzxmlOutput::setReadAhead(), and pappso::MzxmlOutput::write().
Referenced by wrapTandemInputFile().
std::shared_ptr< FilterSuite > pappso::TandemWrapperRun::getMs2FilterSuite | ( | ) | const |
gets the list of filters used on MS2 spectrum
Definition at line 493 of file tandemwrapperrun.cpp.
References msp_ms2FilterSuite.
void pappso::TandemWrapperRun::readTandemPresetFile | ( | const QString & | tandem_preset_file | ) |
Definition at line 249 of file tandemwrapperrun.cpp.
References pappso::XtandemPresetSaxHandler::errorString(), and pappso::XtandemPresetSaxHandler::getNumberOfThreads().
Referenced by wrapTandemInputFile().
|
privateslot |
Definition at line 214 of file tandemwrapperrun.cpp.
References m_xtProcess, and mp_errorStream.
Referenced by runTandem().
|
privateslot |
Definition at line 207 of file tandemwrapperrun.cpp.
References m_xtProcess, and mp_outputStream.
Referenced by runTandem().
void pappso::TandemWrapperRun::run | ( | const QString & | tandem_input_file, |
QTextStream & | output_stream, | ||
QTextStream & | error_stream | ||
) |
run a tandem job
tandem_input_file | tandem xml input file |
output_stream | standard output where to write tandem stdout |
error_stream | standard error where to write tandem stderr |
Definition at line 412 of file tandemwrapperrun.cpp.
References mp_errorStream, mp_outputStream, and wrapTandemInputFile().
|
private |
run a tandem job
tandem_input_file | tandem xml input file |
Definition at line 424 of file tandemwrapperrun.cpp.
References m_maxTandemRunTimeMs, m_tandemBinary, m_xtProcess, readyReadStandardError(), readyReadStandardOutput(), and shouldIstop().
Referenced by wrapTandemInputFile().
void pappso::TandemWrapperRun::setMs2FilterSuite | ( | const std::shared_ptr< FilterSuite > | ms2filter | ) |
sets optional filters to use on MS2 spectrum
ms2filter | vector of filters applied on MS2 spectrums |
Definition at line 486 of file tandemwrapperrun.cpp.
References msp_ms2FilterSuite.
|
private |
Definition at line 80 of file tandemwrapperrun.cpp.
References checkXtandemVersion(), m_tandemBinary, and m_tandemVersion.
Referenced by TandemWrapperRun().
|
private |
Definition at line 200 of file tandemwrapperrun.cpp.
Referenced by runTandem().
|
private |
Definition at line 294 of file tandemwrapperrun.cpp.
References convertOrginalMsData2mzXmlData(), pappso::XtandemInputSaxHandler::errorString(), pappso::XtandemInputSaxHandler::getOriginalMsDataFileName(), pappso::XtandemInputSaxHandler::getOriginalTandemOutputFileName(), pappso::XtandemInputSaxHandler::getOriginalTandemPresetFileName(), mpa_temporaryDirectory, readTandemPresetFile(), runTandem(), and writeFinalTandemOutput().
Referenced by run().
|
private |
tandem output modification tandem output is modified to contain the Bruker's file as input and centroidization parameters
tmp_tandem_output | raw tandem output filename |
final_tandem_output | final destination file for modified tandem output |
Definition at line 221 of file tandemwrapperrun.cpp.
References pappso::XtandemOutputSaxHandler::errorString().
Referenced by wrapTandemInputFile().
|
private |
Definition at line 119 of file tandemwrapperrun.h.
Referenced by runTandem().
|
private |
Definition at line 116 of file tandemwrapperrun.h.
Referenced by runTandem(), and setTandemBinaryPath().
|
private |
Definition at line 117 of file tandemwrapperrun.h.
Referenced by checkXtandemVersion(), and setTandemBinaryPath().
|
private |
Definition at line 118 of file tandemwrapperrun.h.
|
private |
Definition at line 120 of file tandemwrapperrun.h.
Referenced by readyReadStandardError(), readyReadStandardOutput(), and runTandem().
|
private |
Definition at line 126 of file tandemwrapperrun.h.
Referenced by readyReadStandardError(), and run().
|
private |
Definition at line 125 of file tandemwrapperrun.h.
Referenced by readyReadStandardOutput(), and run().
|
private |
Definition at line 128 of file tandemwrapperrun.h.
Referenced by TandemWrapperRun(), ~TandemWrapperRun(), and wrapTandemInputFile().
|
private |
Definition at line 122 of file tandemwrapperrun.h.
Referenced by convertOrginalMsData2mzXmlData(), getMs2FilterSuite(), and setMs2FilterSuite().