libpappsomspp
Library for mass spectrometry
pappso::TandemWrapperRun Class Reference

#include <tandemwrapperrun.h>

Inheritance diagram for pappso::TandemWrapperRun:

Signals

void tandemProgressMessage (QString message)
 

Public Member Functions

 TandemWrapperRun (const QString &tandem_binary, const QString &tmp_dir)
 prepare a tandem run More...
 
void run (UiMonitorInterface &monitor, const QString &tandem_input_file)
 run a tandem job More...
 
void readTandemPresetFile (const QString &tandem_preset_file)
 
QString getMs2FilterSuiteString () 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)
 
const QString checkXtandemVersion (const QString &tandem_bin_path)
 
void wrapTandemInputFile (const QString &tandem_input_file)
 
bool convertOrginalMsData2mzXmlData (const QString &origin, const QString &target)
 
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

UiMonitorInterfacemp_monitor
 
QString m_tandemBinary
 
QString m_tandemVersion
 
QString m_tmpDir
 
int m_maxTandemRunTimeMs
 
QProcess * m_xtProcess = nullptr
 
std::shared_ptr< FilterSuiteStringmsp_ms2FilterSuiteString = nullptr
 
QTemporaryDir * mpa_temporaryDirectory = nullptr
 
bool m_convertMzDataUsingSpectrumIndex = false
 
pappso::MzFormat m_mzFormat = pappso::MzFormat::unknown
 
qint64 m_conversionTime =0
 

Detailed Description

Definition at line 61 of file tandemwrapperrun.h.

Constructor & Destructor Documentation

◆ TandemWrapperRun()

pappso::TandemWrapperRun::TandemWrapperRun ( const QString &  tandem_binary,
const QString &  tmp_dir 
)

prepare a tandem run

Parameters
tandem_binaryfile path to tandem.exe if not set, a default value is given in QSettings
tmp_dirtemporary directory, where to write mzXML file conversion if not set, a default value is given in QSettings

Definition at line 48 of file tandemwrapperrun.cpp.

50 {
51 
52  setTandemBinaryPath(tandem_binary);
53 
54  if(!tmp_dir.isEmpty())
55  {
56  mpa_temporaryDirectory = new QTemporaryDir(tmp_dir + "/xtpwrp");
57  }
58  else
59  {
60  mpa_temporaryDirectory = new QTemporaryDir(QDir::tempPath() + "/xtpwrp");
61  }
62  mpa_temporaryDirectory->setAutoRemove(true);
63  if(!mpa_temporaryDirectory->isValid())
64  {
66  QObject::tr("ERROR: unable to create temporary directory %1\n Please "
67  "check file system permissions")
68  .arg(mpa_temporaryDirectory->path()));
69  }
70 }
QTemporaryDir * mpa_temporaryDirectory
void setTandemBinaryPath(const QString &tandem_binary_path)

References mpa_temporaryDirectory, and setTandemBinaryPath().

◆ ~TandemWrapperRun()

pappso::TandemWrapperRun::~TandemWrapperRun ( )

Destructor

Definition at line 72 of file tandemwrapperrun.cpp.

73 {
74  if(mpa_temporaryDirectory != nullptr)
75  {
77  }
78 
79  if(m_xtProcess != nullptr)
80  {
81  m_xtProcess->deleteLater();
82  }
83 }

References m_xtProcess, and mpa_temporaryDirectory.

Member Function Documentation

◆ checkXtandemVersion()

const QString pappso::TandemWrapperRun::checkXtandemVersion ( const QString &  tandem_bin_path)
private

Definition at line 106 of file tandemwrapperrun.cpp.

107 {
108  qDebug();
109  // check tandem path
110  QFileInfo tandem_exe(tandem_bin_path);
111  if(!tandem_exe.exists())
112  {
113  // dir.path() returns the unique directory path
115  QObject::tr(
116  "X!Tandem software not found at %1.\nPlease check the X!Tandem "
117  "installation on your computer and set tandem.exe path.")
118  .arg(tandem_exe.absoluteFilePath()));
119  }
120  if(!tandem_exe.isReadable())
121  {
122  // dir.path() returns the unique directory path
124  QObject::tr("Please check permissions on X!Tandem software found at %1 "
125  "(file not readable).")
126  .arg(tandem_exe.absoluteFilePath()));
127  }
128  if(!tandem_exe.isExecutable())
129  {
130  // dir.path() returns the unique directory path
132  QObject::tr("Please check permissions on X!Tandem software found at %1 "
133  "(file not executable).")
134  .arg(tandem_exe.absoluteFilePath()));
135  }
136 
137 
138  QString version_return;
139  QStringList arguments;
140 
141  arguments << "-v";
142 
143  QProcess *xt_process = new QProcess();
144  // hk_process->setWorkingDirectory(QFileInfo(_hardklor_exe).absolutePath());
145 
146  xt_process->start(tandem_bin_path, arguments);
147 
148  if(!xt_process->waitForStarted())
149  {
151  QObject::tr("X!Tandem %1 process failed to start")
152  .arg(m_tandemVersion));
153  }
154 
155  while(xt_process->waitForReadyRead(1000))
156  {
157  }
158  /*
159  if (!xt_process->waitForFinished(_max_xt_time_ms)) {
160  throw pappso::PappsoException(QObject::tr("can't wait for X!Tandem process
161  to finish : timeout at %1").arg(_max_xt_time_ms));
162  }
163  */
164  QByteArray result = xt_process->readAll();
165 
166 
167  qDebug() << result.constData();
168 
169  // X! TANDEM Jackhammer TPP (2013.06.15.1 - LabKey, Insilicos, ISB)
170 
171  QRegExp parse_version("(.*) TANDEM ([A-Z,a-z, ]+) \\(([^ ,^\\)]*)(.*)");
172  qDebug() << parse_version;
173  // Pattern patt = Pattern.compile("X! TANDEM [A-Z]+ \\‍((.*)\\‍)",
174  // Pattern.CASE_INSENSITIVE);
175 
176  if(parse_version.exactMatch(result.constData()))
177  {
178  version_return = QString("X!Tandem %1 %2")
179  .arg(parse_version.capturedTexts()[2])
180  .arg(parse_version.capturedTexts()[3]); //.join(" ");
181  }
182  else
183  {
185  QObject::tr("This executable %1 may not be a valid X!Tandem software. "
186  "Please check your X!Tandem installation.")
187  .arg(tandem_bin_path));
188  }
189 
190  QProcess::ExitStatus Status = xt_process->exitStatus();
191  delete xt_process;
192  if(Status != 0)
193  {
194  // != QProcess::NormalExit
196  QObject::tr("error executing X!Tandem Status != 0 : %1 %2\n%3")
197  .arg(tandem_bin_path)
198  .arg(arguments.join(" ").arg(result.data())));
199  }
200  qDebug();
201  return version_return;
202 }

References m_tandemVersion.

Referenced by setTandemBinaryPath().

◆ convertOrginalMsData2mzXmlData()

bool pappso::TandemWrapperRun::convertOrginalMsData2mzXmlData ( const QString &  origin,
const QString &  target 
)
private

Definition at line 422 of file tandemwrapperrun.cpp.

424 {
425  qDebug();
426  pappso::MsFileAccessor origin_access(origin, "runa1");
427  origin_access.setPreferedFileReaderType(pappso::MzFormat::brukerTims,
429  origin_access.getMsRunIds();
430  m_mzFormat = origin_access.getFileFormat();
431 
432  if(origin_access.getFileFormat() == pappso::MzFormat::brukerTims)
433  {
435  }
436 
437  if((origin_access.getFileFormat() == pappso::MzFormat::mzML) ||
438  (origin_access.getFileFormat() == pappso::MzFormat::brukerTims))
439  {
441  QObject::tr("Converting %1 to mzXML %2").arg(origin).arg(target));
442  pappso::MsRunReaderSPtr p_reader;
443  p_reader =
444  origin_access.msRunReaderSp(origin_access.getMsRunIds().front());
445 
446  pappso::TimsMsRunReaderMs2 *tims2_reader =
447  dynamic_cast<pappso::TimsMsRunReaderMs2 *>(p_reader.get());
448  if(tims2_reader != nullptr)
449  {
450  qDebug();
451  tims2_reader->setMs2BuiltinCentroid(true);
452 
453  if(msp_ms2FilterSuiteString != nullptr)
454  {
456  }
457  qDebug();
458  }
459 
460 
461  pappso::MzxmlOutput *p_mzxml_output;
462  QFile output_file(target);
463  // qDebug() << " TsvDirectoryWriter::writeSheet " <<
464  // QFileInfo(*_p_ofile).absoluteFilePath();
465  if(output_file.open(QIODevice::WriteOnly))
466  {
467  QElapsedTimer timer;
468  m_conversionTime = 0;
469  timer.start();
470  p_mzxml_output = new pappso::MzxmlOutput(
471  *mp_monitor, QTextStream(&output_file).device());
472 
473  p_mzxml_output->maskMs1(true);
474 
475  p_mzxml_output->setReadAhead(true);
476 
477  p_mzxml_output->write(p_reader.get());
478 
479  p_mzxml_output->close();
480 
481  delete p_mzxml_output;
482  m_conversionTime = timer.elapsed();
483 
484  mp_monitor->setStatus(QObject::tr("Conversion finished in %1 seconds")
485  .arg(m_conversionTime / 1000));
486  }
487  else
488  {
490  QObject::tr("unable to write into %1 mzXML output file")
491  .arg(target));
492  }
493 
494  qDebug();
495  return true;
496  }
497  else
498  { // other mz data formats
499  return false;
500  }
501  return true;
502 }
void setReadAhead(bool read_ahead)
Definition: mzxmloutput.cpp:93
void write(MsRunReader *p_msrunreader)
Definition: mzxmloutput.cpp:98
void maskMs1(bool mask_ms1)
pappso::MzFormat m_mzFormat
UiMonitorInterface * mp_monitor
std::shared_ptr< FilterSuiteString > msp_ms2FilterSuiteString
void setMs2FilterCstSPtr(pappso::FilterInterfaceCstSPtr filter)
void setMs2BuiltinCentroid(bool centroid)
enable or disable simple centroid filter on raw tims data for MS2
virtual void setStatus(const QString &status)=0
current status of the process
std::shared_ptr< MsRunReader > MsRunReaderSPtr
Definition: msrunreader.h:184

References pappso::brukerTims, pappso::MzxmlOutput::close(), pappso::MsFileAccessor::getFileFormat(), pappso::MsFileAccessor::getMsRunIds(), m_conversionTime, m_convertMzDataUsingSpectrumIndex, m_mzFormat, pappso::MzxmlOutput::maskMs1(), mp_monitor, msp_ms2FilterSuiteString, pappso::MsFileAccessor::msRunReaderSp(), pappso::mzML, pappso::TimsMsRunReaderMs2::setMs2BuiltinCentroid(), pappso::TimsMsRunReaderMs2::setMs2FilterCstSPtr(), pappso::MsFileAccessor::setPreferedFileReaderType(), pappso::MzxmlOutput::setReadAhead(), pappso::UiMonitorInterface::setStatus(), pappso::tims_ms2, and pappso::MzxmlOutput::write().

Referenced by wrapTandemInputFile().

◆ getMs2FilterSuiteString()

QString pappso::TandemWrapperRun::getMs2FilterSuiteString ( ) const

gets the list of filters used on MS2 spectrum

Returns
string describing filters and associated parameters

Definition at line 583 of file tandemwrapperrun.cpp.

584 {
585  if(msp_ms2FilterSuiteString == nullptr)
586  return "";
587  return msp_ms2FilterSuiteString.get()->toString();
588 }

References msp_ms2FilterSuiteString.

Referenced by writeFinalTandemOutput().

◆ readTandemPresetFile()

void pappso::TandemWrapperRun::readTandemPresetFile ( const QString &  tandem_preset_file)

Definition at line 282 of file tandemwrapperrun.cpp.

283 {
284  // get number of threads and centroid parameters from tandem preset
285 
286  XtandemPresetReader preset_handler;
287 
288 
289  if(preset_handler.readFile(tandem_preset_file))
290  {
291 
292  int ideal_number_of_thread = QThread::idealThreadCount();
293  int cpu_number = preset_handler.getNumberOfThreads();
294  qDebug() << " cpu_number=" << cpu_number;
295  // QThreadPool::globalInstance()->setMaxThreadCount(1);
296  if(cpu_number > ideal_number_of_thread)
297  {
298  cpu_number = ideal_number_of_thread;
299  }
300  else
301  {
302  if(cpu_number > 0)
303  {
304  QThreadPool::globalInstance()->setMaxThreadCount(cpu_number);
305 
306  qDebug() << " maxThreadCount="
307  << QThreadPool::globalInstance()->maxThreadCount();
308  }
309  }
310 
311  QString ms2_filters_str = preset_handler.getMs2FiltersOptions();
312  if(!ms2_filters_str.isEmpty())
313  {
315  std::make_shared<pappso::FilterSuiteString>(ms2_filters_str);
316  }
317  else
318  {
320  std::make_shared<pappso::FilterSuiteString>(
321  "chargeDeconvolution|0.02dalton mzExclusion|0.01dalton");
322  }
323  }
324  else
325  {
327  QObject::tr("Error reading %1 X!Tandem preset file :\n %2")
328  .arg(tandem_preset_file)
329  .arg(preset_handler.errorString()));
330  }
331 }

References pappso::XmlStreamReaderInterface::errorString(), pappso::XtandemPresetReader::getMs2FiltersOptions(), pappso::XtandemPresetReader::getNumberOfThreads(), msp_ms2FilterSuiteString, and pappso::XmlStreamReaderInterface::readFile().

Referenced by wrapTandemInputFile().

◆ readyReadStandardError

void pappso::TandemWrapperRun::readyReadStandardError ( )
privateslot

Definition at line 226 of file tandemwrapperrun.cpp.

227 {
228  mp_monitor->appendText(m_xtProcess->readAllStandardError());
229  if(mp_monitor->shouldIstop())
230  {
231  m_xtProcess->kill();
232  delete m_xtProcess;
233  m_xtProcess = nullptr;
235  QObject::tr("X!Tandem stopped by the user"));
236  }
237 }
virtual void appendText(const QString &text)=0
append a text to a long report
virtual bool shouldIstop()=0
should the procces be stopped ? If true, then cancel process Use this function at strategic point of ...

References pappso::UiMonitorInterface::appendText(), m_xtProcess, mp_monitor, and pappso::UiMonitorInterface::shouldIstop().

Referenced by runTandem().

◆ readyReadStandardOutput

void pappso::TandemWrapperRun::readyReadStandardOutput ( )
privateslot

Definition at line 205 of file tandemwrapperrun.cpp.

206 {
207  QString message(m_xtProcess->readAllStandardOutput());
208  mp_monitor->appendText(message);
209 
210  if(message.toLower().contains("error"))
211  {
212  throw pappso::XtandemError(message);
213  }
214 
215  if(mp_monitor->shouldIstop())
216  {
217  m_xtProcess->kill();
218  delete m_xtProcess;
219  m_xtProcess = nullptr;
221  QObject::tr("X!Tandem stopped by the user"));
222  }
223 }

References pappso::UiMonitorInterface::appendText(), m_xtProcess, mp_monitor, and pappso::UiMonitorInterface::shouldIstop().

Referenced by runTandem().

◆ run()

void pappso::TandemWrapperRun::run ( UiMonitorInterface monitor,
const QString &  tandem_input_file 
)

run a tandem job

The tandem input file should contain an additional input parameter called "spectrum, timstof MS2 filters". The value of this parameters must contain a string describing the FilterSuiteString to apply on TimsTOF MS2. A default value of "chargeDeconvolution|0.02dalton" is recommended for this additional tandem input parameter

Parameters
monitoruser interface monitor
tandem_input_filetandem xml input file

Definition at line 505 of file tandemwrapperrun.cpp.

507 {
508  mp_monitor = &monitor;
509 
510  wrapTandemInputFile(tandem_input_file);
511  mp_monitor = nullptr;
512 }
void wrapTandemInputFile(const QString &tandem_input_file)

References mp_monitor, and wrapTandemInputFile().

◆ runTandem()

void pappso::TandemWrapperRun::runTandem ( const QString &  tandem_input_file)
private

run a tandem job

Parameters
tandem_input_filetandem xml input file

Definition at line 514 of file tandemwrapperrun.cpp.

515 {
516  if(mp_monitor->shouldIstop())
517  {
519  QObject::tr("X!Tandem stopped by the user processing on file %1")
520  .arg(tandem_input_file));
521  }
522  m_xtProcess = new QProcess();
523  QStringList arguments;
524 
525  qDebug() << m_tandemBinary << " " << m_xtProcess->arguments();
526 
527  arguments << tandem_input_file;
528  // hk_process->setWorkingDirectory(QFileInfo(_hardklor_exe).absolutePath());
529  m_xtProcess->start(m_tandemBinary, arguments);
530 
531  qDebug() << m_tandemBinary << " " << m_xtProcess->arguments();
532 
533  connect(m_xtProcess,
534  &QProcess::readyReadStandardOutput,
535  this,
537  connect(m_xtProcess,
538  &QProcess::readyReadStandardError,
539  this,
541 
542 
543  qDebug() << m_tandemBinary << " " << m_xtProcess->arguments();
544 
545  mp_monitor->setStatus(QObject::tr("Running X!Tandem"));
546 
547  if(!m_xtProcess->waitForStarted())
548  {
550  QObject::tr("X!Tandem process failed to start"));
551  }
552 
553  qDebug() << m_tandemBinary << " " << m_xtProcess->arguments();
554  while(m_xtProcess->waitForFinished(m_maxTandemRunTimeMs) == false)
555  {
556  //_p_monitor->appendText(xt_process->readAll().data());
557  // data.append(xt_process->readAll());
558  if(mp_monitor->shouldIstop())
559  {
560  m_xtProcess->kill();
561  delete m_xtProcess;
562  m_xtProcess = nullptr;
564  QObject::tr("X!Tandem stopped by the user processing on file %1")
565  .arg(tandem_input_file));
566  }
567  }
568 
569  QProcess::ExitStatus Status = m_xtProcess->exitStatus();
570 
571  delete m_xtProcess;
572  if(Status != QProcess::ExitStatus::NormalExit)
573  {
574  // != QProcess::NormalExit
576  QObject::tr("error executing X!Tandem Status != 0 : %1")
577  .arg(m_tandemBinary));
578  }
579  m_xtProcess = nullptr;
580 }

References m_maxTandemRunTimeMs, m_tandemBinary, m_xtProcess, mp_monitor, readyReadStandardError(), readyReadStandardOutput(), pappso::UiMonitorInterface::setStatus(), and pappso::UiMonitorInterface::shouldIstop().

Referenced by wrapTandemInputFile().

◆ setTandemBinaryPath()

void pappso::TandemWrapperRun::setTandemBinaryPath ( const QString &  tandem_binary_path)
private

Definition at line 86 of file tandemwrapperrun.cpp.

87 {
88 
89 
90  m_tandemBinary = tandem_binary_path;
91  QSettings settings;
92  if(m_tandemBinary.isEmpty())
93  {
95  settings.value("path/tandem_binary", "/usr/bin/tandem").toString();
96  }
97  // check for tandem executable
99 
100  qDebug() << m_tandemVersion;
101  settings.setValue("path/tandem_binary", m_tandemBinary);
102 }
const QString checkXtandemVersion(const QString &tandem_bin_path)

References checkXtandemVersion(), m_tandemBinary, and m_tandemVersion.

Referenced by TandemWrapperRun().

◆ tandemProgressMessage

void pappso::TandemWrapperRun::tandemProgressMessage ( QString  message)
signal

◆ wrapTandemInputFile()

void pappso::TandemWrapperRun::wrapTandemInputFile ( const QString &  tandem_input_file)
private

Definition at line 335 of file tandemwrapperrun.cpp.

336 {
337  // read original tandem input file
338  // store original ms data file name
339  // create new mzXML data file in temporary directory
340  // create new tandem input file based on new mzXML file
341 
342 
343  QString mzxml_data_file_name =
344  mpa_temporaryDirectory->filePath("msdata.mzxml");
345  QString wrapped_tandem_input =
346  mpa_temporaryDirectory->filePath("input_tandem.xml");
347  QString wrapped_tandem_output =
348  mpa_temporaryDirectory->filePath("output_tandem.xml");
349 
350  WrapTandemInput wrap_tandem_input(
351  mzxml_data_file_name, wrapped_tandem_input, wrapped_tandem_output);
352 
353 
354  if(wrap_tandem_input.readFile(tandem_input_file))
355  {
356  }
357  else
358  {
360  QObject::tr("Error reading %1 X!Tandem input file :\n %2")
361  .arg(tandem_input_file)
362  .arg(wrap_tandem_input.errorString()));
363  }
364 
365 
366  /*
367  *
368  XtandemInputSaxHandler wrap_input(
369  mzxml_data_file_name, wrapped_tandem_input, wrapped_tandem_output);
370  QFile qfile(tandem_input_file);
371  if(!qfile.exists())
372  {
373  throw pappso::PappsoException(
374  QObject::tr("Tandem input file %1 does not exists")
375  .arg(QFileInfo(tandem_input_file).absoluteFilePath()));
376  }
377  QXmlInputSource xmlInputSource(&qfile);
378  QXmlSimpleReader simplereader;
379  simplereader.setContentHandler(&wrap_input);
380  simplereader.setErrorHandler(&wrap_input);
381 
382  if(simplereader.parse(xmlInputSource))
383  {
384  }
385  else
386  {
387  throw pappso::PappsoException(
388  QObject::tr("Error reading %1 X!Tandem input file :\n %2")
389  .arg(tandem_input_file)
390  .arg(wrap_input.errorString()));
391  }
392 */
393  // get number of threads and centroid parameters from tandem preset
394  readTandemPresetFile(wrap_tandem_input.getOriginalTandemPresetFileName());
395 
396 
397  // convert to mzXML
398  QString original_msdata_file_name =
399  wrap_tandem_input.getOriginalMsDataFileName();
400  if(convertOrginalMsData2mzXmlData(original_msdata_file_name,
401  mzxml_data_file_name))
402  {
403 
404 
405  // launch tandem
406  runTandem(wrapped_tandem_input);
407 
408  // rewrite tandem result file
410  wrapped_tandem_output,
411  wrap_tandem_input.getOriginalTandemOutputFileName(),
412  original_msdata_file_name);
413  }
414  else
415  {
416  // launch tandem on original file
417  runTandem(tandem_input_file);
418  }
419 }
bool convertOrginalMsData2mzXmlData(const QString &origin, const QString &target)
void readTandemPresetFile(const QString &tandem_preset_file)
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 centro...
void runTandem(const QString &tandem_input_file)
run a tandem job

References convertOrginalMsData2mzXmlData(), pappso::XmlStreamReaderInterface::errorString(), pappso::WrapTandemInput::getOriginalMsDataFileName(), pappso::WrapTandemInput::getOriginalTandemOutputFileName(), pappso::WrapTandemInput::getOriginalTandemPresetFileName(), mpa_temporaryDirectory, pappso::XmlStreamReaderInterface::readFile(), readTandemPresetFile(), runTandem(), and writeFinalTandemOutput().

Referenced by run().

◆ writeFinalTandemOutput()

void pappso::TandemWrapperRun::writeFinalTandemOutput ( const QString &  tmp_tandem_output,
const QString &  final_tandem_output,
const QString &  original_msdata_file_name 
)
private

tandem output modification tandem output is modified to contain the Bruker's file as input and centroidization parameters

Parameters
tmp_tandem_outputraw tandem output filename
final_tandem_outputfinal destination file for modified tandem output

Definition at line 240 of file tandemwrapperrun.cpp.

244 {
245  mp_monitor->setStatus(QObject::tr("Rewriting X!Tandem XML result file"));
246 
247  WrapTandemResults wrap_output(final_tandem_output, original_msdata_file_name);
248 
249  wrap_output.setInputParameters("spectrum, timstof MS2 filters",
251  wrap_output.setInputParameters("spectrum, mzFormat",
252  QString("%1").arg((int)m_mzFormat));
253 
255  {
256  wrap_output.setInputParameters("output, spectrum index", "true");
257  }
258  else
259  {
260  }
261 
262  if(m_conversionTime != 0)
263  {
264  wrap_output.setInputParameters(
265  "timing, tandemwrapper conversion time (sec)",
266  QString("%1").arg(m_conversionTime / 1000));
267  }
268 
269  if(wrap_output.readFile(tmp_tandem_output))
270  {
271  }
272  else
273  {
275  QObject::tr("Error reading %1 X!Tandem output file :\n %2")
276  .arg(tmp_tandem_output)
277  .arg(wrap_output.errorString()));
278  }
279 }
QString getMs2FilterSuiteString() const
gets the list of filters used on MS2 spectrum

References pappso::XmlStreamReaderInterface::errorString(), getMs2FilterSuiteString(), m_conversionTime, m_convertMzDataUsingSpectrumIndex, m_mzFormat, mp_monitor, pappso::XmlStreamReaderInterface::readFile(), pappso::WrapTandemResults::setInputParameters(), and pappso::UiMonitorInterface::setStatus().

Referenced by wrapTandemInputFile().

Member Data Documentation

◆ m_conversionTime

qint64 pappso::TandemWrapperRun::m_conversionTime =0
private

Definition at line 150 of file tandemwrapperrun.h.

Referenced by convertOrginalMsData2mzXmlData(), and writeFinalTandemOutput().

◆ m_convertMzDataUsingSpectrumIndex

bool pappso::TandemWrapperRun::m_convertMzDataUsingSpectrumIndex = false
private

Definition at line 146 of file tandemwrapperrun.h.

Referenced by convertOrginalMsData2mzXmlData(), and writeFinalTandemOutput().

◆ m_maxTandemRunTimeMs

int pappso::TandemWrapperRun::m_maxTandemRunTimeMs
private
Initial value:
=
1000

Definition at line 138 of file tandemwrapperrun.h.

Referenced by runTandem().

◆ m_mzFormat

pappso::MzFormat pappso::TandemWrapperRun::m_mzFormat = pappso::MzFormat::unknown
private

Definition at line 148 of file tandemwrapperrun.h.

Referenced by convertOrginalMsData2mzXmlData(), and writeFinalTandemOutput().

◆ m_tandemBinary

QString pappso::TandemWrapperRun::m_tandemBinary
private

Definition at line 135 of file tandemwrapperrun.h.

Referenced by runTandem(), and setTandemBinaryPath().

◆ m_tandemVersion

QString pappso::TandemWrapperRun::m_tandemVersion
private

Definition at line 136 of file tandemwrapperrun.h.

Referenced by checkXtandemVersion(), and setTandemBinaryPath().

◆ m_tmpDir

QString pappso::TandemWrapperRun::m_tmpDir
private

Definition at line 137 of file tandemwrapperrun.h.

◆ m_xtProcess

QProcess* pappso::TandemWrapperRun::m_xtProcess = nullptr
private

◆ mp_monitor

UiMonitorInterface* pappso::TandemWrapperRun::mp_monitor
private

◆ mpa_temporaryDirectory

QTemporaryDir* pappso::TandemWrapperRun::mpa_temporaryDirectory = nullptr
private

Definition at line 144 of file tandemwrapperrun.h.

Referenced by TandemWrapperRun(), ~TandemWrapperRun(), and wrapTandemInputFile().

◆ msp_ms2FilterSuiteString

std::shared_ptr<FilterSuiteString> pappso::TandemWrapperRun::msp_ms2FilterSuiteString = nullptr
private

The documentation for this class was generated from the following files: