diff --git a/src/core/tandem_run/tandemparameters.cpp b/src/core/tandem_run/tandemparameters.cpp index 973aeabe072d6d6a39ee4aa513ff0561411f79f9..67140d5bb7658e39c7b77a0675a2148489b5627e 100644 --- a/src/core/tandem_run/tandemparameters.cpp +++ b/src/core/tandem_run/tandemparameters.cpp @@ -95,20 +95,21 @@ 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")) { + if ((label == "spectrum, parent monoisotopic mass isotope error") || (label == "spectrum, use neutral loss window") || (label == "spectrum, use contrast angle") || (label == "protein, cleavage semi")) { 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") ) { + + 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")) { bool ok; value.toDouble(&ok); if (!ok) {// not an integer throw pappso::ExceptionNotPossible(QObject::tr("%1 value must be a number (not %2)").arg(label).arg(value)); } } - - + + if ((label == "spectrum, maximum parent charge") || (label == "spectrum, total peaks") || (label == "spectrum, minimum peaks") || (label == "spectrum, sequence batch size") || (label == "spectrum, threads")) { bool ok; value.toInt(&ok); @@ -122,6 +123,8 @@ void TandemParameters::setParamLabelValue(const QString & label, const QString & } } + //text "protein, cleavage site" + _map_label_value.insert(label, value); } void TandemParameters::setMethodName(const QString & method) { 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 e17633d2fa35cf16910b45b93aa2c93490e3577b..65e1fb4cac180463372aeb6b97480174cdeb6e08 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>0</number> + <number>1</number> </property> <widget class="QWidget" name="spectrum_tab"> <property name="sizePolicy"> @@ -131,7 +131,7 @@ <property name="geometry"> <rect> <x>0</x> - <y>-162</y> + <y>0</y> <width>976</width> <height>598</height> </rect> @@ -565,23 +565,128 @@ <x>0</x> <y>0</y> <width>990</width> - <height>436</height> + <height>468</height> </rect> </property> <layout class="QVBoxLayout" name="verticalLayout_6"> <item> <layout class="QGridLayout" name="gridLayout_3"> + <item row="3" column="2"> + <widget class="QLineEdit" name="pcntmc_edit"/> + </item> + <item row="2" column="0"> + <widget class="QLabel" name="label_19"> + <property name="text"> + <string>Moiety added to peptide C-terminus by cleavage</string> + </property> + </widget> + </item> + <item row="3" column="3"> + <widget class="QPushButton" name="pcntmc_push_button"> + <property name="text"> + <string>?</string> + </property> + </widget> + </item> <item row="0" column="0"> <widget class="QLabel" name="label_5"> <property name="text"> - <string>TextLabel</string> + <string>Define protein cleavage site</string> </property> </widget> </item> <item row="1" column="0"> <widget class="QLabel" name="label_6"> <property name="text"> - <string>TextLabel</string> + <string>Use semi enzymatic cleavage rules</string> + </property> + </widget> + </item> + <item row="3" column="0"> + <widget class="QLabel" name="label_20"> + <property name="text"> + <string>Moiety added to peptide N-terminus by cleavage</string> + </property> + </widget> + </item> + <item row="2" column="3"> + <widget class="QPushButton" name="pcctmc_push_button"> + <property name="text"> + <string>?</string> + </property> + </widget> + </item> + <item row="0" column="3"> + <widget class="QPushButton" name="pcs_push_button"> + <property name="text"> + <string>?</string> + </property> + </widget> + </item> + <item row="0" column="2"> + <widget class="QLineEdit" name="pcs_edit"/> + </item> + <item row="1" column="3"> + <widget class="QPushButton" name="pcsemi_push_button"> + <property name="text"> + <string>?</string> + </property> + </widget> + </item> + <item row="1" column="2"> + <widget class="QComboBox" name="pcsemi_combo_box"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Expanding" vsizetype="Fixed"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <item> + <property name="text"> + <string>yes</string> + </property> + </item> + <item> + <property name="text"> + <string>no</string> + </property> + </item> + </widget> + </item> + <item row="4" column="0"> + <widget class="QLabel" name="label_21"> + <property name="text"> + <string>Moiety added to protein C-terminus</string> + </property> + </widget> + </item> + <item row="2" column="2"> + <widget class="QLineEdit" name="pcctmc_edit"/> + </item> + <item row="5" column="0"> + <widget class="QLabel" name="label_22"> + <property name="text"> + <string>Moiety added to protein N-terminus</string> + </property> + </widget> + </item> + <item row="4" column="2"> + <widget class="QLineEdit" name="pctrmm_edit"/> + </item> + <item row="5" column="2"> + <widget class="QLineEdit" name="pntrmm_edit"/> + </item> + <item row="4" column="3"> + <widget class="QPushButton" name="pctrmm_push_button"> + <property name="text"> + <string>?</string> + </property> + </widget> + </item> + <item row="5" column="3"> + <widget class="QPushButton" name="pntrmm_push_button"> + <property name="text"> + <string>?</string> </property> </widget> </item> @@ -673,7 +778,7 @@ <hints> <hint type="sourcelabel"> <x>1343</x> - <y>654</y> + <y>687</y> </hint> <hint type="destinationlabel"> <x>881</x> @@ -689,7 +794,7 @@ <hints> <hint type="sourcelabel"> <x>1429</x> - <y>654</y> + <y>687</y> </hint> <hint type="destinationlabel"> <x>879</x> @@ -705,7 +810,7 @@ <hints> <hint type="sourcelabel"> <x>995</x> - <y>55</y> + <y>200</y> </hint> <hint type="destinationlabel"> <x>1728</x> @@ -721,7 +826,7 @@ <hints> <hint type="sourcelabel"> <x>1030</x> - <y>130</y> + <y>113</y> </hint> <hint type="destinationlabel"> <x>1542</x> @@ -737,7 +842,7 @@ <hints> <hint type="sourcelabel"> <x>995</x> - <y>89</y> + <y>234</y> </hint> <hint type="destinationlabel"> <x>720</x> @@ -753,7 +858,7 @@ <hints> <hint type="sourcelabel"> <x>995</x> - <y>123</y> + <y>268</y> </hint> <hint type="destinationlabel"> <x>1181</x> @@ -769,7 +874,7 @@ <hints> <hint type="sourcelabel"> <x>995</x> - <y>157</y> + <y>302</y> </hint> <hint type="destinationlabel"> <x>1037</x> @@ -785,7 +890,7 @@ <hints> <hint type="sourcelabel"> <x>944</x> - <y>130</y> + <y>113</y> </hint> <hint type="destinationlabel"> <x>707</x> @@ -801,7 +906,7 @@ <hints> <hint type="sourcelabel"> <x>909</x> - <y>55</y> + <y>200</y> </hint> <hint type="destinationlabel"> <x>400</x> @@ -817,7 +922,7 @@ <hints> <hint type="sourcelabel"> <x>909</x> - <y>89</y> + <y>234</y> </hint> <hint type="destinationlabel"> <x>464</x> @@ -833,7 +938,7 @@ <hints> <hint type="sourcelabel"> <x>909</x> - <y>123</y> + <y>268</y> </hint> <hint type="destinationlabel"> <x>798</x> @@ -849,7 +954,7 @@ <hints> <hint type="sourcelabel"> <x>909</x> - <y>157</y> + <y>302</y> </hint> <hint type="destinationlabel"> <x>970</x> @@ -865,7 +970,7 @@ <hints> <hint type="sourcelabel"> <x>1313</x> - <y>76</y> + <y>68</y> </hint> <hint type="destinationlabel"> <x>1737</x> @@ -881,7 +986,7 @@ <hints> <hint type="sourcelabel"> <x>1430</x> - <y>76</y> + <y>68</y> </hint> <hint type="destinationlabel"> <x>1796</x> @@ -897,7 +1002,7 @@ <hints> <hint type="sourcelabel"> <x>995</x> - <y>191</y> + <y>336</y> </hint> <hint type="destinationlabel"> <x>1209</x> @@ -913,7 +1018,7 @@ <hints> <hint type="sourcelabel"> <x>995</x> - <y>225</y> + <y>370</y> </hint> <hint type="destinationlabel"> <x>1247</x> @@ -929,7 +1034,7 @@ <hints> <hint type="sourcelabel"> <x>995</x> - <y>259</y> + <y>404</y> </hint> <hint type="destinationlabel"> <x>1142</x> @@ -945,7 +1050,7 @@ <hints> <hint type="sourcelabel"> <x>995</x> - <y>293</y> + <y>438</y> </hint> <hint type="destinationlabel"> <x>1322</x> @@ -961,7 +1066,7 @@ <hints> <hint type="sourcelabel"> <x>995</x> - <y>327</y> + <y>472</y> </hint> <hint type="destinationlabel"> <x>1259</x> @@ -977,7 +1082,7 @@ <hints> <hint type="sourcelabel"> <x>995</x> - <y>361</y> + <y>506</y> </hint> <hint type="destinationlabel"> <x>1588</x> @@ -993,7 +1098,7 @@ <hints> <hint type="sourcelabel"> <x>995</x> - <y>395</y> + <y>540</y> </hint> <hint type="destinationlabel"> <x>1674</x> @@ -1008,8 +1113,8 @@ <slot>doHelp()</slot> <hints> <hint type="sourcelabel"> - <x>977</x> - <y>417</y> + <x>995</x> + <y>574</y> </hint> <hint type="destinationlabel"> <x>1611</x> @@ -1024,8 +1129,8 @@ <slot>doHelp()</slot> <hints> <hint type="sourcelabel"> - <x>933</x> - <y>437</y> + <x>995</x> + <y>608</y> </hint> <hint type="destinationlabel"> <x>1711</x> @@ -1040,8 +1145,8 @@ <slot>doHelp()</slot> <hints> <hint type="sourcelabel"> - <x>968</x> - <y>484</y> + <x>995</x> + <y>642</y> </hint> <hint type="destinationlabel"> <x>1642</x> @@ -1056,8 +1161,8 @@ <slot>doHelp()</slot> <hints> <hint type="sourcelabel"> - <x>945</x> - <y>513</y> + <x>995</x> + <y>676</y> </hint> <hint type="destinationlabel"> <x>1579</x> @@ -1072,8 +1177,8 @@ <slot>doHelp()</slot> <hints> <hint type="sourcelabel"> - <x>966</x> - <y>559</y> + <x>995</x> + <y>710</y> </hint> <hint type="destinationlabel"> <x>1734</x> @@ -1088,8 +1193,8 @@ <slot>doHelp()</slot> <hints> <hint type="sourcelabel"> - <x>922</x> - <y>586</y> + <x>995</x> + <y>744</y> </hint> <hint type="destinationlabel"> <x>1734</x> @@ -1097,6 +1202,102 @@ </hint> </hints> </connection> + <connection> + <sender>pcs_push_button</sender> + <signal>clicked()</signal> + <receiver>EditTandemPresetView</receiver> + <slot>doHelp()</slot> + <hints> + <hint type="sourcelabel"> + <x>984</x> + <y>181</y> + </hint> + <hint type="destinationlabel"> + <x>1735</x> + <y>195</y> + </hint> + </hints> + </connection> + <connection> + <sender>pcsemi_push_button</sender> + <signal>clicked()</signal> + <receiver>EditTandemPresetView</receiver> + <slot>doHelp()</slot> + <hints> + <hint type="sourcelabel"> + <x>990</x> + <y>220</y> + </hint> + <hint type="destinationlabel"> + <x>1678</x> + <y>257</y> + </hint> + </hints> + </connection> + <connection> + <sender>pcctmc_push_button</sender> + <signal>clicked()</signal> + <receiver>EditTandemPresetView</receiver> + <slot>doHelp()</slot> + <hints> + <hint type="sourcelabel"> + <x>981</x> + <y>253</y> + </hint> + <hint type="destinationlabel"> + <x>1454</x> + <y>274</y> + </hint> + </hints> + </connection> + <connection> + <sender>pcntmc_push_button</sender> + <signal>clicked()</signal> + <receiver>EditTandemPresetView</receiver> + <slot>doHelp()</slot> + <hints> + <hint type="sourcelabel"> + <x>974</x> + <y>287</y> + </hint> + <hint type="destinationlabel"> + <x>1486</x> + <y>295</y> + </hint> + </hints> + </connection> + <connection> + <sender>pctrmm_push_button</sender> + <signal>clicked()</signal> + <receiver>EditTandemPresetView</receiver> + <slot>doHelp()</slot> + <hints> + <hint type="sourcelabel"> + <x>989</x> + <y>323</y> + </hint> + <hint type="destinationlabel"> + <x>1511</x> + <y>354</y> + </hint> + </hints> + </connection> + <connection> + <sender>pntrmm_push_button</sender> + <signal>clicked()</signal> + <receiver>EditTandemPresetView</receiver> + <slot>doHelp()</slot> + <hints> + <hint type="sourcelabel"> + <x>968</x> + <y>358</y> + </hint> + <hint type="destinationlabel"> + <x>1577</x> + <y>370</y> + </hint> + </hints> + </connection> </connections> <slots> <slot>doCopy()</slot> diff --git a/src/gui/edit_tandem_preset_dialog/edittandempresetdialog.cpp b/src/gui/edit_tandem_preset_dialog/edittandempresetdialog.cpp index a60263cca8e29f12e51d4049f4f74c1b98fd8ce5..b6669878099a08ce0ea10f725946b110f8a63c21 100644 --- a/src/gui/edit_tandem_preset_dialog/edittandempresetdialog.cpp +++ b/src/gui/edit_tandem_preset_dialog/edittandempresetdialog.cpp @@ -245,6 +245,32 @@ void EditTandemPresetDialog::doHelp() { { html_doc.setFileName(":/tandem/resources/html_doc/st.html"); } + if(senderObjName == "pcs_push_button") + { + html_doc.setFileName(":/tandem/resources/html_doc/pcs.html"); + } + if(senderObjName == "pcsemi_push_button") + { + html_doc.setFileName(":/tandem/resources/html_doc/pcsemi.html"); + } + + if(senderObjName == "pcctmc_push_button") + { + html_doc.setFileName(":/tandem/resources/html_doc/pcctmc.html"); + } + if(senderObjName == "pcntmc_push_button") + { + html_doc.setFileName(":/tandem/resources/html_doc/pcntmc.html"); + } + if(senderObjName == "pctrmm_push_button") + { + html_doc.setFileName(":/tandem/resources/html_doc/pctrmm.html"); + } + if(senderObjName == "pntrmm_push_button") + { + html_doc.setFileName(":/tandem/resources/html_doc/pntrmm.html"); + } + if (html_doc.open(QFile::ReadOnly | QFile::Text)) { QTextStream in(&html_doc); @@ -285,6 +311,13 @@ void EditTandemPresetDialog::readUi() { _tandem_params.setParamLabelValue("spectrum, use contrast angle", ui->suca_combo_box->currentText()); _tandem_params.setParamLabelValue("spectrum, threads", ui->st_edit->text()); + + _tandem_params.setParamLabelValue("protein, cleavage site", ui->pcs_edit->text()); + _tandem_params.setParamLabelValue("protein, cleavage semi", ui->pcsemi_combo_box->currentText()); + _tandem_params.setParamLabelValue("protein, cleavage C-terminal mass change", ui->pcctmc_edit->text()); + _tandem_params.setParamLabelValue("protein, cleavage N-terminal mass change", ui->pcntmc_edit->text()); + + } catch (pappso::PappsoException & error) { QMessageBox::warning(this,tr("Error in parameters :"), error.qwhat()); @@ -348,7 +381,7 @@ void EditTandemPresetDialog::populate() { ui->smfmz_edit->setText(_tandem_params.getValue("spectrum, minimum fragment mz")); //<note type="input" label="spectrum, minimum parent m+h">500.0</note> ui->smpmh_edit->setText(_tandem_params.getValue("spectrum, minimum parent m+h")); - + //<note type="input" label="spectrum, sequence batch size">1000</note> ui->spsbs_edit->setText(_tandem_params.getValue("spectrum, sequence batch size")); //<note type="input" label="spectrum, use contrast angle">no</note> @@ -358,6 +391,26 @@ void EditTandemPresetDialog::populate() { } //<note type="input" label="spectrum, threads">1</note> ui->st_edit->setText(_tandem_params.getValue("spectrum, threads")); + + + //<note type="input" label="protein, cleavage site">[RK]|{P}</note> + ui->pcs_edit->setText(_tandem_params.getValue("protein, cleavage site")); + //<note type="input" label="protein, cleavage semi">no</note> + index = ui->pcsemi_combo_box->findText(_tandem_params.getValue("protein, cleavage semi")); + if ( index != -1 ) { // -1 for not found + ui->pcsemi_combo_box->setCurrentIndex(index); + } + + + //<note type="input" label="protein, cleavage C-terminal mass change">+17.00305</note> + ui->pcctmc_edit->setText(_tandem_params.getValue("protein, cleavage C-terminal mass change")); + //<note type="input" label="protein, cleavage N-terminal mass change">+1.00794</note> + ui->pcntmc_edit->setText(_tandem_params.getValue("protein, cleavage N-terminal mass change")); + + //<note type="input" label="protein, C-terminal residue modification mass">0.0</note> + ui->pctrmm_edit->setText(_tandem_params.getValue("protein, C-terminal residue modification mass")); + //<note type="input" label="protein, N-terminal residue modification mass">0.0</note> + ui->pntrmm_edit->setText(_tandem_params.getValue("protein, N-terminal residue modification mass")); qDebug() << "EditTandemPresetDialog::populate end"; }