diff --git a/src/core/tandem_run/tandemparameters.cpp b/src/core/tandem_run/tandemparameters.cpp index 429b09e907ed27ad31f4f8608b74147723fc9d21..aa73215bee25e50cfa4ba55c143c208d01181e3c 100644 --- a/src/core/tandem_run/tandemparameters.cpp +++ b/src/core/tandem_run/tandemparameters.cpp @@ -95,14 +95,14 @@ void TandemParameters::setParamLabelValue(const QString & label, const QString & throw pappso::ExceptionNotPossible(QObject::tr("%1 value must be Daltons or ppm (not %2)").arg(label).arg(value)); } } - if ((label == "spectrum, parent monoisotopic mass isotope error") || (label == "spectrum, use neutral loss window") || (label == "spectrum, use contrast angle") || (label == "protein, cleavage semi") || (label == "protein, quick acetyl") || (label == "protein, quick pyrolidone") || (label == "protein, stP bias") || (label == "scoring, cyclic permutation") || (label == "scoring, include reverse") || (label == "scoring, y ions") || (label == "scoring, b ions") || (label == "scoring, c ions") || (label == "scoring, z ions") || (label == "scoring, a ions") || (label == "scoring, x ions")) { + if ((label == "spectrum, parent monoisotopic mass isotope error") || (label == "spectrum, use neutral loss window") || (label == "spectrum, use contrast angle") || (label == "protein, cleavage semi") || (label == "protein, quick acetyl") || (label == "protein, quick pyrolidone") || (label == "protein, stP bias") || (label == "scoring, cyclic permutation") || (label == "scoring, include reverse") || (label == "scoring, y ions") || (label == "scoring, b ions") || (label == "scoring, c ions") || (label == "scoring, z ions") || (label == "scoring, a ions") || (label == "scoring, x ions") || (label == "refine")) { if ((value != "yes") && (value != "no")) { throw pappso::ExceptionNotPossible(QObject::tr("%1 value must be yes or no (not %2)").arg(label).arg(value)); } } - if ((label == "spectrum, parent monoisotopic mass error minus") || (label == "spectrum, parent monoisotopic mass error plus")|| (label == "spectrum, dynamic range") || (label == "spectrum, minimum parent m+h") || (label == "protein, cleavage C-terminal mass change")|| (label == "protein, cleavage N-terminal mass change") || (label == "protein, C-terminal residue modification mass") || (label == "protein, N-terminal residue modification mass")) { + if ((label == "spectrum, parent monoisotopic mass error minus") || (label == "spectrum, parent monoisotopic mass error plus")|| (label == "spectrum, dynamic range") || (label == "spectrum, minimum parent m+h") || (label == "protein, cleavage C-terminal mass change")|| (label == "protein, cleavage N-terminal mass change") || (label == "protein, C-terminal residue modification mass") || (label == "protein, N-terminal residue modification mass") || (label == "refine, maximum valid expectation value")) { bool ok; value.toDouble(&ok); if (!ok) {// not an integer @@ -124,7 +124,7 @@ void TandemParameters::setParamLabelValue(const QString & label, const QString & } } - //text "protein, cleavage site" "protein, modified residue mass file" "residue, modification mass" + //text "protein, cleavage site" "protein, modified residue mass file" "residue, modification mass" || (label == "refine, potential N-terminus modifications") || (label == "refine, potential C-terminus modifications") _map_label_value.insert(label, value); } diff --git a/src/gui/edit_tandem_preset_dialog/edit_tandem_preset_dialog.ui b/src/gui/edit_tandem_preset_dialog/edit_tandem_preset_dialog.ui index 6b95bb51a39d413ff24436854dc51066edbb8164..0706ba23401f76265557a5a76f8d552badd02be0 100644 --- a/src/gui/edit_tandem_preset_dialog/edit_tandem_preset_dialog.ui +++ b/src/gui/edit_tandem_preset_dialog/edit_tandem_preset_dialog.ui @@ -100,7 +100,7 @@ <item> <widget class="QTabWidget" name="tabWidget"> <property name="currentIndex"> - <number>3</number> + <number>4</number> </property> <widget class="QWidget" name="spectrum_tab"> <property name="sizePolicy"> @@ -1716,13 +1716,108 @@ <layout class="QVBoxLayout" name="verticalLayout_14"> <item> <layout class="QGridLayout" name="gridLayout_5"> + <item row="1" column="0"> + <widget class="QLabel" name="label_48"> + <property name="text"> + <string>Maximum E-value to accept peptide </string> + </property> + </widget> + </item> + <item row="1" column="2"> + <widget class="QPushButton" name="rmvev_push_button"> + <property name="text"> + <string>?</string> + </property> + </widget> + </item> + <item row="0" column="2"> + <widget class="QPushButton" name="refine_push_button"> + <property name="text"> + <string>?</string> + </property> + </widget> + </item> <item row="0" column="0"> <widget class="QLabel" name="label_29"> <property name="text"> - <string>TextLabel</string> + <string>Control the use of the refinment module</string> + </property> + </widget> + </item> + <item row="2" column="0"> + <widget class="QLabel" name="label_49"> + <property name="text"> + <string>Peptide N-ter potential modifications</string> + </property> + </widget> + </item> + <item row="0" column="1"> + <layout class="QHBoxLayout" name="horizontalLayout_21"> + <item> + <widget class="QRadioButton" name="refine_yes_radio_button"> + <property name="text"> + <string>&yes</string> + </property> + <attribute name="buttonGroup"> + <string notr="true">refine_button_group</string> + </attribute> + </widget> + </item> + <item> + <widget class="QRadioButton" name="refine_no_radio_button"> + <property name="text"> + <string>no</string> + </property> + <attribute name="buttonGroup"> + <string notr="true">refine_button_group</string> + </attribute> + </widget> + </item> + <item> + <spacer name="horizontalSpacer_19"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>40</width> + <height>20</height> + </size> + </property> + </spacer> + </item> + </layout> + </item> + <item row="1" column="1"> + <widget class="QLineEdit" name="rmvev_edit"/> + </item> + <item row="3" column="0"> + <widget class="QLabel" name="label_50"> + <property name="text"> + <string>Peptide C-ter potential modifications</string> + </property> + </widget> + </item> + <item row="2" column="2"> + <widget class="QPushButton" name="refpntm_push_button"> + <property name="text"> + <string>?</string> + </property> + </widget> + </item> + <item row="3" column="2"> + <widget class="QPushButton" name="refpctm_push_button"> + <property name="text"> + <string>?</string> </property> </widget> </item> + <item row="2" column="1"> + <widget class="QLineEdit" name="refpntm_edit"/> + </item> + <item row="3" column="1"> + <widget class="QLineEdit" name="refpctm_edit"/> + </item> </layout> </item> <item> @@ -2717,6 +2812,70 @@ </hint> </hints> </connection> + <connection> + <sender>refine_push_button</sender> + <signal>clicked()</signal> + <receiver>EditTandemPresetView</receiver> + <slot>doHelp()</slot> + <hints> + <hint type="sourcelabel"> + <x>999</x> + <y>183</y> + </hint> + <hint type="destinationlabel"> + <x>1130</x> + <y>-101</y> + </hint> + </hints> + </connection> + <connection> + <sender>rmvev_push_button</sender> + <signal>clicked()</signal> + <receiver>EditTandemPresetView</receiver> + <slot>doHelp()</slot> + <hints> + <hint type="sourcelabel"> + <x>1021</x> + <y>224</y> + </hint> + <hint type="destinationlabel"> + <x>1076</x> + <y>-66</y> + </hint> + </hints> + </connection> + <connection> + <sender>refpntm_push_button</sender> + <signal>clicked()</signal> + <receiver>EditTandemPresetView</receiver> + <slot>doHelp()</slot> + <hints> + <hint type="sourcelabel"> + <x>1000</x> + <y>252</y> + </hint> + <hint type="destinationlabel"> + <x>1070</x> + <y>-37</y> + </hint> + </hints> + </connection> + <connection> + <sender>refpctm_push_button</sender> + <signal>clicked()</signal> + <receiver>EditTandemPresetView</receiver> + <slot>doHelp()</slot> + <hints> + <hint type="sourcelabel"> + <x>963</x> + <y>286</y> + </hint> + <hint type="destinationlabel"> + <x>1064</x> + <y>-12</y> + </hint> + </hints> + </connection> </connections> <slots> <slot>doCopy()</slot> @@ -2729,22 +2888,23 @@ <slot>doSelectDir()</slot> </slots> <buttongroups> - <buttongroup name="spmmie_button_group"/> - <buttongroup name="scp_button_group"/> - <buttongroup name="spmmeu_button_group"/> - <buttongroup name="suca_button_group"/> - <buttongroup name="sfmmeu_button_group"/> - <buttongroup name="pcsemi_button_group"/> - <buttongroup name="pqa_button_group"/> <buttongroup name="pqp_button_group"/> - <buttongroup name="pstpb_button_group"/> - <buttongroup name="sunlw_button_group"/> + <buttongroup name="suca_button_group"/> <buttongroup name="sir_button_group"/> - <buttongroup name="syi_button_group"/> + <buttongroup name="sfmmeu_button_group"/> <buttongroup name="sbi_button_group"/> - <buttongroup name="sci_button_group"/> <buttongroup name="szi_button_group"/> + <buttongroup name="spmmeu_button_group"/> <buttongroup name="sai_button_group"/> + <buttongroup name="pcsemi_button_group"/> + <buttongroup name="spmmie_button_group"/> + <buttongroup name="sci_button_group"/> + <buttongroup name="scp_button_group"/> + <buttongroup name="pqa_button_group"/> <buttongroup name="sxi_button_group"/> + <buttongroup name="sunlw_button_group"/> + <buttongroup name="pstpb_button_group"/> + <buttongroup name="syi_button_group"/> + <buttongroup name="refine_button_group"/> </buttongroups> </ui> diff --git a/src/gui/edit_tandem_preset_dialog/edittandempresetdialog.cpp b/src/gui/edit_tandem_preset_dialog/edittandempresetdialog.cpp index 743f036302232c27ed5695451f0bb092cdc6db91..a25b8313a2b5d03c3fe6efa8c2759384aa5db099 100644 --- a/src/gui/edit_tandem_preset_dialog/edittandempresetdialog.cpp +++ b/src/gui/edit_tandem_preset_dialog/edittandempresetdialog.cpp @@ -338,6 +338,22 @@ void EditTandemPresetDialog::doHelp() { { html_doc.setFileName(":/tandem/resources/html_doc/sxi.html"); } + if(senderObjName == "refine_push_button") + { + html_doc.setFileName(":/tandem/resources/html_doc/refine.html"); + } + if(senderObjName == "rmvev_push_button") + { + html_doc.setFileName(":/tandem/resources/html_doc/rmvev.html"); + } + if(senderObjName == "refpntm_push_button") + { + html_doc.setFileName(":/tandem/resources/html_doc/refpntm.html"); + } + if(senderObjName == "refpctm_push_button") + { + html_doc.setFileName(":/tandem/resources/html_doc/refpctm.html"); + } @@ -468,6 +484,15 @@ void EditTandemPresetDialog::readUi() { if (ui->sxi_yes_radio_button->isChecked()) { _tandem_params.setParamLabelValue("scoring, x ions", "yes"); } + _tandem_params.setParamLabelValue("refine", "no"); + if (ui->refine_yes_radio_button->isChecked()) { + _tandem_params.setParamLabelValue("refine", "yes"); + } + _tandem_params.setParamLabelValue("refine, maximum valid expectation value", ui->rmvev_edit->text()); + + _tandem_params.setParamLabelValue("refine, potential N-terminus modifications", ui->refpntm_edit->text()); + _tandem_params.setParamLabelValue("refine, potential C-terminus modifications", ui->refpctm_edit->text()); + } catch (pappso::PappsoException & error) { QMessageBox::warning(this,tr("Error in parameters :"), error.qwhat()); @@ -686,6 +711,36 @@ void EditTandemPresetDialog::populate() { ui->sxi_no_radio_button->setChecked(true); } + + //<note type="input" label="refine">yes</note> + ui->refine_yes_radio_button->setChecked(true); + ui->refine_no_radio_button->setChecked(false); + if ( _tandem_params.getValue("refine") == "no" ) { // -1 for not found + ui->refine_yes_radio_button->setChecked(false); + ui->refine_no_radio_button->setChecked(true); + } + //<note type="input" label="refine, maximum valid expectation value">0.01</note> + ui->rmvev_edit->setText(_tandem_params.getValue("refine, maximum valid expectation value")); + + //<note type="input" label="refine, potential N-terminus modifications">+42.01056@[</note> + ui->refpntm_edit->setText(_tandem_params.getValue("refine, potential N-terminus modifications")); + //<note type="input" label="refine, potential C-terminus modifications"></note> + ui->refpctm_edit->setText(_tandem_params.getValue("refine, potential C-terminus modifications")); + //<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> + qDebug() << "EditTandemPresetDialog::populate end"; }