Commit c497f4d6 authored by Renne Thomas's avatar Renne Thomas
Browse files

add xtandem parameters to engine detail

parent 8017164b
......@@ -206,6 +206,7 @@ SET(XTPCPP_SRCS
./gui/tandem_run_dialog/tandemrundialog.cpp
./gui/waiting_message_dialog/waitingmessagedialog.cpp
./gui/widgets/automatic_filter_widget/automaticfilterwidget.cpp
./gui/widgets/engines_view/xtandemparamwidget.cpp
./gui/widgets/contaminant_widget/contaminantwidget.cpp
./gui/widgets/decoy_widget/decoywidget.cpp
./gui/widgets/xic_extraction_method_widget/xicextractionmethodwidget.cpp
......@@ -243,6 +244,7 @@ SET (GUI_UIS
./gui/tandem_run_dialog/tandem_run_dialog.ui
./gui/waiting_message_dialog/waiting_message_dialog.ui
./gui/widgets/automatic_filter_widget/automatic_filter_widget.ui
./gui/widgets/engines_view/xtandem_view_widget.ui
./gui/widgets/contaminant_widget/contaminant_widget.ui
./gui/widgets/decoy_widget/decoy_widget.ui
./gui/xic_view/xic_box/xic_box.ui
......
......@@ -27,8 +27,7 @@
#include "../../../mainwindow.h"
#include <QSettings>
#include <odsstream/odsdocwriter.h>
#include <odsstream/qtablewriter.h>
EngineDetailWindow::EngineDetailWindow(ProjectWindow *parent)
: QMainWindow(parent), ui(new Ui::EngineDetailView)
......@@ -36,7 +35,6 @@ EngineDetailWindow::EngineDetailWindow(ProjectWindow *parent)
m_project_window = parent;
ui->setupUi(this);
setWindowIcon(QIcon(":/xtpcpp_icon/resources/xtandempipeline_icon.svg"));
}
......@@ -45,15 +43,21 @@ EngineDetailWindow::~EngineDetailWindow()
}
void
EngineDetailWindow::setIdentificationEngineParam(IdentificationDataSourceSp *identificationEngine)
EngineDetailWindow::setIdentificationEngineParam(
IdentificationDataSourceSp *identificationEngine)
{
m_identificationEngine = identificationEngine;
updateDisplay();
}
void EngineDetailWindow::updateDisplay()
void
EngineDetailWindow::updateDisplay()
{
ui->labelEngineName->setText(m_identificationEngine->get()->getIdentificationEngineName());
ui->labelEngineVersion->setText(m_identificationEngine->get()->getIdentificationEngineVersion());
//ui->alterFixedModifications1Label->setText(m_identificationEngine->get()->getIdentificationEngine));
ui->labelEngineName->setText(
m_identificationEngine->get()->getIdentificationEngineName());
ui->labelEngineVersion->setText(
m_identificationEngine->get()->getIdentificationEngineVersion());
m_params_file = m_identificationEngine->get()->getResourceName();
ui->xtandem_view_widget->setAutomaticXTandemParameters(m_params_file);
}
......@@ -46,13 +46,15 @@ class EngineDetailWindow : public QMainWindow
public:
explicit EngineDetailWindow(ProjectWindow *parent = 0);
~EngineDetailWindow();
void setIdentificationEngineParam(IdentificationDataSourceSp *identificationEngine);
void setIdentificationEngineParam(
IdentificationDataSourceSp *identificationEngine);
protected:
void updateDisplay();
private:
Ui::EngineDetailView *ui;
ProjectWindow *m_project_window;
QString m_params_file;
IdentificationDataSourceSp *m_identificationEngine = nullptr;
};
......@@ -146,7 +146,8 @@ MsIdentificationListWindow::doExportAsOdsFile()
}
void
MsIdentificationListWindow::askEngineDetailView(IdentificationDataSourceSp *identificationEngine)
MsIdentificationListWindow::askEngineDetailView(
IdentificationDataSourceSp *identificationEngine)
{
qDebug() << "begin";
m_project_window->doViewEngineDetail(identificationEngine);
......
......@@ -67,7 +67,7 @@ class MsIdentificationListWindow : public QMainWindow
protected:
void askEngineDetailView(IdentificationDataSourceSp *identificationEngine);
private:
Ui::MsIdentificationView *ui;
MsIdentificationTableModel *m_msid_table_model_p = nullptr;
......
......@@ -192,9 +192,10 @@ MsIdentificationTableProxyModel::onTableClicked(const QModelIndex &index)
QModelIndex source_index(this->mapToSource(index));
int row = source_index.row();
m_identificationEngine = m_msid_table_model_p->getIdentificationDataSourceSpList().at(row);
m_identificationEngine =
m_msid_table_model_p->getIdentificationDataSourceSpList().at(row);
msIdentificationListColumn col =
(msIdentificationListColumn)source_index.column();
if(col == msIdentificationListColumn::engine_name)
......
This diff is collapsed.
/*******************************************************************************
* Copyright (c) 2017 Olivier Langella <olivier.langella@u-psud.fr>.
*
* This file is part of XTPcpp.
*
* XTPcpp is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* XTPcpp is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with XTPcpp. If not, see <http://www.gnu.org/licenses/>.
*
* Contributors:
* Olivier Langella <olivier.langella@u-psud.fr> - initial API and
*implementation
******************************************************************************/
#include "xtandemparamwidget.h"
#include "../../project_view/projectwindow.h"
#include "ui_xtandem_view_widget.h"
#include <QDebug>
#include <files/tandemparametersfile.h>
XtandemParamWidget::XtandemParamWidget(QWidget *parent)
: QWidget(parent), ui(new Ui::XtandemParamWidget)
{
qDebug() << "begin";
ui->setupUi(this);
qDebug() << "end";
}
XtandemParamWidget::~XtandemParamWidget()
{
qDebug() << "XtandemParamWidget::~XtandemParamWidget";
delete ui;
qDebug() << "end";
}
void
XtandemParamWidget::setAutomaticXTandemParameters(QString params_file)
{
qDebug() << "begin ";
// TandemParametersFile param_file(params_file);
TandemParametersFile param_file("/home/trenne/test_tandem.xml");
TandemParameters xtandem_parameters = param_file.getTandemParameters();
setSpectrumParameters(xtandem_parameters);
setProteinParameters(xtandem_parameters);
setResidueParameters(xtandem_parameters);
setScoringParameters(xtandem_parameters);
setRefineParameters(xtandem_parameters);
setOutputParameters(xtandem_parameters);
qDebug() << "end ";
}
void
XtandemParamWidget::setSpectrumParameters(TandemParameters xtandem_parameters)
{
}
void
XtandemParamWidget::setProteinParameters(TandemParameters xtandem_parameters)
{
}
void
XtandemParamWidget::setResidueParameters(TandemParameters xtandem_parameters)
{
ui->fixedModificationsLineEdit->setText(
xtandem_parameters.getValue("residue, modification mass"));
ui->fixedModifications1LineEdit->setText(
xtandem_parameters.getValue("residue, modification mass 1"));
ui->fixedModifications2LineEdit->setText(
xtandem_parameters.getValue("residue, modification mass 2"));
ui->potentialModificationsLineEdit->setText(
xtandem_parameters.getValue("residue, potential modification mass"));
ui->potentialModificationsMotifLineEdit->setText(
xtandem_parameters.getValue("residue, potential modification motif"));
}
void
XtandemParamWidget::setScoringParameters(TandemParameters xtandem_parameters)
{
}
void
XtandemParamWidget::setRefineParameters(TandemParameters xtandem_parameters)
{
ui->useOfTheRefinementModuleLineEdit->setText(
xtandem_parameters.getValue("refine"));
ui->maximumEValueToAcceptPeptideLineEdit->setText(
xtandem_parameters.getValue("refine, maximum valid expectation value"));
ui->peptideNTerPotentialModificationsLineEdit->setText(
xtandem_parameters.getValue("refine, potential N-terminus modifications"));
ui->peptideCTerPotentialModificationsLineEdit->setText(
xtandem_parameters.getValue("refine, potential C-terminus modifications"));
ui->alterFixedModificationsLineEdit->setText(
xtandem_parameters.getValue("refine, modification mass"));
ui->alterFixedModifications1LineEdit->setText(
xtandem_parameters.getValue("refine, modification mass 1"));
ui->alterFixedModifications2LineEdit->setText(
xtandem_parameters.getValue("refine, modification mass 2"));
ui->alterFixedModificationsLineEdit->setText(
xtandem_parameters.getValue("refine, potential modification mass"));
ui->alterFixedModifications1LineEdit->setText(
xtandem_parameters.getValue("refine, potential modification mass 1"));
ui->alterFixedModifications2LineEdit->setText(
xtandem_parameters.getValue("refine, potential modification mass 2"));
ui->potentialModificationsMotifLineEdit_2->setText(
xtandem_parameters.getValue("refine, potential modification motif"));
ui->potentialModificationsMotif1LineEdit->setText(
xtandem_parameters.getValue("refine, potential modification motif 1"));
ui->potentialModificationsMotif2LineEdit->setText(
xtandem_parameters.getValue("refine, potential modification motif 2"));
ui->usePotentialModificationsInRefinementModuleLineEdit->setText(
xtandem_parameters.getValue(
"refine, use potential modifications for full refinement"));
ui->useSemiEnzymaticCleavageRulesLineEdit_2->setText(
xtandem_parameters.getValue("refine, cleavage semi"));
ui->cleavageAtEachResiduesLineEdit->setText(
xtandem_parameters.getValue("refine, unanticipated cleavage"));
ui->spectrumIntensityModelSynthesisLineEdit->setText(
xtandem_parameters.getValue("refine, spectrum synthesis"));
ui->pointMutationsLineEdit->setText(
xtandem_parameters.getValue("refine, point mutations"));
}
void
XtandemParamWidget::setOutputParameters(TandemParameters xtandem_parameters)
{
}
/*******************************************************************************
* Copyright (c) 2017 Olivier Langella <olivier.langella@u-psud.fr>.
*
* This file is part of XTPcpp.
*
* XTPcpp is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* XTPcpp is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with XTPcpp. If not, see <http://www.gnu.org/licenses/>.
*
* Contributors:
* Olivier Langella <olivier.langella@u-psud.fr> - initial API and
*implementation
******************************************************************************/
#pragma once
#include <QWidget>
#include <core/tandem_run/tandemparameters.h>
namespace Ui
{
class XtandemParamWidget;
}
class XtandemParamWidget : public QWidget
{
Q_OBJECT
public:
explicit XtandemParamWidget(QWidget *parent);
~XtandemParamWidget();
void setAutomaticXTandemParameters(QString params_file);
private slots:
private:
void setSpectrumParameters(TandemParameters xtandem_parameters);
void setProteinParameters(TandemParameters xtandem_parameters);
void setResidueParameters(TandemParameters xtandem_parameters);
void setScoringParameters(TandemParameters xtandem_parameters);
void setRefineParameters(TandemParameters xtandem_parameters);
void setOutputParameters(TandemParameters xtandem_parameters);
Ui::XtandemParamWidget *ui;
};
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment