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

WIP: writing PTM islands

parent d81ace80
No related branches found
No related tags found
No related merge requests found
......@@ -156,3 +156,8 @@ void Project::setLabelingMethodSp(LabelingMethodSp labeling_method_sp) {
LabelingMethodSp Project::getLabelingMethodSp() const {
return _labeling_method_sp;
}
bool Project::hasPtmExperiment() const {
if (getIdentificationGroupList().at(0)->getPtmGroupingExperiment() != nullptr) return true;
return false;
}
......@@ -83,6 +83,8 @@ public:
* */
LabelingMethodSp getLabelingMethodSp() const;
bool hasPtmExperiment() const;
private :
LabelingMethodSp _labeling_method_sp;
bool _is_combine_mode =true;
......
......@@ -123,6 +123,25 @@
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="ptm_groupbox">
<property name="enabled">
<bool>false</bool>
</property>
<property name="title">
<string>PTM</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QCheckBox" name="ptmislands_checkbox">
<property name="text">
<string>PTM islands</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
</layout>
</widget>
</item>
......@@ -169,7 +188,7 @@
<hints>
<hint type="sourcelabel">
<x>665</x>
<y>454</y>
<y>523</y>
</hint>
<hint type="destinationlabel">
<x>286</x>
......@@ -184,8 +203,8 @@
<slot>reject()</slot>
<hints>
<hint type="sourcelabel">
<x>574</x>
<y>454</y>
<x>579</x>
<y>523</y>
</hint>
<hint type="destinationlabel">
<x>286</x>
......@@ -216,8 +235,8 @@
<slot>doGroups(bool)</slot>
<hints>
<hint type="sourcelabel">
<x>189</x>
<y>74</y>
<x>210</x>
<y>101</y>
</hint>
<hint type="destinationlabel">
<x>839</x>
......@@ -232,8 +251,8 @@
<slot>doProteins(bool)</slot>
<hints>
<hint type="sourcelabel">
<x>87</x>
<y>101</y>
<x>108</x>
<y>133</y>
</hint>
<hint type="destinationlabel">
<x>814</x>
......@@ -248,8 +267,8 @@
<slot>doPeptides(bool)</slot>
<hints>
<hint type="sourcelabel">
<x>361</x>
<y>130</y>
<x>382</x>
<y>165</y>
</hint>
<hint type="destinationlabel">
<x>857</x>
......@@ -264,8 +283,8 @@
<slot>doSpectra(bool)</slot>
<hints>
<hint type="sourcelabel">
<x>78</x>
<y>159</y>
<x>99</x>
<y>197</y>
</hint>
<hint type="destinationlabel">
<x>760</x>
......@@ -280,8 +299,8 @@
<slot>doPeptidePos(bool)</slot>
<hints>
<hint type="sourcelabel">
<x>296</x>
<y>184</y>
<x>317</x>
<y>229</y>
</hint>
<hint type="destinationlabel">
<x>764</x>
......@@ -296,8 +315,8 @@
<slot>doSamples(bool)</slot>
<hints>
<hint type="sourcelabel">
<x>223</x>
<y>206</y>
<x>244</x>
<y>261</y>
</hint>
<hint type="destinationlabel">
<x>835</x>
......@@ -312,8 +331,8 @@
<slot>doComparSpectra(bool)</slot>
<hints>
<hint type="sourcelabel">
<x>91</x>
<y>261</y>
<x>124</x>
<y>328</y>
</hint>
<hint type="destinationlabel">
<x>785</x>
......@@ -328,8 +347,8 @@
<slot>doComparUniqueSequence(bool)</slot>
<hints>
<hint type="sourcelabel">
<x>378</x>
<y>262</y>
<x>437</x>
<y>328</y>
</hint>
<hint type="destinationlabel">
<x>836</x>
......@@ -344,8 +363,8 @@
<slot>doComparSpecificSpectra(bool)</slot>
<hints>
<hint type="sourcelabel">
<x>198</x>
<y>304</y>
<x>231</x>
<y>360</y>
</hint>
<hint type="destinationlabel">
<x>736</x>
......@@ -360,8 +379,8 @@
<slot>doComparSpecificUniqueSequence(bool)</slot>
<hints>
<hint type="sourcelabel">
<x>322</x>
<y>290</y>
<x>437</x>
<y>360</y>
</hint>
<hint type="destinationlabel">
<x>753</x>
......@@ -376,8 +395,8 @@
<slot>doComparPai(bool)</slot>
<hints>
<hint type="sourcelabel">
<x>535</x>
<y>268</y>
<x>642</x>
<y>328</y>
</hint>
<hint type="destinationlabel">
<x>790</x>
......@@ -392,8 +411,8 @@
<slot>doComparEmpai(bool)</slot>
<hints>
<hint type="sourcelabel">
<x>492</x>
<y>295</y>
<x>642</x>
<y>360</y>
</hint>
<hint type="destinationlabel">
<x>793</x>
......@@ -401,6 +420,22 @@
</hint>
</hints>
</connection>
<connection>
<sender>ptmislands_checkbox</sender>
<signal>clicked(bool)</signal>
<receiver>ExportSpreadsheetDialog</receiver>
<slot>doPtmIslands(bool)</slot>
<hints>
<hint type="sourcelabel">
<x>79</x>
<y>427</y>
</hint>
<hint type="destinationlabel">
<x>765</x>
<y>477</y>
</hint>
</hints>
</connection>
</connections>
<slots>
<slot>reject()</slot>
......@@ -418,5 +453,6 @@
<slot>doComparSpecificUniqueSequence(bool)</slot>
<slot>doComparPai(bool)</slot>
<slot>doComparEmpai(bool)</slot>
<slot>doPtmIslands(bool)</slot>
</slots>
</ui>
......@@ -91,6 +91,10 @@ ExportSpreadsheetDialog::ExportSpreadsheetDialog(QWidget * parent):
if (settings.value("export_ods/samples", "true").toBool()) {
ui->samples_checkbox->setCheckState(Qt::Checked);
}
ui->ptmislands_checkbox->setCheckState(Qt::Unchecked);
if (settings.value("export_ods/ptmislands", "true").toBool()) {
ui->ptmislands_checkbox->setCheckState(Qt::Checked);
}
//param.setFilterCrossSamplePeptideNumber(settings.value("automatic_filter/cross_sample", "true").toBool());
#if QT_VERSION >= 0x050000
......@@ -188,3 +192,14 @@ void ExportSpreadsheetDialog::doProteinList(bool simple) {
QSettings settings;
settings.setValue("export_ods/proteins", QString("%1").arg(simple));
}
void ExportSpreadsheetDialog::doPtmIslands(bool simple) {
QSettings settings;
settings.setValue("export_ods/ptmislands", QString("%1").arg(simple));
}
void ExportSpreadsheetDialog::disablePtm() {
ui->ptm_groupbox->setDisabled(true);
}
void ExportSpreadsheetDialog::enablePtm() {
ui->ptm_groupbox->setEnabled(true);
}
......@@ -43,6 +43,8 @@ public:
explicit ExportSpreadsheetDialog(QWidget * parent);
~ExportSpreadsheetDialog();
void disablePtm();
void enablePtm();
public slots:
void doSimpleProteinPeptideList(bool simple);
......@@ -59,6 +61,7 @@ public slots:
void doSpectra(bool simple);
void doPeptides(bool simple);
void doProteins(bool simple);
void doPtmIslands(bool simple);
signals:
......
......@@ -274,6 +274,12 @@ void MainWindow::doActionSpreadsheet() {
qDebug() << "MainWindow::doActionSpreadsheet begin";
try {
_p_export_spreadsheet_dialog->disablePtm();
if (_project_sp.get() != nullptr) {
if (_project_sp.get()->hasPtmExperiment()) {
_p_export_spreadsheet_dialog->enablePtm();
}
}
_p_export_spreadsheet_dialog->show();
_p_export_spreadsheet_dialog->raise();
_p_export_spreadsheet_dialog->activateWindow();
......
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