Skip to content
Snippets Groups Projects
Commit 2897519a authored by Langella Olivier's avatar Langella Olivier
Browse files

important bug fix : no tims preset does not mean that tandem preset file is wrong

parent 5e243621
No related branches found
No related tags found
No related merge requests found
......@@ -28,6 +28,7 @@
#include "tandembatchprocess.h"
#include <QProcess>
#include <pappsomspp/pappsoexception.h>
#include <pappsomspp/exception/exceptionnotfound.h>
#include <QFileInfo>
#include <QDebug>
#include <QTemporaryDir>
......@@ -182,8 +183,17 @@ TandemBatchProcess::run()
QString("%1").arg(_tandem_run_batch._number_of_threads));
new_parameter_file.setTandemParameters(new_param);
m_centroid_timstof_option =
new_param.getValue("spectrum, timstof MS2 centroid parameters");
try
{
m_centroid_timstof_option =
new_param.getValue("spectrum, timstof MS2 centroid parameters");
}
catch(pappso::ExceptionNotFound &error)
{
// if centroid parameters are not in preset :
// no error has to be sent, this is a normal preset
m_centroid_timstof_option = "";
}
prepareXmlDatabaseFile();
......@@ -281,7 +291,8 @@ TandemBatchProcess::writeXmlInputFile(QXmlStreamWriter *p_out,
p_out->writeAttribute("label", "output, path");
if(mz_file_info.completeSuffix() == "tdf")
{
QString output_name = QFileInfo(mz_file_info.absoluteDir().dirName()).baseName();
QString output_name =
QFileInfo(mz_file_info.absoluteDir().dirName()).baseName();
p_out->writeCharacters(QString("%1/%2.xml")
.arg(_tandem_run_batch._output_directory)
.arg(output_name));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment