diff --git a/src/core/identification_sources/identificationdatasource.cpp b/src/core/identification_sources/identificationdatasource.cpp index 0c42f3efe26b0e8a003e7c54f16fe71700296f93..a88e63e3db25684425af351431a7334d40507825 100644 --- a/src/core/identification_sources/identificationdatasource.cpp +++ b/src/core/identification_sources/identificationdatasource.cpp @@ -254,7 +254,9 @@ IdentificationDataSource::getMassSpectrumCstSPtr(unsigned int scan_number) const spectrum_index = msrun_reader_sp.get()->scanNumber2SpectrumIndex(scan_number); } - qDebug() << " spectrum file=" << msrun_reader_sp.get()->getMsRunId().get()->getFileName() << " index=" << spectrum_index; + qDebug() << " spectrum file=" + << msrun_reader_sp.get()->getMsRunId().get()->getFileName() + << " index=" << spectrum_index; pappso::MassSpectrumCstSPtr spectrum_sp = msrun_reader_sp.get()->massSpectrumCstSPtr(spectrum_index); qDebug(); @@ -269,8 +271,6 @@ IdentificationDataSource::addFastaFile(FastaFileSp file) const std::vector & IdentificationDataSource::getFastaFileList() const { - qDebug() << "IdentificationDataSource::getFastaFileList begin" - << _fastafile_list.size(); return _fastafile_list; } diff --git a/src/core/tandem_run/tandembatchprocess.cpp b/src/core/tandem_run/tandembatchprocess.cpp index b771faa76e53786655237afd2f3e53cc938767bb..3a96e92bfce3fb707f4ca83aecfce0080b92bc1c 100644 --- a/src/core/tandem_run/tandembatchprocess.cpp +++ b/src/core/tandem_run/tandembatchprocess.cpp @@ -427,15 +427,6 @@ TandemBatchProcess::runOne(const QString &mz_file) pappso::TandemWrapperRun tandem_run( _tandem_run_batch._tandem_bin_path, tmpDirOption); - std::shared_ptr ms2_filter_suite = - std::make_shared(); - - ms2_filter_suite.get()->push_back( - std::make_shared( - pappso::PrecisionFactory::getDaltonInstance(0.01))); - - tandem_run.setMs2FilterSuite(ms2_filter_suite); - tandem_run.run(xml_input_file.fileName(), outputStream, errorStream); diff --git a/src/core/tandem_run/tandemparameters.cpp b/src/core/tandem_run/tandemparameters.cpp index 1fc0c35cb316b96f2269399f8d42d567cd5552c9..89e99f9d53f5637ba0f54b7ef1c023aea492282e 100644 --- a/src/core/tandem_run/tandemparameters.cpp +++ b/src/core/tandem_run/tandemparameters.cpp @@ -273,7 +273,7 @@ TandemParameters::setParamLabelValue(const QString &label, const QString &value) (label == "residue, potential modification motif 1") || (label == "residue, potential modification motif 2") || (label == "residue, potential modification motif 3") || - (label == "spectrum, timstof MS2 centroid parameters")) + (label == "spectrum, timstof MS2 filters")) { // string } diff --git a/src/gui/edit/edit_tandem_preset_dialog/edit_tandem_preset_dialog.ui b/src/gui/edit/edit_tandem_preset_dialog/edit_tandem_preset_dialog.ui index fce14fe410a06bdc36f5e62dcf9162ea8f95e5c3..73b2f9cf5399f4aded12bc0008317d0d1086e460 100644 --- a/src/gui/edit/edit_tandem_preset_dialog/edit_tandem_preset_dialog.ui +++ b/src/gui/edit/edit_tandem_preset_dialog/edit_tandem_preset_dialog.ui @@ -25,45 +25,112 @@ X!Tandem preset editor + + + - - - - 0 - 0 - - - - - - - - + + + + + true + + + + 0 + 0 + + + + false + + - + + + false + - + 0 0 - Load + Load + + + + .. - + + + + + 75 + true + false + true + + + + Select a preset directory + + + + - + 0 0 + + Select the preset directory + + + Qt::LeftToRight + - Preset directory + + + + + :/icons/resources/icons/apache/firefox/folder_icon.svg:/icons/resources/icons/apache/firefox/folder_icon.svg + + + + 20 + 20 + + + + false + + + false + + + + + + + false + + + + + + New + + + + .. @@ -71,43 +138,52 @@ + + + 0 + 0 + + Qt::Horizontal + + true + + + true + - - - - - - - - - - - - New - - - - - - - - - - Save - - - - - + + QTabWidget::North + + + QTabWidget::Rounded + 0 + + Qt::ElideNone + + + true + + + false + + + false + + + false + + + false + @@ -137,14 +213,64 @@ 0 - -379 - 984 - 835 + -154 + 875 + 691 + + + + ... + + + + :/icons/resources/icons/icon_info.svg:/icons/resources/icons/icon_info.svg + + + + 20 + 20 + + + + true + + + + + + + + + + + :/icons/resources/icons/icon_info.svg:/icons/resources/icons/icon_info.svg + + + + 20 + 20 + + + + true + + + + + + + TimsTOF filters + parameters + + + + + + @@ -526,17 +652,14 @@ - - + + 0 0 - - parent_ion_window_unit - @@ -555,14 +678,17 @@ - - + + 0 0 + + parent_ion_window_unit + @@ -913,183 +1039,41 @@ - - - - + + + + + 0 + 0 + - - - :/icons/resources/icons/icon_info.svg:/icons/resources/icons/icon_info.svg + + Qt::Horizontal - - - 20 - 20 - + + + + + + + 0 + 0 + - - true + + Qt::Horizontal + + + + + + + Qt::Horizontal - - - - TIMS TOF MS&2 centroid parameters - - - false - - - true - - - false - - - - - - - - - - - Intensity threshold - - - - - - - - - - - - - - - - Instrument resolution - - - - - - - Integration width - - - - - - - Smooth width - - - - - - - - - - - :/icons/resources/icons/icon_info.svg:/icons/resources/icons/icon_info.svg - - - - 20 - 20 - - - - true - - - - - - - ... - - - - :/icons/resources/icons/icon_info.svg:/icons/resources/icons/icon_info.svg - - - - 20 - 20 - - - - true - - - - - - - ... - - - - :/icons/resources/icons/icon_info.svg:/icons/resources/icons/icon_info.svg - - - - 20 - 20 - - - - true - - - - - - - ... - - - - :/icons/resources/icons/icon_info.svg:/icons/resources/icons/icon_info.svg - - - - 20 - 20 - - - - true - - - - - - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - @@ -1111,8 +1095,8 @@ 0 0 - 998 - 456 + 505 + 350 @@ -1590,8 +1574,8 @@ 0 0 - 998 - 456 + 279 + 185 @@ -1783,8 +1767,8 @@ 0 0 - 998 - 456 + 478 + 350 @@ -2398,7 +2382,7 @@ 0 0 - 984 + 494 614 @@ -3185,7 +3169,7 @@ 0 0 - 984 + 550 457 @@ -3348,7 +3332,7 @@ - stochastic + stoc&hastic oresu_button_group @@ -3394,7 +3378,7 @@ false - protein + p&rotein buttonGroup @@ -3996,7 +3980,39 @@ - + + + + + + + 75 + true + + + + No preset file loaded (default parameters represented) + + + + + + + + 0 + 0 + + + + QAbstractScrollArea::AdjustIgnored + + + QTextEdit::WidgetWidth + + + + + @@ -4024,6 +4040,10 @@ Cancel + + + .. + @@ -4031,22 +4051,16 @@ OK + + + .. + - - - - - 0 - 0 - - - - @@ -4061,7 +4075,7 @@ 1343 - 684 + 718 881 @@ -4077,7 +4091,7 @@ 1429 - 684 + 718 879 @@ -4086,98 +4100,98 @@ - save + pushButton clicked() EditTandemPresetView - doSave() + doCopy() - 1030 - 113 + 1344 + 68 - 1542 - 134 + 707 + 1103 - pushButton + pushButton_5 clicked() EditTandemPresetView - doCopy() + doLoad() - 944 - 113 + 1430 + 68 - 707 - 1103 + 1737 + 106 - parent_ion_lower_window_edit - textChanged(QString) + pushButton_6 + clicked() EditTandemPresetView - doEdit(QString) + doSelectDir() - 969 - -141 + 1430 + 35 - 464 - 1032 + 1796 + 138 - parent_ion_upper_window_edit - textChanged(QString) + ttfparam_button + clicked() EditTandemPresetView - doEdit(QString) + doHelp() - 969 - -108 + 1105 + 793 - 798 - 842 + 720 + 364 - pushButton_5 - clicked() + parent_ion_upper_window_edit + textChanged(QString) EditTandemPresetView - doLoad() + doEdit(QString) - 1309 - 71 + 969 + 202 - 1737 - 106 + 798 + 842 - pushButton_6 - clicked() + parent_ion_lower_window_edit + textChanged(QString) EditTandemPresetView - doSelectDir() + doEdit(QString) - 1430 - 68 + 969 + 169 - 1796 - 138 + 464 + 1032 @@ -4188,8 +4202,8 @@ doResultType() - 344 - 262 + 366 + 227 941 @@ -4204,8 +4218,8 @@ doResultType() - 397 - 256 + 429 + 227 1055 @@ -4214,34 +4228,34 @@ - oresu_stochastic_radio_button + spmmeu_push_button clicked() EditTandemPresetView - doResultType() + doHelp() - 442 - 257 + 1119 + 136 - -126 - 108 + 1460 + 186 - spmmeu_push_button + oresu_stochastic_radio_button clicked() EditTandemPresetView - doHelp() + doResultType() - 1003 - -174 + 528 + 227 - 1460 - 186 + -126 + 108 @@ -4252,8 +4266,8 @@ doHelp() - 1003 - -141 + 1119 + 169 1460 @@ -4268,8 +4282,8 @@ doHelp() - 1003 - -108 + 1119 + 202 1476 @@ -4284,8 +4298,8 @@ doHelp() - 1003 - -75 + 1119 + 235 1454 @@ -4300,8 +4314,8 @@ doHelp() - 1003 - -42 + 1119 + 268 1478 @@ -4316,8 +4330,8 @@ doHelp() - 1003 - -9 + 1119 + 301 1464 @@ -4332,8 +4346,8 @@ doHelp() - 1003 - 24 + 1119 + 339 1467 @@ -4348,8 +4362,8 @@ doHelp() - 1003 - 57 + 1119 + 393 1464 @@ -4364,8 +4378,8 @@ doHelp() - 1003 - 90 + 1119 + 426 1460 @@ -4380,8 +4394,8 @@ doHelp() - 1003 - 123 + 1119 + 459 1463 @@ -4396,8 +4410,8 @@ doHelp() - 1003 - 156 + 1119 + 492 1461 @@ -4412,8 +4426,8 @@ doHelp() - 1003 - 197 + 1119 + 533 1458 @@ -4428,8 +4442,8 @@ doHelp() - 1003 - 230 + 1119 + 566 1473 @@ -4444,8 +4458,8 @@ doHelp() - 1003 - 263 + 1119 + 599 1494 @@ -4460,8 +4474,8 @@ doHelp() - 1003 - 428 + 1119 + 764 1437 @@ -4476,8 +4490,8 @@ doHelp() - 1003 - 395 + 1119 + 731 1439 @@ -4492,8 +4506,8 @@ doHelp() - 1003 - 362 + 1119 + 698 1439 @@ -4508,8 +4522,8 @@ doHelp() - 1003 - 329 + 1119 + 665 1440 @@ -4524,8 +4538,8 @@ doHelp() - 1003 - 296 + 1119 + 632 1438 @@ -4540,8 +4554,8 @@ doHelp() - 1007 - 192 + 1133 + 162 1468 @@ -4556,8 +4570,8 @@ doHelp() - 1005 - 495 + 1133 + 459 1451 @@ -4572,8 +4586,8 @@ doHelp() - 1014 - 455 + 1133 + 426 1452 @@ -4588,8 +4602,8 @@ doHelp() - 997 - 423 + 1133 + 393 1474 @@ -4604,8 +4618,8 @@ doHelp() - 1005 - 390 + 1133 + 360 1448 @@ -4620,8 +4634,8 @@ doHelp() - 1003 - 356 + 1133 + 327 1451 @@ -4636,8 +4650,8 @@ doHelp() - 1015 - 317 + 1133 + 294 1438 @@ -4652,8 +4666,8 @@ doHelp() - 1017 - 293 + 1133 + 261 1437 @@ -4668,8 +4682,8 @@ doHelp() - 1003 - 256 + 1133 + 228 1438 @@ -4684,8 +4698,8 @@ doHelp() - 1008 - 230 + 1133 + 195 1437 @@ -4700,8 +4714,8 @@ doHelp() - 1011 - 193 + 1133 + 162 1439 @@ -4716,8 +4730,8 @@ doHelp() - 1013 - 222 + 1133 + 195 1440 @@ -4732,8 +4746,8 @@ doHelp() - 1005 - 320 + 1133 + 294 1438 @@ -4748,8 +4762,8 @@ doHelp() - 1010 - 290 + 1133 + 261 1043 @@ -4764,8 +4778,8 @@ doHelp() - 999 - 257 + 1133 + 228 1023 @@ -4774,34 +4788,34 @@ - smic_push_button + smmcs_push_button clicked() EditTandemPresetView doHelp() - 1011 - 189 + 1133 + 195 - -28 - 193 + -12 + 219 - smmcs_push_button + smic_push_button clicked() EditTandemPresetView doHelp() - 1000 - 217 + 1133 + 162 - -12 - 219 + -28 + 193 @@ -4812,8 +4826,8 @@ doHelp() - 1004 - 256 + 1133 + 228 -101 @@ -4828,8 +4842,8 @@ doHelp() - 1009 - 295 + 1133 + 261 -47 @@ -4844,8 +4858,8 @@ doHelp() - 995 - 328 + 1133 + 294 -53 @@ -4860,8 +4874,8 @@ doHelp() - 1006 - 354 + 1133 + 327 -47 @@ -4876,8 +4890,8 @@ doHelp() - 1000 - 387 + 1133 + 360 -41 @@ -4892,8 +4906,8 @@ doHelp() - 998 - 424 + 1133 + 393 -75 @@ -4908,8 +4922,8 @@ doHelp() - 1005 - 463 + 1133 + 426 -41 @@ -4924,8 +4938,8 @@ doHelp() - 998 - 493 + 1133 + 459 -40 @@ -4940,8 +4954,8 @@ doHelp() - 1003 - 195 + 1119 + 162 -137 @@ -4956,8 +4970,8 @@ doHelp() - 1003 - 238 + 1119 + 195 -98 @@ -4972,8 +4986,8 @@ doHelp() - 1003 - 271 + 1119 + 228 -249 @@ -4988,8 +5002,8 @@ doHelp() - 1003 - 304 + 1119 + 261 -292 @@ -5004,8 +5018,8 @@ doHelp() - 1003 - 337 + 1119 + 294 -209 @@ -5020,8 +5034,8 @@ doHelp() - 1003 - 370 + 1119 + 327 -207 @@ -5036,8 +5050,8 @@ doHelp() - 1003 - 403 + 1119 + 360 -178 @@ -5052,8 +5066,8 @@ doHelp() - 1003 - 436 + 1119 + 393 -162 @@ -5068,8 +5082,8 @@ doHelp() - 1003 - 469 + 1119 + 426 -303 @@ -5084,8 +5098,8 @@ doHelp() - 1003 - 502 + 1119 + 459 -175 @@ -5100,8 +5114,8 @@ doHelp() - 1003 - 535 + 1119 + 492 -193 @@ -5116,8 +5130,8 @@ doHelp() - 1003 - 568 + 1119 + 525 -147 @@ -5132,8 +5146,8 @@ doHelp() - 1003 - 601 + 1119 + 558 -49 @@ -5148,8 +5162,8 @@ doHelp() - 1003 - 634 + 1119 + 591 -191 @@ -5164,8 +5178,8 @@ doHelp() - 1003 - 667 + 1119 + 624 -225 @@ -5180,8 +5194,8 @@ doHelp() - 1003 - 700 + 1119 + 657 -92 @@ -5196,8 +5210,8 @@ doHelp() - 1003 - 733 + 1119 + 690 -88 @@ -5212,8 +5226,8 @@ doHelp() - 1003 - 766 + 1119 + 723 -139 @@ -5228,8 +5242,8 @@ doHelp() - 985 - 188 + 1133 + 162 -252 @@ -5244,8 +5258,8 @@ doHelp() - 989 - 221 + 1133 + 195 -258 @@ -5260,8 +5274,8 @@ doHelp() - 985 - 259 + 1133 + 228 -222 @@ -5276,8 +5290,8 @@ doHelp() - 991 - 290 + 1133 + 261 -200 @@ -5292,8 +5306,8 @@ doHelp() - 989 - 327 + 1133 + 294 -308 @@ -5308,8 +5322,8 @@ doHelp() - 992 - 353 + 1133 + 327 1684 @@ -5324,8 +5338,8 @@ doHelp() - 996 - 397 + 1133 + 360 1671 @@ -5340,8 +5354,8 @@ doHelp() - 991 - 432 + 1133 + 393 1642 @@ -5356,8 +5370,8 @@ doHelp() - 993 - 456 + 1133 + 426 1670 @@ -5372,8 +5386,8 @@ doHelp() - 995 - 490 + 1133 + 459 1638 @@ -5388,8 +5402,8 @@ doHelp() - 992 - 520 + 1133 + 492 1645 @@ -5404,8 +5418,8 @@ doHelp() - 992 - 561 + 1133 + 525 1617 @@ -5420,8 +5434,8 @@ doHelp() - 1001 - 589 + 1133 + 558 1698 @@ -5436,8 +5450,8 @@ doRefine() - 448 - 194 + 472 + 161 -94 @@ -5452,8 +5466,8 @@ doRefine() - 390 - 196 + 424 + 161 -202 @@ -5461,70 +5475,6 @@ - - ttcp1_button - clicked() - EditTandemPresetView - doHelp() - - - 978 - 482 - - - -134 - 465 - - - - - ttcp4_button - clicked() - EditTandemPresetView - doHelp() - - - 974 - 578 - - - -132 - 672 - - - - - ttcp3_button - clicked() - EditTandemPresetView - doHelp() - - - 988 - 551 - - - -104 - 644 - - - - - ttcp2_button - clicked() - EditTandemPresetView - doHelp() - - - 970 - 516 - - - -67 - 559 - - - doCopy() @@ -5539,37 +5489,37 @@ doRefine() - - - - - + + - - + - - - - + - - - - - - + + - + + + + + + + + + - - - + + + - - - + + + + + + diff --git a/src/gui/edit/edit_tandem_preset_dialog/edittandempresetdialog.cpp b/src/gui/edit/edit_tandem_preset_dialog/edittandempresetdialog.cpp index 4d5309468d51f628d3070225034926e71fb27e6d..1216c96eb7ba66fee4f0f7bd28442db72495ed84 100644 --- a/src/gui/edit/edit_tandem_preset_dialog/edittandempresetdialog.cpp +++ b/src/gui/edit/edit_tandem_preset_dialog/edittandempresetdialog.cpp @@ -38,6 +38,7 @@ #include #include #include +#include EditTandemPresetDialog::EditTandemPresetDialog(QWidget *parent) @@ -99,6 +100,7 @@ EditTandemPresetDialog::setTandemParametersFile( this, tr("Error"), tr("Error :\n %1").arg(error.qwhat())); } + fillPresetDirectoryLabel(); fillPresetComboBox(); populate(); } @@ -115,6 +117,7 @@ EditTandemPresetDialog::newTandemParameters( _p_tandem_preset_file = new TandemParametersFile(QString("%1/temp.xml").arg(_preset_directory)); + fillPresetDirectoryLabel(); fillPresetComboBox(); populate(); } @@ -123,7 +126,23 @@ EditTandemPresetDialog::newTandemParameters( void EditTandemPresetDialog::doCopy() { - ui->method_name_line_edit->setText("untitled"); + bool ok; + QString new_preset_file_name = + QInputDialog::getText(this, + tr("Preset file name"), + tr("Choose the new preset file name:"), + QLineEdit::Normal, + "untitled", + &ok); + if(ok && !new_preset_file_name.isEmpty()) + { + ui->method_name_label->setText(tr("%1 loaded").arg(new_preset_file_name)); + } + else + { + return; + } + readUi(); if(_p_tandem_preset_file == nullptr) { @@ -135,8 +154,8 @@ EditTandemPresetDialog::doCopy() { delete _p_tandem_preset_file; } - _p_tandem_preset_file = - new TandemParametersFile(QString("%1/untitled.xml").arg(_preset_directory)); + _p_tandem_preset_file = new TandemParametersFile( + QString("%1/%2.xml").arg(_preset_directory).arg(new_preset_file_name)); } @@ -160,6 +179,7 @@ EditTandemPresetDialog::doSelectDir() .arg(my_dir.absoluteFilePath())); } _preset_directory = directory; + fillPresetDirectoryLabel(); fillPresetComboBox(); } } @@ -281,6 +301,7 @@ EditTandemPresetDialog::fillPresetComboBox() int index = ui->preset_combo_box->findText(default_preset_name); if(index != -1) { // -1 for not found + ui->pushButton_5->setEnabled(true); ui->preset_combo_box->setCurrentIndex(index); } } @@ -649,10 +670,9 @@ EditTandemPresetDialog::doHelp() { html_doc.setFileName(":/tandem/resources/html_doc/oxp.html"); } - if((senderObjName == "ttcp1_button") || (senderObjName == "ttcp2_button") || - (senderObjName == "ttcp3_button") || (senderObjName == "ttcp4_button")) + if(senderObjName == "ttfparam_button") { - html_doc.setFileName(":/tandem/resources/html_doc/ttcp.html"); + html_doc.setFileName(":/tandem/resources/html_doc/ttfparam.html"); } if(html_doc.open(QFile::ReadOnly | QFile::Text)) @@ -673,7 +693,11 @@ EditTandemPresetDialog::readUi() { try { - _tandem_params.setMethodName(ui->method_name_line_edit->text()); + // remove the loaded from the method name in the label + QString temp_preset_name = ui->method_name_label->text(); + temp_preset_name.truncate(temp_preset_name.lastIndexOf(" loaded")); + _tandem_params.setMethodName(temp_preset_name); + _tandem_params.setParamLabelValue( "spectrum, parent monoisotopic mass error units", "Daltons"); if(ui->spmmeu_ppm_radio_button->isChecked()) @@ -747,6 +771,8 @@ EditTandemPresetDialog::readUi() _tandem_params.setParamLabelValue("spectrum, threads", ui->st_edit->text()); + _tandem_params.setParamLabelValue("spectrum, timstof MS2 filters", + ui->ttfparam_edit->text()); _tandem_params.setParamLabelValue("protein, cleavage site", ui->pcs_edit->text()); @@ -923,12 +949,6 @@ EditTandemPresetDialog::readUi() _tandem_params.setParamLabelValue("output, xsl path", ui->oxp_edit->text()); - if(ui->centroid_group_box->isChecked()) - { - QString centroid_parameters = createCentroidParameter(); - _tandem_params.setParamLabelValue( - "spectrum, timstof MS2 centroid parameters", centroid_parameters); - } } catch(pappso::PappsoException &error) { @@ -942,7 +962,11 @@ EditTandemPresetDialog::populate() qDebug() << __FILE__ << " " << __FUNCTION__ << " " << __LINE__; try { - ui->method_name_line_edit->setText(_tandem_params.getMethodName()); + if(!_tandem_params.getMethodName().isEmpty()) + { + ui->method_name_label->setText( + tr("%1 loaded").arg(_tandem_params.getMethodName())); + } /* * ppm @@ -1084,6 +1108,8 @@ EditTandemPresetDialog::populate() //1 ui->st_edit->setText(_tandem_params.getValue("spectrum, threads")); + ui->ttfparam_edit->setText( + _tandem_params.getValue("spectrum, timstof MS2 filters")); //[RK]|{P} ui->pcs_edit->setText(_tandem_params.getValue("protein, cleavage site")); @@ -1508,26 +1534,6 @@ EditTandemPresetDialog::populate() //no //tandem-style.xsl ui->oxp_edit->setText(_tandem_params.getValue("output, xsl path")); - - try - { - QStringList centroid_parameters = - _tandem_params.getValue("spectrum, timstof MS2 centroid parameters") - .split(" "); - ui->instru_res_line->setText(centroid_parameters.at(0)); - ui->smwi_line->setText(centroid_parameters.at(1)); - ui->intwi_line->setText(centroid_parameters.at(2)); - ui->intthre_line->setText(centroid_parameters.at(3)); - ui->centroid_group_box->setChecked(true); - } - catch(pappso::ExceptionNotFound &error) - { - ui->instru_res_line->setText("20000"); - ui->smwi_line->setText("2.0"); - ui->intwi_line->setText("4"); - ui->intthre_line->setText("10.0"); - ui->centroid_group_box->setChecked(false); - } } catch(pappso::ExceptionNotFound &error) { @@ -1548,12 +1554,25 @@ EditTandemPresetDialog::done(int r) readUi(); if(!_p_tandem_preset_file->exists()) { - QMessageBox::warning( + int ok = QMessageBox::warning( this, tr("Save parameters"), - tr("Parameters file does not exists.\nPlease save it before " - "pressing ok or cancel edition")); - return; + tr("Parameters file does not exist.\nDo you want to save a file " + "named %1") + .arg(_p_tandem_preset_file->getMethodName()), + QMessageBox::Cancel, + QMessageBox::Save); + + if(ok == QMessageBox::Cancel) + { + return; + } + else if(ok == QMessageBox::Save) + { + doSave(); + QDialog::done(r); + return; + } } TandemParameters ref_params = _p_tandem_preset_file->getTandemParameters(); @@ -1564,12 +1583,25 @@ EditTandemPresetDialog::done(int r) } else { - QMessageBox::warning( - this, - tr("Save parameters"), - tr("Parameters modified but not saved.\nPlease save it before " - "pressing ok or cancel edition")); - return; + int ok = + QMessageBox::warning(this, + tr("Save parameters"), + tr("Parameters modified but not saved in the " + "file %1.\nDo you want to save it ?") + .arg(_p_tandem_preset_file->getMethodName()), + QMessageBox::Cancel, + QMessageBox::Save); + + if(ok == QMessageBox::Cancel) + { + return; + } + else if(ok == QMessageBox::Save) + { + doSave(); + QDialog::done(r); + return; + } } } else // cancel, close or exc was pressed @@ -1579,30 +1611,18 @@ EditTandemPresetDialog::done(int r) } } -QString -EditTandemPresetDialog::createCentroidParameter() +void +EditTandemPresetDialog::fillPresetDirectoryLabel() { - QString centroid_parameter; - bool instru_bool; - ui->instru_res_line->text().toDouble(&instru_bool); - bool intwi_bool; - ui->intwi_line->text().toDouble(&intwi_bool); - bool smowi_bool; - ui->smwi_line->text().toDouble(&smowi_bool); - bool intthre_bool; - ui->intthre_line->text().toDouble(&intthre_bool); - if(instru_bool && intwi_bool && smowi_bool && intthre_bool) - { - centroid_parameter = - ui->instru_res_line->text() + " " + ui->smwi_line->text() + " " + - ui->intwi_line->text() + " " + ui->intthre_line->text(); - } - else + if(!_preset_directory.isEmpty()) { - throw pappso::PappsoException( - tr("At least one of the centroid parameters hasn't right format\n Must " - "be Integer or " - "Double\nPlease refer to the help page")); + if(QFileInfo(_preset_directory).exists() && + QFileInfo(_preset_directory).isDir()) + { + ui->label_loaded_directory->setText( + tr("%1 directory selected").arg(_preset_directory)); + ui->preset_combo_box->setEnabled(true); + ui->pushButton->setEnabled(true); + } } - return centroid_parameter; } diff --git a/src/gui/edit/edit_tandem_preset_dialog/edittandempresetdialog.h b/src/gui/edit/edit_tandem_preset_dialog/edittandempresetdialog.h index cbe59cdcecc33cab4b57f4e90dcf339dc58abd3c..842f8ab106463b273cef556d75bf0b4ad6304a4f 100644 --- a/src/gui/edit/edit_tandem_preset_dialog/edittandempresetdialog.h +++ b/src/gui/edit/edit_tandem_preset_dialog/edittandempresetdialog.h @@ -56,7 +56,6 @@ class EditTandemPresetDialog : public QDialog public slots: void doHelp(); - void doSave(); void doCopy(); void doEdit(QString value); void doResultType(); @@ -65,10 +64,11 @@ class EditTandemPresetDialog : public QDialog void doSelectDir(); private: + void doSave(); void fillPresetComboBox(); + void fillPresetDirectoryLabel(); void populate(); void readUi(); - QString createCentroidParameter(); private: Ui::EditTandemPresetView *ui; diff --git a/src/gui/lists/ms_identification_run_list_view/msidentificationlistwindow.cpp b/src/gui/lists/ms_identification_run_list_view/msidentificationlistwindow.cpp index 3981fb95722f77f4a0a5b7cab7c191847473bf91..90206ab1c67b16c04c71ae3a54f13fea5e009edc 100644 --- a/src/gui/lists/ms_identification_run_list_view/msidentificationlistwindow.cpp +++ b/src/gui/lists/ms_identification_run_list_view/msidentificationlistwindow.cpp @@ -43,17 +43,10 @@ MsIdentificationListQActionColumn::MsIdentificationListQActionColumn( m_column = column; m_msid_list_window = parent; -#if QT_VERSION >= 0x050000 - // Qt5 code connect(this, &MsIdentificationListQActionColumn::toggled, this, &MsIdentificationListQActionColumn::doToggled); - -#else - // Qt4 code - connect(this, SIGNAL(toggled(bool)), this, SLOT(doToggled(bool))); -#endif } MsIdentificationListQActionColumn::~MsIdentificationListQActionColumn() @@ -80,12 +73,14 @@ MsIdentificationListWindow::MsIdentificationListWindow(ProjectWindow *parent) ui->setupUi(this); setWindowIcon(QIcon(":/xtpcpp_icon/resources/xtandempipeline_icon.svg")); + // Set Window title based on project name if(mp_projectWindow->getProjectP() != nullptr) { setWindowTitle(QString("%1 - Ms Identification list") .arg(mp_projectWindow->getProjectP()->getProjectName())); } + // Configure the dynamic table mp_msidTableModel = new MsIdentificationTableModel(this, mp_projectWindow->getProjectP()); @@ -97,7 +92,7 @@ MsIdentificationListWindow::MsIdentificationListWindow(ProjectWindow *parent) ui->tableView->setSortingEnabled(true); ui->tableView->horizontalHeader()->setSectionsMovable(true); - + // Add the col name to the hide/show menu MsIdentificationListQActionColumn *p_action; for(int i = 0; i < mp_msidTableModel->columnCount(); i++) { @@ -106,6 +101,10 @@ MsIdentificationListWindow::MsIdentificationListWindow(ProjectWindow *parent) ui->menuColumns->addAction(p_action); } + // Create the copying path menu + mp_copyPathMenu = new QMenu(); + + // Handle signals/slots connect(this, &MsIdentificationListWindow::MsIdentificationDataChanged, mp_msidTableModel, @@ -138,6 +137,10 @@ MsIdentificationListWindow::MsIdentificationListWindow(ProjectWindow *parent) &QAction::triggered, mp_projectWindow, &ProjectWindow::doOpenMassChroQDialog); + connect(mp_copyPathMenu, + &QMenu::triggered, + this, + &MsIdentificationListWindow::doCopyPath); } @@ -189,10 +192,13 @@ MsIdentificationListWindow::onMsIdentificationSearchEdit( void MsIdentificationListWindow::showGroupsContextMenu(const QPoint &pos) { - QModelIndex index = ui->tableView->indexAt(pos); + QModelIndex corrected_index = + mp_proxyModel->mapToSource(ui->tableView->indexAt(pos)); - qDebug() << "check the column" << index.column(); - if(index.column() == (std::int8_t)msIdentificationListColumn::align_groups) + qDebug() << "check the column" << corrected_index.column(); + // Handle Alignement Groups + if(corrected_index.column() == + (std::int8_t)msIdentificationListColumn::align_groups) { if(mp_groups_context_menu == nullptr) { @@ -205,8 +211,83 @@ MsIdentificationListWindow::showGroupsContextMenu(const QPoint &pos) mp_groups_context_menu->exec(QCursor::pos()); } } + + // Handle the file path copy to clipboard + if(corrected_index.column() == + (std::int8_t)msIdentificationListColumn::id_file || + corrected_index.column() == (std::int8_t)msIdentificationListColumn::mzML) + { + mp_copyPathMenu->clear(); + QAction *copy_action = + new QAction(QIcon::fromTheme("edit-copy"), "copy path"); + mp_copyPathMenu->addAction(copy_action); + m_askIndex = corrected_index; + mp_copyPathMenu->exec(QCursor::pos()); + } + + // Handle multiple path copy to clipboard + if(corrected_index.column() == + (std::int8_t)msIdentificationListColumn::fasta_file) + { + mp_copyPathMenu->clear(); + QMenu *copy_menu = new QMenu("copy path"); + copy_menu->setIcon(QIcon::fromTheme("edit-copy")); + std::vector fasta_list = + mp_msidTableModel->getIdentificationDataSourceSpList() + .at(corrected_index.row()) + ->getFastaFileList(); + + for(FastaFileSp fasta_file : fasta_list) + { + copy_menu->addAction(QString("%1").arg(fasta_file->getFilename())); + } + mp_copyPathMenu->addMenu(copy_menu); + + m_askIndex = corrected_index; + mp_copyPathMenu->exec(QCursor::pos()); + } } +void +MsIdentificationListWindow::doCopyPath(QAction *action) +{ + QString path; + if(action->text() == "copy path") + { + + if(m_askIndex.column() == + (std::int8_t)msIdentificationListColumn::id_file) + { + path = mp_msidTableModel->getIdentificationDataSourceSpList() + .at(m_askIndex.row()) + ->getResourceName(); + } + if(m_askIndex.column() == (std::int8_t)msIdentificationListColumn::mzML) + { + path = mp_msidTableModel->getIdentificationDataSourceSpList() + .at(m_askIndex.row()) + ->getMsRunSp() + ->getFileName(); + } + } + else // fasta file path asked to be copied + { + std::vector fasta_list = + mp_msidTableModel->getIdentificationDataSourceSpList() + .at(m_askIndex.row()) + ->getFastaFileList(); + for(FastaFileSp fasta_file : fasta_list) + { + if(fasta_file->getFilename() == action->text()) + { + path = fasta_file->getAbsoluteFilePath(); + } + } + } + qDebug() << path << "copied"; + QClipboard *clipboard = QGuiApplication::clipboard(); + clipboard->setText(path); +} void MsIdentificationListWindow::updateStatusBar() diff --git a/src/gui/lists/ms_identification_run_list_view/msidentificationlistwindow.h b/src/gui/lists/ms_identification_run_list_view/msidentificationlistwindow.h index 682c5df7121f0fde34558baf642abd16019ef13f..63cf200d329ac3f96a0c14de47bbb7430117f9a4 100644 --- a/src/gui/lists/ms_identification_run_list_view/msidentificationlistwindow.h +++ b/src/gui/lists/ms_identification_run_list_view/msidentificationlistwindow.h @@ -86,7 +86,7 @@ class MsIdentificationListWindow : public QMainWindow public slots: void doExportAsOdsFile(); void doProjectNameChanged(QString name); - + void doCopyPath(QAction *action); signals: void MsIdentificationDataChanged(); @@ -98,7 +98,8 @@ class MsIdentificationListWindow : public QMainWindow void updateStatusBar(); void onMsIdentificationSearchEdit(QString protein_search_string); void showGroupsContextMenu(const QPoint &); - + + protected: void askEngineDetailView(IdentificationDataSourceSp *identificationEngine); @@ -109,4 +110,6 @@ class MsIdentificationListWindow : public QMainWindow MassChroqRunDialog *mp_export_masschroq_dialog = nullptr; ProjectWindow *mp_projectWindow; AlignmentGroupsQMenu *mp_groups_context_menu = nullptr; + QMenu *mp_copyPathMenu = nullptr; + QModelIndex m_askIndex; }; diff --git a/src/gui/lists/ms_identification_run_list_view/msidentificationtablemodel.cpp b/src/gui/lists/ms_identification_run_list_view/msidentificationtablemodel.cpp index ca233dd3ae7128afcbc446d22c595e31fbf05a0e..bff273b65feaf24bb540ad41fcfe239dc40fb32f 100644 --- a/src/gui/lists/ms_identification_run_list_view/msidentificationtablemodel.cpp +++ b/src/gui/lists/ms_identification_run_list_view/msidentificationtablemodel.cpp @@ -128,6 +128,9 @@ MsIdentificationTableModel::getTitle(std::int8_t column) case(std::int8_t)msIdentificationListColumn::engine_name: return "Identification engine"; break; + case(std::int8_t)msIdentificationListColumn::fasta_file: + return "Fasta file(s)"; + break; case(std::int8_t)msIdentificationListColumn::nbr_spectrum: return "Total spectra used"; break; @@ -188,6 +191,9 @@ MsIdentificationTableModel::getDescription(std::int8_t column) case(std::int8_t)msIdentificationListColumn::engine_name: return "Engine Name"; break; + case(std::int8_t)msIdentificationListColumn::fasta_file: + return "Fasta files used in identification"; + break; case(std::int8_t)msIdentificationListColumn::nbr_spectrum: return "Number of Spectrum"; break; @@ -346,6 +352,24 @@ MsIdentificationTableModel::data(const QModelIndex &index, int role) const m_identificationDataSourceSpList.at(row) ->getIdentificationEngineVersion()); } + if(col == (std::int8_t)msIdentificationListColumn::fasta_file) + { + std::vector fasta_list = + m_identificationDataSourceSpList.at(row)->getFastaFileList(); + if(fasta_list.size() == 1) + { + return QVariant(fasta_list.front()->getFilename()); + } + else if(fasta_list.size() == 0) + { + return QVariant("No fasta file used"); + } + else // more than one fasta file listed + { + return QVariant(QString::number(fasta_list.size()) + + " fasta used"); + } + } if(col == (std::int8_t)msIdentificationListColumn::id_msrun_id) { return QVariant(m_identificationDataSourceSpList.at(row) @@ -431,6 +455,17 @@ MsIdentificationTableModel::data(const QModelIndex &index, int role) const .get() ->getFileName()); } + if(col == (std::int8_t)msIdentificationListColumn::fasta_file) + { + std::vector fasta_list = + m_identificationDataSourceSpList.at(row)->getFastaFileList(); + QString tool_tip; + for(FastaFileSp fasta_file : fasta_list) + { + tool_tip += fasta_file->getAbsoluteFilePath() + "\n"; + } + return QVariant(tool_tip); + } return QVariant(); case Qt::DecorationRole: diff --git a/src/gui/lists/ms_identification_run_list_view/msidentificationtablemodel.h b/src/gui/lists/ms_identification_run_list_view/msidentificationtablemodel.h index c843159fa762e6e13b86a856db676ec879a6822a..d9c535cd5bc5b48213f48e51b5c30ca457f3604e 100644 --- a/src/gui/lists/ms_identification_run_list_view/msidentificationtablemodel.h +++ b/src/gui/lists/ms_identification_run_list_view/msidentificationtablemodel.h @@ -42,18 +42,19 @@ enum class msIdentificationListColumn : std::int8_t id_file = 2, ///< file ID mzML = 3, ///< accession engine_name = 4, ///< engine name - nbr_spectrum = 5, ///< number of spectrum - nbr_peptide = 6, ///< number of peptide identified - nbr_unique = 7, ///< number of unique spectra - percent_assign = 8, ///< percent of assignation - id_msrun_id = 9, ///< identification of MsRunId - nb_ms_1 = 10, ///< number of ms1 - nb_ms_2 = 11, ///< number of ms2 - nb_ms_3 = 12, ///< number of ms3 - nb_tic_1 = 13, ///< number of TIC 1 - nb_tic_2 = 14, ///< number of TIC 2 - nb_tic_3 = 15, ///< number of TIC 3 - last = 16, ///< get list size + fasta_file = 5, ///< fasta files + nbr_spectrum = 6, ///< number of spectrum + nbr_peptide = 7, ///< number of peptide identified + nbr_unique = 8, ///< number of unique spectra + percent_assign = 9, ///< percent of assignation + id_msrun_id = 10, ///< identification of MsRunId + nb_ms_1 = 11, ///< number of ms1 + nb_ms_2 = 12, ///< number of ms2 + nb_ms_3 = 13, ///< number of ms3 + nb_tic_1 = 14, ///< number of TIC 1 + nb_tic_2 = 15, ///< number of TIC 2 + nb_tic_3 = 16, ///< number of TIC 3 + last = 17, ///< get list size }; class MsIdentificationListWindow; diff --git a/src/gui/widgets/engines_view/xtandem_view_widget.ui b/src/gui/widgets/engines_view/xtandem_view_widget.ui index a1c852b4f8d2a615d296c18e685b44d7d46ae17a..f3ee326d766cb53fa6dae07cff2a7f78e04c0d0a 100644 --- a/src/gui/widgets/engines_view/xtandem_view_widget.ui +++ b/src/gui/widgets/engines_view/xtandem_view_widget.ui @@ -36,9 +36,9 @@ 0 - 0 + -142 783 - 641 + 674 @@ -47,6 +47,16 @@ + + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + true + + + @@ -79,16 +89,6 @@ - - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - true - - - @@ -975,6 +975,36 @@ + + + + TimsTOF filters + parameters + + + + + + + + + + ... + + + + :/icons/resources/icons/icon_info.svg:/icons/resources/icons/icon_info.svg + + + + 20 + 20 + + + + true + + + @@ -984,8 +1014,8 @@ 0 0 - 797 - 524 + 408 + 344 @@ -1493,8 +1523,8 @@ 0 0 - 797 - 524 + 279 + 185 @@ -1770,8 +1800,8 @@ 0 0 - 797 - 524 + 398 + 350 @@ -2291,8 +2321,8 @@ 0 - -84 - 783 + 0 + 414 608 @@ -3193,8 +3223,8 @@ 0 0 - 797 - 524 + 362 + 449 @@ -5218,6 +5248,22 @@ + + ttfparam_button + clicked() + XtandemParamWidget + doHelp() + + + 767 + 550 + + + 585 + 369 + + + doHelp() diff --git a/src/gui/widgets/engines_view/xtandemparamwidget.cpp b/src/gui/widgets/engines_view/xtandemparamwidget.cpp index aa9e4ac9b95e756ce60e9f2211315f808baf3595..8cc7dd899f34038c743beb03029542de896f2855 100644 --- a/src/gui/widgets/engines_view/xtandemparamwidget.cpp +++ b/src/gui/widgets/engines_view/xtandemparamwidget.cpp @@ -344,7 +344,10 @@ XtandemParamWidget::doHelp() { html_doc.setFileName(":/tandem/resources/html_doc/oxp.html"); } - + if(senderObjName == "ttfparam_button") + { + html_doc.setFileName(":/tandem/resources/html_doc/ttfparam.html"); + } if(html_doc.open(QFile::ReadOnly | QFile::Text)) { QTextStream in(&html_doc); @@ -378,8 +381,7 @@ XtandemParamWidget::setSpectrumParameters(TandemParameters xtandem_parameters) ui->useChemicalAverageOrMonoisotopicMassForFragmentIonsLineEdit->setText( xtandem_parameters.getValue("spectrum, fragment mass type")); ui->unitsForFragmentIonMassToleranceMonoisotopicLineEdit->setText( - xtandem_parameters.getValue( - "spectrum, fragment monoisotopic mass error")); + xtandem_parameters.getValue("spectrum, fragment monoisotopic mass error")); ui->fragmentIonMassToleranceMonoisotopicLineEdit->setText( xtandem_parameters.getValue( "spectrum, parent monoisotopic mass error minus")); @@ -405,6 +407,8 @@ XtandemParamWidget::setSpectrumParameters(TandemParameters xtandem_parameters) xtandem_parameters.getValue("spectrum, use contrast angle")); ui->setNumberOfThreadsLineEdit->setText( xtandem_parameters.getValue("spectrum, threads")); + ui->ttfparam_edit->setText( + xtandem_parameters.getValue("spectrum, timstof MS2 filters")); } void diff --git a/src/resources/html_doc/ttcp.html b/src/resources/html_doc/ttfparam.html similarity index 70% rename from src/resources/html_doc/ttcp.html rename to src/resources/html_doc/ttfparam.html index 773519edad09eaa641feed7eb458b7f0e911ab13..5292c7c39f624c2392480f80fc8ddae583ab6892 100644 --- a/src/resources/html_doc/ttcp.html +++ b/src/resources/html_doc/ttfparam.html @@ -102,50 +102,32 @@ td {
-

Centroid Parameters

-

Instrument resolution

-

Syntax

-

The value.

-

Notes

+

TimsTOF Parameters

+ +

Syntax :

+filterName1|param1;param2 filterName2|param1;param2 +

Impleted filters

+

Deconvolution filter

+

filter name :

+

chargeDeconvolution

+

Parameters

    -
  1. TODO
  2. -
  3. TODO
  4. +
  5. The precision: composed of two parts the numeric value and the unit
-

Description

-

TODO

+

Example

+chargeDeconvolution|0.02dalton -

Smooth width

-

Syntax

-

The value.

-

Notes

+

Ion enhancer filter

+

filter name :

+

complementIonEnhancer

+

Parameters

    -
  1. TODO
  2. -
  3. TODO
  4. +
  5. The targeted mass of the peak pair
  6. +
  7. The precision: composed of two parts the numeric value and the unit
-

Description

-

TODO

+

Example

+complementIonEnhancer|456.567;0.02dalton -

Integration resolution

-

Syntax

-

The value.

-

Notes

-
    -
  1. TODO
  2. -
  3. TODO
  4. -
-

Description

-

TODO

- -

Intensity threshold

-

Syntax

-

The value.

-

Notes

-
    -
  1. TODO
  2. -
  3. TODO
  4. -
-

Description

-

TODO

diff --git a/src/xtpcpp.qrc b/src/xtpcpp.qrc index 0abcb32ee214798ce1dc508ee031e41560250e20..2c04b3551d096f04a4db6a45974f26854c087ff3 100644 --- a/src/xtpcpp.qrc +++ b/src/xtpcpp.qrc @@ -86,7 +86,7 @@ resources/html_doc/sxi.html resources/html_doc/syi.html resources/html_doc/szi.html - resources/html_doc/ttcp.html + resources/html_doc/ttfparam.html resources/html_doc/uml_index.html resources/model/QExactive_analysis_FDR_nosemi.xml