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

more reliable mascot parser

parent fcee11bd
No related branches found
No related tags found
No related merge requests found
...@@ -57,103 +57,177 @@ WorkerThread::WorkerThread(MainWindow *p_main_window) ...@@ -57,103 +57,177 @@ WorkerThread::WorkerThread(MainWindow *p_main_window)
#if QT_VERSION >= 0x050000 #if QT_VERSION >= 0x050000
// Qt5 code // Qt5 code
// worker message // worker message
connect(_p_work_monitor, &WorkMonitor::workerMessage, p_main_window, connect(_p_work_monitor,
&WorkMonitor::workerMessage,
p_main_window,
&MainWindow::doDisplayLoadingMessage); &MainWindow::doDisplayLoadingMessage);
connect(_p_work_monitor, &WorkMonitor::workerMessagePercent, p_main_window, connect(_p_work_monitor,
&WorkMonitor::workerMessagePercent,
p_main_window,
&MainWindow::doDisplayLoadingMessagePercent); &MainWindow::doDisplayLoadingMessagePercent);
connect(_p_work_monitor, &WorkMonitor::workerAppendText, p_main_window, connect(_p_work_monitor,
&WorkMonitor::workerAppendText,
p_main_window,
&MainWindow::doWorkerAppendText); &MainWindow::doWorkerAppendText);
connect(_p_work_monitor, &WorkMonitor::workerSetText, p_main_window, connect(_p_work_monitor,
&WorkMonitor::workerSetText,
p_main_window,
&MainWindow::doWorkerSetText); &MainWindow::doWorkerSetText);
connect(_p_work_monitor, &WorkMonitor::workerJobFinished, p_main_window, connect(_p_work_monitor,
&WorkMonitor::workerJobFinished,
p_main_window,
&MainWindow::doDisplayJobFinished); &MainWindow::doDisplayJobFinished);
connect(p_main_window, &MainWindow::operateXpipFile, this, connect(p_main_window,
&MainWindow::operateXpipFile,
this,
&WorkerThread::doXpipFileLoad); &WorkerThread::doXpipFileLoad);
connect(p_main_window, &MainWindow::operateWritingXpipFile, this, connect(p_main_window,
&MainWindow::operateWritingXpipFile,
this,
&WorkerThread::doWritingXpipFile); &WorkerThread::doWritingXpipFile);
connect(this, &WorkerThread::projectReady, p_main_window, connect(this,
&WorkerThread::projectReady,
p_main_window,
&MainWindow::doProjectReady); &MainWindow::doProjectReady);
connect(this, &WorkerThread::loadingResultsFinished, p_main_window, connect(this,
&WorkerThread::loadingResultsFinished,
p_main_window,
&MainWindow::doLoadingResultsReady); &MainWindow::doLoadingResultsReady);
connect(p_main_window, &MainWindow::operateLoadingResults, this, connect(p_main_window,
&MainWindow::operateLoadingResults,
this,
&WorkerThread::doLoadingResults); &WorkerThread::doLoadingResults);
connect(p_main_window, &MainWindow::operateRunningXtandem, this, connect(p_main_window,
&MainWindow::operateRunningXtandem,
this,
&WorkerThread::doRunningXtandem); &WorkerThread::doRunningXtandem);
connect(this, &WorkerThread::loadingMessage, p_main_window, connect(this,
&WorkerThread::loadingMessage,
p_main_window,
&MainWindow::doDisplayLoadingMessage); &MainWindow::doDisplayLoadingMessage);
connect(this, &WorkerThread::projectNotReady, p_main_window, connect(this,
&WorkerThread::projectNotReady,
p_main_window,
&MainWindow::doProjectNotReady); &MainWindow::doProjectNotReady);
// grouping // grouping
connect(p_main_window, &MainWindow::operateGrouping, this, connect(p_main_window,
&MainWindow::operateGrouping,
this,
&WorkerThread::doGrouping); &WorkerThread::doGrouping);
connect(this, &WorkerThread::groupingFinished, p_main_window, connect(this,
&WorkerThread::groupingFinished,
p_main_window,
&MainWindow::doGroupingFinished); &MainWindow::doGroupingFinished);
// masschroq write // masschroq write
connect(p_main_window, &MainWindow::operateWritingMassChroqFile, this, connect(p_main_window,
&MainWindow::operateWritingMassChroqFile,
this,
&WorkerThread::doWritingMassChroqFile); &WorkerThread::doWritingMassChroqFile);
connect(p_main_window, &MainWindow::operateWritingMassChroqPrmFile, this, connect(p_main_window,
&MainWindow::operateWritingMassChroqPrmFile,
this,
&WorkerThread::doWritingMassChroqPrmFile); &WorkerThread::doWritingMassChroqPrmFile);
connect(p_main_window, &MainWindow::operateWritingMcqrSpectralCountFile, this, connect(p_main_window,
&MainWindow::operateWritingMcqrSpectralCountFile,
this,
&WorkerThread::doWritingMcqrSpectralCountFile); &WorkerThread::doWritingMcqrSpectralCountFile);
// protic write // protic write
connect(p_main_window, &MainWindow::operateWritingProticFile, this, connect(p_main_window,
&MainWindow::operateWritingProticFile,
this,
&WorkerThread::doWritingProticFile); &WorkerThread::doWritingProticFile);
// writing ODS file : // writing ODS file :
connect(p_main_window, &MainWindow::operateWritingOdsFile, this, connect(p_main_window,
&MainWindow::operateWritingOdsFile,
this,
&WorkerThread::doWritingOdsFile); &WorkerThread::doWritingOdsFile);
connect(this, &WorkerThread::operationFailed, p_main_window, connect(this,
&WorkerThread::operationFailed,
p_main_window,
&MainWindow::doOperationFailed); &MainWindow::doOperationFailed);
connect(this, &WorkerThread::operationFinished, p_main_window, connect(this,
&WorkerThread::operationFinished,
p_main_window,
&MainWindow::doOperationFinished); &MainWindow::doOperationFinished);
#else #else
// Qt4 code // Qt4 code
// worker message // worker message
connect(_p_work_monitor, SIGNAL(workerMessage(QString)), p_main_window, connect(_p_work_monitor,
SIGNAL(workerMessage(QString)),
p_main_window,
SLOT(doDisplayLoadingMessage(QString))); SLOT(doDisplayLoadingMessage(QString)));
connect(_p_work_monitor, SIGNAL(workerMessage(QString, int)), p_main_window, connect(_p_work_monitor,
SIGNAL(workerMessage(QString, int)),
p_main_window,
SLOT(doDisplayLoadingMessage(QString, int))); SLOT(doDisplayLoadingMessage(QString, int)));
connect(_p_work_monitor, SIGNAL(workerAppendText(char *)), p_main_window, connect(_p_work_monitor,
SIGNAL(workerAppendText(char *)),
p_main_window,
SLOT(doWorkerAppendText(char *))); SLOT(doWorkerAppendText(char *)));
connect(p_main_window, SIGNAL(operateXpipFile(QString)), this, connect(p_main_window,
SIGNAL(operateXpipFile(QString)),
this,
SLOT(doXpipFileLoad(QString))); SLOT(doXpipFileLoad(QString)));
connect(this, SIGNAL(projectReady(ProjectSp)), p_main_window, connect(this,
SIGNAL(projectReady(ProjectSp)),
p_main_window,
SLOT(doProjectReady(ProjectSp))); SLOT(doProjectReady(ProjectSp)));
connect( connect(
p_main_window, p_main_window,
SIGNAL(operateLoadingResults(bool, AutomaticFilterParameters, QStringList)), SIGNAL(operateLoadingResults(bool, AutomaticFilterParameters, QStringList)),
this, SLOT(doLoadingResults(bool, AutomaticFilterParameters, QStringList))); this,
SLOT(doLoadingResults(bool, AutomaticFilterParameters, QStringList)));
connect(p_main_window, SIGNAL(operateRunningXtandem(TandemRunBatch)), this, connect(p_main_window,
SIGNAL(operateRunningXtandem(TandemRunBatch)),
this,
SLOT(doRunningXtandem(TandemRunBatch))); SLOT(doRunningXtandem(TandemRunBatch)));
connect(this, SIGNAL(loadingMessage(QString)), p_main_window, connect(this,
SIGNAL(loadingMessage(QString)),
p_main_window,
SLOT(doDisplayLoadingMessage(QString))); SLOT(doDisplayLoadingMessage(QString)));
connect(this, SIGNAL(projectNotReady(QString)), p_main_window, connect(this,
SIGNAL(projectNotReady(QString)),
p_main_window,
SLOT(doProjectNotReady(QString))); SLOT(doProjectNotReady(QString)));
// grouping // grouping
connect(p_main_window, SIGNAL(operateGrouping(ProjectSp)), this, connect(p_main_window,
SIGNAL(operateGrouping(ProjectSp)),
this,
SLOT(doGrouping(ProjectSp))); SLOT(doGrouping(ProjectSp)));
connect(this, SIGNAL(groupingFinished()), p_main_window, connect(this,
SIGNAL(groupingFinished()),
p_main_window,
SLOT(doGroupingFinished())); SLOT(doGroupingFinished()));
// masschroq write // masschroq write
connect(p_main_window, connect(p_main_window,
SIGNAL(operateWritingMassChroqFile(QString, ProjectSp)), this, SIGNAL(operateWritingMassChroqFile(QString, ProjectSp)),
this,
SLOT(doWritingMassChroqFile(QString, ProjectSp))); SLOT(doWritingMassChroqFile(QString, ProjectSp)));
// protic write // protic write
connect(p_main_window, SIGNAL(operateWritingProticFile(QString, ProjectSp)), connect(p_main_window,
this, SLOT(doWritingProticFile(QString, ProjectSp))); SIGNAL(operateWritingProticFile(QString, ProjectSp)),
this,
SLOT(doWritingProticFile(QString, ProjectSp)));
// writing ODS file : // writing ODS file :
connect(p_main_window, SIGNAL(operateWritingOdsFile(QString, ProjectSp)), connect(p_main_window,
this, SLOT(doWritingOdsFile(QString, ProjectSp))); SIGNAL(operateWritingOdsFile(QString, ProjectSp)),
connect(this, SIGNAL(operationFailed(QString)), p_main_window, this,
SLOT(doWritingOdsFile(QString, ProjectSp)));
connect(this,
SIGNAL(operationFailed(QString)),
p_main_window,
SLOT(doOperationFailed(QString))); SLOT(doOperationFailed(QString)));
connect(this, SIGNAL(operationFinished()), p_main_window, connect(this,
SIGNAL(operationFinished()),
p_main_window,
SLOT(doOperationFinished())); SLOT(doOperationFinished()));
#endif #endif
...@@ -162,7 +236,7 @@ WorkerThread::WorkerThread(MainWindow *p_main_window) ...@@ -162,7 +236,7 @@ WorkerThread::WorkerThread(MainWindow *p_main_window)
WorkerThread::WorkerThread(ProjectWindow *p_project_window) WorkerThread::WorkerThread(ProjectWindow *p_project_window)
{ {
qDebug() << "WorkerThread::WorkerThread begin ProjectWindow"; qDebug() << __FILE__ << " " << __FUNCTION__ << " " << __LINE__;
_p_work_monitor = new WorkMonitor(); _p_work_monitor = new WorkMonitor();
...@@ -170,62 +244,96 @@ WorkerThread::WorkerThread(ProjectWindow *p_project_window) ...@@ -170,62 +244,96 @@ WorkerThread::WorkerThread(ProjectWindow *p_project_window)
// Qt5 code // Qt5 code
// worker message // worker message
connect(_p_work_monitor, &WorkMonitor::workerMessage, p_project_window, connect(_p_work_monitor,
&WorkMonitor::workerMessage,
p_project_window,
&ProjectWindow::doDisplayLoadingMessage); &ProjectWindow::doDisplayLoadingMessage);
connect(_p_work_monitor, &WorkMonitor::workerMessagePercent, p_project_window, connect(_p_work_monitor,
&WorkMonitor::workerMessagePercent,
p_project_window,
&ProjectWindow::doDisplayLoadingMessagePercent); &ProjectWindow::doDisplayLoadingMessagePercent);
connect(this, &WorkerThread::loadingMessage, p_project_window, connect(this,
&WorkerThread::loadingMessage,
p_project_window,
&ProjectWindow::doDisplayLoadingMessage); &ProjectWindow::doDisplayLoadingMessage);
// grouping // grouping
connect(p_project_window, &ProjectWindow::operateGrouping, this, connect(p_project_window,
&ProjectWindow::operateGrouping,
this,
&WorkerThread::doGrouping); &WorkerThread::doGrouping);
connect(this, &WorkerThread::groupingFinished, p_project_window, connect(this,
&WorkerThread::groupingFinished,
p_project_window,
&ProjectWindow::doGroupingFinished); &ProjectWindow::doGroupingFinished);
// PTM grouping on IdentificationGroup // PTM grouping on IdentificationGroup
connect(p_project_window, &ProjectWindow::operatePtmGroupingOnIdentification, connect(p_project_window,
this, &WorkerThread::doPtmGroupingOnIdentification); &ProjectWindow::operatePtmGroupingOnIdentification,
connect(this, &WorkerThread::ptmGroupingOnIdentificationFinished, this,
p_project_window, &ProjectWindow::refreshPtmGroup); &WorkerThread::doPtmGroupingOnIdentification);
connect(this,
&WorkerThread::ptmGroupingOnIdentificationFinished,
p_project_window,
&ProjectWindow::refreshPtmGroup);
// grouping on IdentificationGroup // grouping on IdentificationGroup
connect(p_project_window, &ProjectWindow::operateGroupingOnIdentification, connect(p_project_window,
this, &WorkerThread::doGroupingOnIdentification); &ProjectWindow::operateGroupingOnIdentification,
connect(this, &WorkerThread::groupingOnIdentificationFinished, this,
p_project_window, &ProjectWindow::refreshGroup); &WorkerThread::doGroupingOnIdentification);
connect(this,
&WorkerThread::groupingOnIdentificationFinished,
p_project_window,
&ProjectWindow::refreshGroup);
connect(this, &WorkerThread::operationFailed, p_project_window, connect(this,
&WorkerThread::operationFailed,
p_project_window,
&ProjectWindow::doOperationFailed); &ProjectWindow::doOperationFailed);
connect(this, &WorkerThread::operationFinished, p_project_window, connect(this,
&WorkerThread::operationFinished,
p_project_window,
&ProjectWindow::doOperationFinished); &ProjectWindow::doOperationFinished);
#else #else
// Qt4 code // Qt4 code
qDebug() << "WorkerThread::WorkerThread Qt4 code"; qDebug() << __FILE__ << " " << __FUNCTION__ << " " << __LINE__;
// worker message // worker message
connect(_p_work_monitor, SIGNAL(workerMessage(QString)), p_project_window, connect(_p_work_monitor,
SIGNAL(workerMessage(QString)),
p_project_window,
SLOT(doDisplayLoadingMessage(QString))); SLOT(doDisplayLoadingMessage(QString)));
connect(_p_work_monitor, SIGNAL(workerMessage(QString, int)), connect(_p_work_monitor,
p_project_window, SLOT(doDisplayLoadingMessage(QString, int))); SIGNAL(workerMessage(QString, int)),
p_project_window,
SLOT(doDisplayLoadingMessage(QString, int)));
connect(this, SIGNAL(loadingMessage(QString)), p_project_window, connect(this,
SIGNAL(loadingMessage(QString)),
p_project_window,
SLOT(doDisplayLoadingMessage(QString))); SLOT(doDisplayLoadingMessage(QString)));
// grouping // grouping
connect(p_project_window, SIGNAL(operateGrouping(ProjectSp)), this, connect(p_project_window,
SIGNAL(operateGrouping(ProjectSp)),
this,
SLOT(doGrouping(ProjectSp))); SLOT(doGrouping(ProjectSp)));
connect(this, SIGNAL(groupingFinished()), p_project_window, connect(this,
SIGNAL(groupingFinished()),
p_project_window,
SLOT(doGroupingFinished())); SLOT(doGroupingFinished()));
// PTM grouping on IdentificationGroup // PTM grouping on IdentificationGroup
connect(p_project_window, connect(p_project_window,
SIGNAL(operatePtmGroupingOnIdentification(IdentificationGroup *)), SIGNAL(operatePtmGroupingOnIdentification(IdentificationGroup *)),
this, SLOT(doPtmGroupingOnIdentification(IdentificationGroup *))); this,
SLOT(doPtmGroupingOnIdentification(IdentificationGroup *)));
connect(this, connect(this,
SIGNAL(ptmGroupingOnIdentificationFinished(IdentificationGroup *)), SIGNAL(ptmGroupingOnIdentificationFinished(IdentificationGroup *)),
p_project_window, SLOT(refreshPtmGroup(IdentificationGroup *))); p_project_window,
SLOT(refreshPtmGroup(IdentificationGroup *)));
// grouping on IdentificationGroup // grouping on IdentificationGroup
connect( connect(
...@@ -234,21 +342,27 @@ WorkerThread::WorkerThread(ProjectWindow *p_project_window) ...@@ -234,21 +342,27 @@ WorkerThread::WorkerThread(ProjectWindow *p_project_window)
operateGroupingOnIdentification(IdentificationGroup *, GroupingType)), operateGroupingOnIdentification(IdentificationGroup *, GroupingType)),
this, this,
SLOT(doGroupingOnIdentification(IdentificationGroup *, GroupingType))); SLOT(doGroupingOnIdentification(IdentificationGroup *, GroupingType)));
connect(this, SIGNAL(groupingOnIdentificationFinished(IdentificationGroup *)), connect(this,
p_project_window, SLOT(refreshGroup(IdentificationGroup *))); SIGNAL(groupingOnIdentificationFinished(IdentificationGroup *)),
p_project_window,
SLOT(refreshGroup(IdentificationGroup *)));
connect(this, SIGNAL(operationFailed(QString)), p_project_window, connect(this,
SIGNAL(operationFailed(QString)),
p_project_window,
SLOT(doOperationFailed(QString))); SLOT(doOperationFailed(QString)));
connect(this, SIGNAL(operationFinished()), p_project_window, connect(this,
SIGNAL(operationFinished()),
p_project_window,
SLOT(doOperationFinished())); SLOT(doOperationFinished()));
#endif #endif
qDebug() << "WorkerThread::WorkerThread end ProjectWindow"; qDebug() << __FILE__ << " " << __FUNCTION__ << " " << __LINE__;
} }
WorkerThread::~WorkerThread() WorkerThread::~WorkerThread()
{ {
qDebug() << "WorkerThread::WorkerThread destructor"; qDebug() << __FILE__ << " " << __FUNCTION__ << " " << __LINE__;
} }
void void
...@@ -279,7 +393,7 @@ void ...@@ -279,7 +393,7 @@ void
WorkerThread::doPtmGroupingOnIdentification( WorkerThread::doPtmGroupingOnIdentification(
IdentificationGroup *p_identification_group) IdentificationGroup *p_identification_group)
{ {
qDebug() << "WorkerThread::doPtmGroupingOnIdentification begin "; qDebug() << __FILE__ << " " << __FUNCTION__ << " " << __LINE__;
try try
{ {
emit loadingMessage(tr("computing PTM islands")); emit loadingMessage(tr("computing PTM islands"));
...@@ -305,14 +419,14 @@ WorkerThread::doPtmGroupingOnIdentification( ...@@ -305,14 +419,14 @@ WorkerThread::doPtmGroupingOnIdentification(
emit operationFailed( emit operationFailed(
tr("Error while computing PTM islands :\n%1").arg(error.qwhat())); tr("Error while computing PTM islands :\n%1").arg(error.qwhat()));
} }
qDebug() << "WorkerThread::doPtmGroupingOnIdentification end "; qDebug() << __FILE__ << " " << __FUNCTION__ << " " << __LINE__;
} }
void void
WorkerThread::doGroupingOnIdentification( WorkerThread::doGroupingOnIdentification(
IdentificationGroup *p_identification_group, GroupingType grouping_type) IdentificationGroup *p_identification_group, GroupingType grouping_type)
{ {
qDebug() << "WorkerThread::doGroupingOnIdentification begin "; qDebug() << __FILE__ << " " << __FUNCTION__ << " " << __LINE__;
try try
{ {
emit loadingMessage(tr("grouping proteins")); emit loadingMessage(tr("grouping proteins"));
...@@ -337,12 +451,12 @@ WorkerThread::doGroupingOnIdentification( ...@@ -337,12 +451,12 @@ WorkerThread::doGroupingOnIdentification(
{ {
emit operationFailed(tr("Error while grouping :\n%1").arg(error.qwhat())); emit operationFailed(tr("Error while grouping :\n%1").arg(error.qwhat()));
} }
qDebug() << "WorkerThread::doGroupingOnIdentification end "; qDebug() << __FILE__ << " " << __FUNCTION__ << " " << __LINE__;
} }
void void
WorkerThread::doGrouping(ProjectSp project_sp) WorkerThread::doGrouping(ProjectSp project_sp)
{ {
qDebug() << "WorkerThread::doGrouping begin "; qDebug() << __FILE__ << " " << __FUNCTION__ << " " << __LINE__;
try try
{ {
emit loadingMessage(tr("grouping proteins")); emit loadingMessage(tr("grouping proteins"));
...@@ -367,7 +481,7 @@ WorkerThread::doGrouping(ProjectSp project_sp) ...@@ -367,7 +481,7 @@ WorkerThread::doGrouping(ProjectSp project_sp)
{ {
emit operationFailed(tr("Error while grouping :\n%1").arg(error.qwhat())); emit operationFailed(tr("Error while grouping :\n%1").arg(error.qwhat()));
} }
qDebug() << "WorkerThread::doGrouping end "; qDebug() << __FILE__ << " " << __FUNCTION__ << " " << __LINE__;
} }
void void
...@@ -519,7 +633,7 @@ WorkerThread::doLoadingResults(bool is_individual, ...@@ -519,7 +633,7 @@ WorkerThread::doLoadingResults(bool is_individual,
QStringList file_list) QStringList file_list)
{ {
qDebug() << "WorkerThread::doLoadingResults begin "; qDebug() << __FILE__ << " " << __FUNCTION__ << " " << __LINE__;
try try
{ {
if(file_list.size() == 0) if(file_list.size() == 0)
...@@ -551,22 +665,22 @@ WorkerThread::doLoadingResults(bool is_individual, ...@@ -551,22 +665,22 @@ WorkerThread::doLoadingResults(bool is_individual,
emit loadingMessage(tr("filtering proteins")); emit loadingMessage(tr("filtering proteins"));
project_sp.get()->updateAutomaticFilters(param); project_sp.get()->updateAutomaticFilters(param);
qDebug() << "WorkerThread::doLoadingResults emit " qDebug() << __FILE__ << " " << __FUNCTION__ << " " << __LINE__;
"loadingResultsFinished(project_sp) ";
emit loadingResultsFinished(project_sp); emit loadingResultsFinished(project_sp);
} }
catch(pappso::PappsoException &error) catch(pappso::PappsoException &error)
{ {
qDebug() << "WorkerThread::doLoadingResults error "; qDebug() << __FILE__ << " " << __FUNCTION__ << " " << __LINE__ << " "
<< error.qwhat();
emit projectNotReady( emit projectNotReady(
tr("Error while reading result files :\n%1").arg(error.qwhat())); tr("Error while reading result files :\n%1").arg(error.qwhat()));
} }
qDebug() << "WorkerThread::doLoadingResults end "; qDebug() << __FILE__ << " " << __FUNCTION__ << " " << __LINE__;
} }
void void
WorkerThread::doRunningXtandem(TandemRunBatch tandem_run_batch) WorkerThread::doRunningXtandem(TandemRunBatch tandem_run_batch)
{ {
qDebug() << "WorkerThread::doRunningXtandem begin "; qDebug() << __FILE__ << " " << __FUNCTION__ << " " << __LINE__;
try try
{ {
emit loadingMessage(tr("Running X!Tandem, please wait")); emit loadingMessage(tr("Running X!Tandem, please wait"));
...@@ -579,14 +693,14 @@ WorkerThread::doRunningXtandem(TandemRunBatch tandem_run_batch) ...@@ -579,14 +693,14 @@ WorkerThread::doRunningXtandem(TandemRunBatch tandem_run_batch)
if(use_htcondor) if(use_htcondor)
{ {
TandemCondorProcess xt_process(_p_main_window, _p_work_monitor, TandemCondorProcess xt_process(
tandem_run_batch); _p_main_window, _p_work_monitor, tandem_run_batch);
xt_process.run(); xt_process.run();
} }
else else
{ {
TandemBatchProcess xt_process(_p_main_window, _p_work_monitor, TandemBatchProcess xt_process(
tandem_run_batch); _p_main_window, _p_work_monitor, tandem_run_batch);
xt_process.run(); xt_process.run();
} }
...@@ -594,8 +708,10 @@ WorkerThread::doRunningXtandem(TandemRunBatch tandem_run_batch) ...@@ -594,8 +708,10 @@ WorkerThread::doRunningXtandem(TandemRunBatch tandem_run_batch)
} }
catch(pappso::PappsoException &error) catch(pappso::PappsoException &error)
{ {
qDebug() << __FILE__ << " " << __FUNCTION__ << " " << __LINE__ << " "
<< error.qwhat();
emit operationFailed( emit operationFailed(
tr("Error while running X!Tandem job :\n%1").arg(error.qwhat())); tr("Error while running X!Tandem job :\n%1").arg(error.qwhat()));
} }
qDebug() << "WorkerThread::doRunningXtandem end "; qDebug() << __FILE__ << " " << __FUNCTION__ << " " << __LINE__;
} }
...@@ -38,7 +38,8 @@ ...@@ -38,7 +38,8 @@
#include "../../core/peptideevidence.h" #include "../../core/peptideevidence.h"
MascotDatParser::MascotDatParser( MascotDatParser::MascotDatParser(
Project *p_project, IdentificationGroup *p_identification_group, Project *p_project,
IdentificationGroup *p_identification_group,
IdentificationDataSource *p_identification_data_source) IdentificationDataSource *p_identification_data_source)
{ {
_p_project = p_project; _p_project = p_project;
...@@ -415,8 +416,9 @@ MascotDatParser::parsePeptidesLine(const QString &peptide_line) ...@@ -415,8 +416,9 @@ MascotDatParser::parsePeptidesLine(const QString &peptide_line)
catch(pappso::PappsoException exception_pappso) catch(pappso::PappsoException exception_pappso)
{ {
_error_str = QObject::tr("ERROR in MascotDatParser::parsePeptidesLine " _error_str = QObject::tr(
"%1, PAPPSO exception:\n%2") "ERROR in MascotDatParser::parsePeptidesLine "
"%1, PAPPSO exception:\n%2")
.arg(peptide_line) .arg(peptide_line)
.arg(exception_pappso.qwhat()); .arg(exception_pappso.qwhat());
qDebug() << _error_str; qDebug() << _error_str;
...@@ -633,9 +635,10 @@ MascotDatParser::savePeptideList(std::vector<PeptideLine> &peptide_list, ...@@ -633,9 +635,10 @@ MascotDatParser::savePeptideList(std::vector<PeptideLine> &peptide_list,
if(is_decoy) if(is_decoy)
{ {
peptide_evidence.setEvalue(getEvalue( peptide_evidence.setEvalue(
ion_score, _decoy_summary_list.at(_current_query.query_index - 1), getEvalue(ion_score,
0.05)); _decoy_summary_list.at(_current_query.query_index - 1),
0.05));
} }
else else
{ {
...@@ -767,7 +770,8 @@ MascotDatParser::getEvalue(pappso::pappso_double ion_score, ...@@ -767,7 +770,8 @@ MascotDatParser::getEvalue(pappso::pappso_double ion_score,
pappso::pappso_double pappso::pappso_double
MascotDatParser::getEvalueExperimental( MascotDatParser::getEvalueExperimental(
pappso::pappso_double ion_score, SummaryLine &summary_line, pappso::pappso_double ion_score,
SummaryLine &summary_line,
pappso::pappso_double confidence_interval) const pappso::pappso_double confidence_interval) const
{ {
// Evalue experimental Homology threshold (QPlughole value from .dat file). // Evalue experimental Homology threshold (QPlughole value from .dat file).
...@@ -780,16 +784,41 @@ void ...@@ -780,16 +784,41 @@ void
MascotDatParser::setVariableModifications(PeptideXtpSp &peptide_sp, MascotDatParser::setVariableModifications(PeptideXtpSp &peptide_sp,
QString variable_modifications_string) QString variable_modifications_string)
{ {
qDebug() << __FILE__ << " " << __FUNCTION__ << " " << __LINE__; qDebug() << __FILE__ << " " << __FUNCTION__ << " " << __LINE__ << " "
<< variable_modifications_string;
// //
for(unsigned int i = 0; i < variable_modifications_string.size(); i++) for(unsigned int i = 0; i < variable_modifications_string.size(); i++)
{ {
qDebug() << __FILE__ << " " << __FUNCTION__ << " " << __LINE__ << " "
<< variable_modifications_string.mid(i, 1).toUInt();
if(variable_modifications_string.mid(i, 1).toUInt() > 0) if(variable_modifications_string.mid(i, 1).toUInt() > 0)
{ {
MascotModification mascot_modification = _delta_modification_list MascotModification mascot_modification = _delta_modification_list
[variable_modifications_string.mid(i, 1).toUInt() - 1]; [variable_modifications_string.mid(i, 1).toUInt() - 1];
peptide_sp.get()->addAaModification(mascot_modification.modification, try
i - 1); {
if(i == 0)
{
peptide_sp.get()->addAaModification(
mascot_modification.modification, 0);
}
else
{
peptide_sp.get()->addAaModification(
mascot_modification.modification, i - 1);
}
}
catch(pappso::PappsoException &error)
{
throw pappso::PappsoException(
QObject::tr("ERROR adding modification %1 to peptide %2 at "
"position %3 :\n %4")
.arg(mascot_modification.modification->getAccession())
.arg(peptide_sp.get()->toAbsoluteString())
.arg(i - 1)
.arg(error.qwhat()));
}
} }
} }
qDebug() << __FILE__ << " " << __FUNCTION__ << " " << __LINE__;
} }
...@@ -80,13 +80,14 @@ class MascotDatParser ...@@ -80,13 +80,14 @@ class MascotDatParser
}; };
struct SummaryLine struct SummaryLine
{ {
pappso::pappso_double match = 0; // qmatch, identity threshold pappso::pappso_double match = 0; // qmatch, identity threshold
pappso::pappso_double exp_mass = 0; pappso::pappso_double exp_mass = 0;
pappso::pappso_double plug_hole = 0; // qplughole, homology threshold pappso::pappso_double plug_hole = 0; // qplughole, homology threshold
}; };
void savePeptideList(std::vector<PeptideLine> &peptide_list, bool is_decoy); void savePeptideList(std::vector<PeptideLine> &peptide_list, bool is_decoy);
pappso::pappso_double pappso::pappso_double
getEvalue(pappso::pappso_double ion_score, SummaryLine &summary_line, getEvalue(pappso::pappso_double ion_score,
SummaryLine &summary_line,
pappso::pappso_double confidence_interval = 0.05) const; pappso::pappso_double confidence_interval = 0.05) const;
pappso::pappso_double pappso::pappso_double
getEvalueExperimental(pappso::pappso_double ion_score, getEvalueExperimental(pappso::pappso_double ion_score,
......
...@@ -40,12 +40,14 @@ MimeParser::MimeParser(QIODevice *p_inputstream) ...@@ -40,12 +40,14 @@ MimeParser::MimeParser(QIODevice *p_inputstream)
MimeParser::~MimeParser() MimeParser::~MimeParser()
{ {
qDebug() << __FILE__ << " " << __FUNCTION__ << " " << __LINE__;
close(); close();
qDebug() << __FILE__ << " " << __FUNCTION__ << " " << __LINE__;
} }
bool bool
MimeParser::open() MimeParser::open()
{ {
qDebug() << "MimeParser::open begin"; qDebug() << __FILE__ << " " << __FUNCTION__ << " " << __LINE__;
if(_p_inputstream->open(QIODevice::ReadOnly)) if(_p_inputstream->open(QIODevice::ReadOnly))
{ {
_real_in = new QTextStream(_p_inputstream); _real_in = new QTextStream(_p_inputstream);
...@@ -55,12 +57,12 @@ MimeParser::open() ...@@ -55,12 +57,12 @@ MimeParser::open()
throw pappso::PappsoException( throw pappso::PappsoException(
QObject::tr("Error opening mime QIODevice")); QObject::tr("Error opening mime QIODevice"));
} }
qDebug() << "MimeParser::open end"; qDebug() << __FILE__ << " " << __FUNCTION__ << " " << __LINE__;
} }
bool bool
MimeParser::close() MimeParser::close()
{ {
qDebug() << "MimeParser::close begin"; qDebug() << __FILE__ << " " << __FUNCTION__ << " " << __LINE__;
_priv_file_string = ""; _priv_file_string = "";
if(_p_current_file_content != nullptr) if(_p_current_file_content != nullptr)
...@@ -68,21 +70,21 @@ MimeParser::close() ...@@ -68,21 +70,21 @@ MimeParser::close()
delete _p_current_file_content; delete _p_current_file_content;
_p_current_file_content = nullptr; _p_current_file_content = nullptr;
} }
qDebug() << "MimeParser::close delete _real_in"; qDebug() << __FILE__ << " " << __FUNCTION__ << " " << __LINE__;
if(_real_in != nullptr) if(_real_in != nullptr)
{ {
delete _real_in; delete _real_in;
_real_in = nullptr; _real_in = nullptr;
} }
qDebug() << "MimeParser::close delete _p_inputstream"; qDebug() << __FILE__ << " " << __FUNCTION__ << " " << __LINE__;
if(_p_inputstream != nullptr) if(_p_inputstream != nullptr)
{ {
_p_inputstream->close(); _p_inputstream->close();
// delete _p_inputstream; // delete _p_inputstream;
_p_inputstream = nullptr; _p_inputstream = nullptr;
} }
qDebug() << "MimeParser::close end"; qDebug() << __FILE__ << " " << __FUNCTION__ << " " << __LINE__;
} }
bool bool
MimeParser::goToFirstFile() MimeParser::goToFirstFile()
......
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