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

WIP: building tandem param form

parent c6c2247c
No related branches found
No related tags found
No related merge requests found
...@@ -116,7 +116,7 @@ ...@@ -116,7 +116,7 @@
<item> <item>
<layout class="QGridLayout" name="gridLayout_2"> <layout class="QGridLayout" name="gridLayout_2">
<item row="0" column="1"> <item row="0" column="1">
<widget class="QComboBox" name="comboBox"> <widget class="QComboBox" name="parent_ion_window_unit_combo_box">
<item> <item>
<property name="text"> <property name="text">
<string>dalton</string> <string>dalton</string>
...@@ -130,13 +130,16 @@ ...@@ -130,13 +130,16 @@
</widget> </widget>
</item> </item>
<item row="0" column="2"> <item row="0" column="2">
<widget class="QPushButton" name="pushButton"> <widget class="QPushButton" name="parent_ion_window_unit_combo_push_button">
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed"> <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch> <horstretch>0</horstretch>
<verstretch>0</verstretch> <verstretch>0</verstretch>
</sizepolicy> </sizepolicy>
</property> </property>
<property name="accessibleName">
<string notr="true">parent_ion_window_unit</string>
</property>
<property name="text"> <property name="text">
<string>?</string> <string>?</string>
</property> </property>
...@@ -150,7 +153,7 @@ ...@@ -150,7 +153,7 @@
</widget> </widget>
</item> </item>
<item row="2" column="2"> <item row="2" column="2">
<widget class="QPushButton" name="pushButton_3"> <widget class="QPushButton" name="parent_ion_upper_window_push_button">
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed"> <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch> <horstretch>0</horstretch>
...@@ -163,7 +166,7 @@ ...@@ -163,7 +166,7 @@
</widget> </widget>
</item> </item>
<item row="1" column="2"> <item row="1" column="2">
<widget class="QPushButton" name="pushButton_2"> <widget class="QPushButton" name="parent_ion_lower_window_push_button">
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed"> <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch> <horstretch>0</horstretch>
...@@ -183,7 +186,7 @@ ...@@ -183,7 +186,7 @@
</widget> </widget>
</item> </item>
<item row="3" column="2"> <item row="3" column="2">
<widget class="QPushButton" name="pushButton_4"> <widget class="QPushButton" name="anticipate_carbon_push_button">
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Fixed"> <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
<horstretch>0</horstretch> <horstretch>0</horstretch>
...@@ -196,7 +199,7 @@ ...@@ -196,7 +199,7 @@
</widget> </widget>
</item> </item>
<item row="3" column="1"> <item row="3" column="1">
<widget class="QComboBox" name="comboBox_2"> <widget class="QComboBox" name="anticipate_carbon_combo_box">
<item> <item>
<property name="text"> <property name="text">
<string>yes</string> <string>yes</string>
...@@ -224,10 +227,10 @@ ...@@ -224,10 +227,10 @@
</widget> </widget>
</item> </item>
<item row="1" column="1"> <item row="1" column="1">
<widget class="QLineEdit" name="lineEdit"/> <widget class="QLineEdit" name="parent_ion_lower_window_edit"/>
</item> </item>
<item row="2" column="1"> <item row="2" column="1">
<widget class="QLineEdit" name="lineEdit_2"/> <widget class="QLineEdit" name="parent_ion_upper_window_edit"/>
</item> </item>
</layout> </layout>
</item> </item>
...@@ -386,8 +389,8 @@ ...@@ -386,8 +389,8 @@
<slot>reject()</slot> <slot>reject()</slot>
<hints> <hints>
<hint type="sourcelabel"> <hint type="sourcelabel">
<x>675</x> <x>777</x>
<y>527</y> <y>498</y>
</hint> </hint>
<hint type="destinationlabel"> <hint type="destinationlabel">
<x>881</x> <x>881</x>
...@@ -402,8 +405,8 @@ ...@@ -402,8 +405,8 @@
<slot>accept()</slot> <slot>accept()</slot>
<hints> <hints>
<hint type="sourcelabel"> <hint type="sourcelabel">
<x>764</x> <x>863</x>
<y>518</y> <y>498</y>
</hint> </hint>
<hint type="destinationlabel"> <hint type="destinationlabel">
<x>879</x> <x>879</x>
...@@ -411,12 +414,76 @@ ...@@ -411,12 +414,76 @@
</hint> </hint>
</hints> </hints>
</connection> </connection>
<connection>
<sender>parent_ion_window_unit_combo_push_button</sender>
<signal>clicked()</signal>
<receiver>EditTandemPresetView</receiver>
<slot>doHelp()</slot>
<hints>
<hint type="sourcelabel">
<x>556</x>
<y>227</y>
</hint>
<hint type="destinationlabel">
<x>949</x>
<y>153</y>
</hint>
</hints>
</connection>
<connection>
<sender>parent_ion_lower_window_push_button</sender>
<signal>clicked()</signal>
<receiver>EditTandemPresetView</receiver>
<slot>doHelp()</slot>
<hints>
<hint type="sourcelabel">
<x>573</x>
<y>262</y>
</hint>
<hint type="destinationlabel">
<x>936</x>
<y>272</y>
</hint>
</hints>
</connection>
<connection>
<sender>parent_ion_upper_window_push_button</sender>
<signal>clicked()</signal>
<receiver>EditTandemPresetView</receiver>
<slot>doHelp()</slot>
<hints>
<hint type="sourcelabel">
<x>564</x>
<y>296</y>
</hint>
<hint type="destinationlabel">
<x>952</x>
<y>297</y>
</hint>
</hints>
</connection>
<connection>
<sender>anticipate_carbon_push_button</sender>
<signal>clicked()</signal>
<receiver>EditTandemPresetView</receiver>
<slot>doHelp()</slot>
<hints>
<hint type="sourcelabel">
<x>566</x>
<y>331</y>
</hint>
<hint type="destinationlabel">
<x>994</x>
<y>332</y>
</hint>
</hints>
</connection>
</connections> </connections>
<slots> <slots>
<slot>doNotValidHide(bool)</slot> <slot>doNotValidHide(bool)</slot>
<slot>doNotCheckedHide(bool)</slot> <slot>doNotCheckedHide(bool)</slot>
<slot>doNotGroupedHide(bool)</slot> <slot>doNotGroupedHide(bool)</slot>
<slot>doActionBrowse()</slot> <slot>doHelp()</slot>
<slot>doActionReplace()</slot> <slot>doActionReplace()</slot>
<slot>reject()</slot> <slot>reject()</slot>
<slot>accept()</slot> <slot>accept()</slot>
......
...@@ -54,4 +54,55 @@ EditTandemPresetDialog::EditTandemPresetDialog(QWidget * parent): ...@@ -54,4 +54,55 @@ EditTandemPresetDialog::EditTandemPresetDialog(QWidget * parent):
EditTandemPresetDialog::~EditTandemPresetDialog() EditTandemPresetDialog::~EditTandemPresetDialog()
{ {
delete ui; delete ui;
if (_p_tandem_preset_file != nullptr) {
delete _p_tandem_preset_file;
}
}
void EditTandemPresetDialog::setTandemParametersFiles(const TandemParametersFile & tandem_preset_file) {
_p_tandem_preset_file = new TandemParametersFile( tandem_preset_file);
_tandem_params = _p_tandem_preset_file->getTandemParameters();
populate();
}
void EditTandemPresetDialog::doHelp() {
QObject *senderObj = sender();
QString senderObjName = senderObj->objectName();
qDebug() << "EditTandemPresetDialog::doHelp begin " << senderObjName;
if(senderObjName == "parent_ion_window_unit_push_button")
{
//Implement Button A Specific
}
qDebug() << "EditTandemPresetDialog::doHelp end " << senderObjName;
}
void EditTandemPresetDialog::readUi() {
_tandem_params.setParamLabelValue("spectrum, parent monoisotopic mass error units", ui->parent_ion_window_unit_combo_box->itemData(ui->parent_ion_window_unit_combo_box->currentIndex()).toString());
_tandem_params.setParamLabelValue("spectrum, parent monoisotopic mass error minus", ui->parent_ion_lower_window_edit->text());
_tandem_params.setParamLabelValue("spectrum, parent monoisotopic mass error plus", ui->parent_ion_upper_window_edit->text());
_tandem_params.setParamLabelValue("spectrum, parent monoisotopic mass isotope error", ui->anticipate_carbon_combo_box->itemData(ui->anticipate_carbon_combo_box->currentIndex()).toString());
}
void EditTandemPresetDialog::populate() {
/*
* <note type="input" label="spectrum, parent monoisotopic mass error units">ppm</note>
* */
int index = ui->parent_ion_window_unit_combo_box->findText(_tandem_params.getValue("spectrum, parent monoisotopic mass error units"));
if ( index != -1 ) { // -1 for not found
ui->parent_ion_window_unit_combo_box->setCurrentIndex(index);
}
//<note type="input" label="spectrum, parent monoisotopic mass error minus">10</note>
ui->parent_ion_lower_window_edit->setText(_tandem_params.getValue("spectrum, parent monoisotopic mass error minus"));
//<note type="input" label="spectrum, parent monoisotopic mass error plus">10</note>
ui->parent_ion_upper_window_edit->setText(_tandem_params.getValue("spectrum, parent monoisotopic mass error plus"));
//<note type="input" label="spectrum, parent monoisotopic mass isotope error">yes</note>
index = ui->anticipate_carbon_combo_box->findText(_tandem_params.getValue("spectrum, parent monoisotopic mass isotope error"));
if ( index != -1 ) { // -1 for not found
ui->anticipate_carbon_combo_box->setCurrentIndex(index);
}
} }
...@@ -30,6 +30,7 @@ ...@@ -30,6 +30,7 @@
#ifndef EDITTANDEMPRESETDIALOG_H #ifndef EDITTANDEMPRESETDIALOG_H
#define EDITTANDEMPRESETDIALOG_H #define EDITTANDEMPRESETDIALOG_H
#include "../../files/tandemparametersfile.h"
#include<QDialog> #include<QDialog>
namespace Ui { namespace Ui {
...@@ -43,10 +44,19 @@ class EditTandemPresetDialog: public QDialog ...@@ -43,10 +44,19 @@ class EditTandemPresetDialog: public QDialog
public: public:
explicit EditTandemPresetDialog(QWidget * parent); explicit EditTandemPresetDialog(QWidget * parent);
~EditTandemPresetDialog(); ~EditTandemPresetDialog();
void setTandemParametersFiles(const TandemParametersFile & tandem_preset_file);
public slots:
void doHelp ();
private:
void populate();
void readUi();
private: private:
Ui::EditTandemPresetView *ui; Ui::EditTandemPresetView *ui;
TandemParametersFile * _p_tandem_preset_file = nullptr;
TandemParameters _tandem_params;
}; };
#endif // EDITTANDEMPRESETDIALOG_H #endif // EDITTANDEMPRESETDIALOG_H
...@@ -148,6 +148,7 @@ void TandemRunDialog::editPresets() { ...@@ -148,6 +148,7 @@ void TandemRunDialog::editPresets() {
if (_p_preset_dialog == nullptr) { if (_p_preset_dialog == nullptr) {
_p_preset_dialog = new EditTandemPresetDialog(this); _p_preset_dialog = new EditTandemPresetDialog(this);
} }
_p_preset_dialog->setTandemParametersFiles(TandemParametersFile(ui->preset_combobox->itemData(ui->preset_combobox->currentIndex()).value<QString>()));
_p_preset_dialog->show(); _p_preset_dialog->show();
} }
......
<?xml version="1.0" encoding="UTF-8"?>
<bioml label="example api document">
<note type="input" label="spectrum, parent monoisotopic mass error units">ppm</note>
<note type="input" label="spectrum, parent monoisotopic mass error minus">10</note>
<note type="input" label="spectrum, parent monoisotopic mass error plus">10</note>
<note type="input" label="spectrum, parent monoisotopic mass isotope error">yes</note>
<note type="input" label="spectrum, maximum parent charge">4</note>
<note type="input" label="spectrum, fragment mass type">monoisotopic</note>
<note type="input" label="spectrum, fragment monoisotopic mass error units">Daltons</note>
<note type="input" label="spectrum, fragment monoisotopic mass error">0.02</note>
<note type="input" label="spectrum, use neutral loss window">yes</note>
<note type="input" label="spectrum, neutral loss mass">18.01057</note>
<note type="input" label="spectrum, neutral loss window">0.02</note>
<note type="input" label="spectrum, use noise suppression">yes</note>
<note type="input" label="spectrum, dynamic range">100.0</note>
<note type="input" label="spectrum, total peaks">100</note>
<note type="input" label="spectrum, minimum peaks">15</note>
<note type="input" label="spectrum, minimum fragment mz">150.0</note>
<note type="input" label="spectrum, minimum parent m+h">500.0</note>
<note type="input" label="spectrum, sequence batch size">1000</note>
<note type="input" label="spectrum, use contrast angle">no</note>
<note type="input" label="spectrum, threads">1</note>
<note type="input" label="protein, cleavage site">[RK]|{P}</note>
<note type="input" label="protein, cleavage semi">no</note>
<note type="input" label="protein, cleavage C-terminal mass change">+17.00305</note>
<note type="input" label="protein, cleavage N-terminal mass change">+1.00794</note>
<note type="input" label="protein, C-terminal residue modification mass">0.0</note>
<note type="input" label="protein, N-terminal residue modification mass">0.0</note>
<note type="input" label="protein, quick acetyl">yes</note>
<note type="input" label="protein, quick pyrolidone">yes</note>
<note type="input" label="protein, stP bias">yes</note>
<note type="input" label="protein, modified residue mass file"></note>
<note type="input" label="residue, modification mass">57.02146@C</note>
<note type="input" label="residue, modification mass 1"></note>
<note type="input" label="residue, modification mass 2"></note>
<note type="input" label="residue, potential modification mass">15.99491@M</note>
<note type="input" label="residue, potential modification mass 1"></note>
<note type="input" label="residue, potential modification mass 2"></note>
<note type="input" label="residue, potential modification motif"></note>
<note type="input" label="residue, potential modification motif 1"></note>
<note type="input" label="residue, potential modification motif 2"></note>
<note type="input" label="scoring, minimum ion count">4</note>
<note type="input" label="scoring, maximum missed cleavage sites">1</note>
<note type="input" label="scoring, cyclic permutation">yes</note>
<note type="input" label="scoring, include reverse">yes</note>
<note type="input" label="scoring, y ions">yes</note>
<note type="input" label="scoring, b ions">yes</note>
<note type="input" label="scoring, c ions">no</note>
<note type="input" label="scoring, z ions">no</note>
<note type="input" label="scoring, a ions">no</note>
<note type="input" label="scoring, x ions">no</note>
<note type="input" label="refine">yes</note>
<note type="input" label="refine, maximum valid expectation value">0.01</note>
<note type="input" label="refine, potential N-terminus modifications">+42.01056@[</note>
<note type="input" label="refine, potential C-terminus modifications"></note>
<note type="input" label="refine, modification mass">57.02146@C</note>
<note type="input" label="refine, modification mass 1"></note>
<note type="input" label="refine, modification mass 2"></note>
<note type="input" label="refine, potential modification mass">15.99491@M</note>
<note type="input" label="refine, potential modification mass 1"></note>
<note type="input" label="refine, potential modification mass 2"></note>
<note type="input" label="refine, potential modification motif"></note>
<note type="input" label="refine, potential modification motif 1"></note>
<note type="input" label="refine, potential modification motif 2"></note>
<note type="input" label="refine, use potential modifications for full refinement">yes</note>
<note type="input" label="refine, cleavage semi">no</note>
<note type="input" label="refine, unanticipated cleavage">no</note>
<note type="input" label="refine, spectrum synthesis">yes</note>
<note type="input" label="refine, point mutations">no</note>
<note type="input" label="output, maximum valid expectation value">0.05</note>
<note type="input" label="output, maximum valid protein expectation value">0.05</note>
<note type="input" label="output, results">valid</note>
<note type="input" label="output, sort results by">spectrum</note>
<note type="input" label="output, proteins">yes</note>
<note type="input" label="output, sequences">yes</note>
<note type="input" label="output, one sequence copy">yes</note>
<note type="input" label="output, spectra">yes</note>
<note type="input" label="output, parameters">yes</note>
<note type="input" label="output, performance">yes</note>
<note type="input" label="output, histograms">yes</note>
<note type="input" label="output, histogram column width">30</note>
<note type="input" label="output, path hashing">no</note>
<note type="input" label="output, xsl path">tandem-style.xsl</note>
<note type="input" label="output, mzid">no</note>
</bioml>
\ No newline at end of file
...@@ -89,6 +89,7 @@ ...@@ -89,6 +89,7 @@
<file>resources/html_doc/syi.html</file> <file>resources/html_doc/syi.html</file>
<file>resources/html_doc/szi.html</file> <file>resources/html_doc/szi.html</file>
<file>resources/html_doc/uml_index.html</file> <file>resources/html_doc/uml_index.html</file>
<file>resources/model/QExactive_analysis_FDR_nosemi.xml</file>
</qresource> </qresource>
<qresource prefix="/xtpcpp_xpip"> <qresource prefix="/xtpcpp_xpip">
<file>resources/xtandempipeline_xpip.svg</file> <file>resources/xtandempipeline_xpip.svg</file>
......
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