diff --git a/src/core/peptidematch.cpp b/src/core/peptidematch.cpp index 5498b269e85e7b3fdcc732e945261828a795b06d..911e1b71125f3564280b55d48536e82438d2522a 100644 --- a/src/core/peptidematch.cpp +++ b/src/core/peptidematch.cpp @@ -31,7 +31,6 @@ PeptideMatch::PeptideMatch() { PeptideMatch::PeptideMatch(const PeptideMatch & other) { _start=other._start; _p_peptide_evidence = other._p_peptide_evidence; - } bool PeptideMatch::operator==(const PeptideMatch & other) const { if ((_p_peptide_evidence == other._p_peptide_evidence) && (_start == other._start)) { diff --git a/src/grouping/ptm/ptmsamplescan.cpp b/src/grouping/ptm/ptmsamplescan.cpp index 71a1abb5727c332bc51c17ac535a80b05d7708f4..328bbe4c5ee6aa9c2384352a8a27b6430227208a 100644 --- a/src/grouping/ptm/ptmsamplescan.cpp +++ b/src/grouping/ptm/ptmsamplescan.cpp @@ -136,6 +136,6 @@ const QString PtmSampleScan::getHtmlSequence(const PtmGroupingExperiment * p_ptm return sequence_html; } -const std::vector<PeptideMatch> & PtmSampleScan::getPeptideMatchList() const { +std::vector<PeptideMatch> & PtmSampleScan::getPeptideMatchList() { return _peptide_match_list; } diff --git a/src/grouping/ptm/ptmsamplescan.h b/src/grouping/ptm/ptmsamplescan.h index 3ff57ed59f3e779f735990b6947b4e180f13a259..78d07c16756d46682db0b3478a092839f766ccb9 100644 --- a/src/grouping/ptm/ptmsamplescan.h +++ b/src/grouping/ptm/ptmsamplescan.h @@ -53,7 +53,7 @@ public: std::vector<unsigned int> getBestPtmPositionList(const PtmGroupingExperiment * p_ptm_grouping_experiment) const; std::vector<unsigned int> getObservedPtmPositionList(const PtmGroupingExperiment * p_ptm_grouping_experiment) const; const QString getHtmlSequence(const PtmGroupingExperiment * p_ptm_grouping_experiment) const; - const std::vector<PeptideMatch> & getPeptideMatchList() const; + std::vector<PeptideMatch> & getPeptideMatchList(); private: std::vector<PeptideMatch> _peptide_match_list; diff --git a/src/gui/peptide_detail_view/peptidewindow.cpp b/src/gui/peptide_detail_view/peptidewindow.cpp index 6a7aae1756933208878913572afee7d657e2fa6b..54680bf487ca1667c5103293a289de472009ca94 100644 --- a/src/gui/peptide_detail_view/peptidewindow.cpp +++ b/src/gui/peptide_detail_view/peptidewindow.cpp @@ -84,7 +84,7 @@ PeptideWindow::PeptideWindow(ProjectWindow *parent): ui->file_not_found->setVisible(false); - + _mz_label = new QLabel(""); ui->statusbar->addWidget(_mz_label); QWidget * p_spacer = new QWidget(); @@ -130,8 +130,8 @@ void PeptideWindow::setIon(pappso::PeakIonIsotopeMatch ion) { QString plusstr = "+"; plusstr = plusstr.repeated(ion.getCharge()); _ion_label->setText(QString("%1%2%3 (+%4) - th. isotope ratio %5%").arg(ion.getPeptideFragmentIonSp().get()->getPeptideIonName()).arg(ion.getPeptideFragmentIonSp().get()->size()).arg(plusstr).arg(ion.getPeptideNaturalIsotopeAverageSp().get()->getIsotopeNumber()).arg((int)(ion.getPeptideNaturalIsotopeAverageSp().get()->getIntensityRatio()*100))); - - + + } void PeptideWindow::setPeak(const pappso::Peak * p_peak_match) { @@ -206,7 +206,7 @@ void PeptideWindow::chooseDefaultMzDataDir() { qDebug() << "PeptideWindow::chooseDefaultMzDataDir begin"; ui->file_not_found->setVisible(false); - ui->xic_button->setEnabled(true); + ui->xic_button->setEnabled(true); ui->spectrum_widget->setVisible(true); emit loadSpectrumSp(_p_peptide_evidence); ui->statusbar->showMessage(tr("loading spectrum")); @@ -280,23 +280,28 @@ void PeptideWindow::doSpectrumSpReady(pappso::SpectrumSp spectrum_sp, QString er } void PeptideWindow::setPeptideEvidence(PeptideEvidence * p_peptide_evidence) { - qDebug() << "PeptideWindow::setPeptideEvidence begin"; + qDebug() << "PeptideWindow::setPeptideEvidence begin " << p_peptide_evidence; _p_peptide_evidence = p_peptide_evidence; _spectrum_is_ready = false; - qDebug() << "PeptideWindow::setPeptideEvidence emit loadSpectrumSp(_p_peptide_match)"; + qDebug() << "PeptideWindow::setPeptideEvidence 1"; ui->file_not_found->setVisible(false); ui->spectrum_widget->setVisible(true); ui->statusbar->showMessage(tr("loading spectrum")); + qDebug() << "PeptideWindow::setPeptideEvidence 2"; pappso::PeptideSp peptide = _p_peptide_evidence->getPeptideXtpSp(); + qDebug() << "PeptideWindow::setPeptideEvidence 3"; ui->spectrum_widget->setMs2Precision(_p_precision); ui->spectrum_widget->setPeptideCharge(_p_peptide_evidence->getCharge()); ui->spectrum_widget->setPeptideSp(peptide); + + qDebug() << "PeptideWindow::setPeptideEvidence 4"; //ui->spectrum_widget->plot(); updateDisplay(); + qDebug() << "PeptideWindow::setPeptideEvidence emit loadSpectrumSp(_p_peptide_match)"; emit loadSpectrumSp(_p_peptide_evidence); qDebug() << "PeptideWindow::setPeptideEvidence end"; } diff --git a/src/gui/project_view/projectwindow.cpp b/src/gui/project_view/projectwindow.cpp index ae2680806bf9d47d02cdae50898b522d32600055..804241d0f40f01ccd6b60ae9cf3a67dd7ac46cc8 100644 --- a/src/gui/project_view/projectwindow.cpp +++ b/src/gui/project_view/projectwindow.cpp @@ -487,7 +487,7 @@ void ProjectWindow::doViewPeptideList(IdentificationGroup * p_ident_group, Prote void ProjectWindow::doViewPeptideDetail(PeptideEvidence * peptide_evidence) { - qDebug() << "ProjectWindow::doViewPeptideDetail begin"; + qDebug() << "ProjectWindow::doViewPeptideDetail begin " << peptide_evidence; if (_peptide_detail_window_collection.size() == 0) { connectNewPeptideDetailWindow(); } diff --git a/src/gui/ptm_peptide_list_view/ptmpeptidelistwindow.cpp b/src/gui/ptm_peptide_list_view/ptmpeptidelistwindow.cpp index bae3597fdd05282a9cff580d70cc598b142d15bf..7babd9b4ba2106bde6d45b52309aa526310b1b22 100644 --- a/src/gui/ptm_peptide_list_view/ptmpeptidelistwindow.cpp +++ b/src/gui/ptm_peptide_list_view/ptmpeptidelistwindow.cpp @@ -81,9 +81,11 @@ void PtmPeptideListWindow::setPtmIsland(PtmIsland * p_ptm_island) { _ptm_table_model_p->setPtmIsland(_p_ptm_island_list_window->getIdentificationGroup()->getPtmGroupingExperiment(), _p_ptm_island); } -void PtmPeptideListWindow::askPeptideDetailView(PeptideMatch p_peptide_match) { - qDebug() << "PtmPeptideListWindow::askPeptideDetailView begin"; - emit requestPeptideDetailView(p_peptide_match.getPeptideEvidence()); +void PtmPeptideListWindow::askPeptideDetailView(PeptideEvidence * p_peptide_evidence) { + qDebug() << "PtmPeptideListWindow::askPeptideDetailView begin " << p_peptide_evidence; + //PeptideMatch peptide_match(* p_peptide_match); + //qDebug() << "PtmPeptideListWindow::askPeptideDetailView begin " << peptide_match.getPeptideEvidence(); + emit requestPeptideDetailView(p_peptide_evidence); qDebug() << "PtmPeptideListWindow::askPeptideDetailView end"; //updateStatusBar(); } diff --git a/src/gui/ptm_peptide_list_view/ptmpeptidelistwindow.h b/src/gui/ptm_peptide_list_view/ptmpeptidelistwindow.h index de7c6288de76808dd624a5fb2db116dd56b65aaa..b467c3aea7fa2198f5302d2b799daf62d72578e5 100644 --- a/src/gui/ptm_peptide_list_view/ptmpeptidelistwindow.h +++ b/src/gui/ptm_peptide_list_view/ptmpeptidelistwindow.h @@ -49,7 +49,7 @@ public: explicit PtmPeptideListWindow(PtmIslandListWindow * parent = 0); ~PtmPeptideListWindow(); void setPtmIsland(PtmIsland * p_ptm_island); - void askPeptideDetailView(PeptideMatch p_peptide_match); + void askPeptideDetailView(PeptideEvidence * p_peptide_evidence); signals: void requestPeptideDetailView(PeptideEvidence * p_peptide_evidence); diff --git a/src/gui/ptm_peptide_list_view/ptmpeptidetablemodel.cpp b/src/gui/ptm_peptide_list_view/ptmpeptidetablemodel.cpp index 94f7d00a9d6d91e2c1c08c192b5df75406d4a540..20a4f59fa8703b267eee86443f97c975533322f7 100644 --- a/src/gui/ptm_peptide_list_view/ptmpeptidetablemodel.cpp +++ b/src/gui/ptm_peptide_list_view/ptmpeptidetablemodel.cpp @@ -143,7 +143,7 @@ const QString PtmPeptideTableModel::getDescription(std::int8_t column) { return "peptide theoretical MH+"; break; case (std::int8_t) PtmPeptideListColumn::delta_mhplus: - return "peptide mass difference betwenn observed mass and theoretical mass"; + return "peptide mass difference between observed mass and theoretical mass"; break; case (std::int8_t) PtmPeptideListColumn::besthyperscore: return "best X!Tandem hyperscore"; diff --git a/src/gui/ptm_peptide_list_view/ptmpeptidetableproxymodel.cpp b/src/gui/ptm_peptide_list_view/ptmpeptidetableproxymodel.cpp index f049f03c30d45d57570aa658ca32173934a95d5c..2110b928879c2f6f99e252d80c126ac5283defd0 100644 --- a/src/gui/ptm_peptide_list_view/ptmpeptidetableproxymodel.cpp +++ b/src/gui/ptm_peptide_list_view/ptmpeptidetableproxymodel.cpp @@ -32,9 +32,8 @@ #include "../../grouping/ptm/ptmgroupingexperiment.h" #include <QTextDocument> -PtmPeptideMenuQicon::PtmPeptideMenuQicon(const PtmGroupingExperiment * p_ptm_grouping_experiment, const PtmSampleScan * p_ptm_sample, const PeptideMatch * p_peptide_match):QIcon() { +PtmPeptideMenuQicon::PtmPeptideMenuQicon(const PtmGroupingExperiment * p_ptm_grouping_experiment, const PtmSampleScan * p_ptm_sample, const PeptideMatch * p_peptide_match):QIcon(), _peptide_match(*p_peptide_match) { _p_ptm_sample_scan = p_ptm_sample; - _p_peptide_match = p_peptide_match; _p_ptm_grouping_experiment = p_ptm_grouping_experiment; } PtmPeptideMenuQicon::~PtmPeptideMenuQicon( ) { @@ -60,7 +59,7 @@ void PtmPeptideMenuQicon::paint(QPainter *painter, const QRect &rect, Qt::Alignm PtmPeptideMenuQaction::PtmPeptideMenuQaction(PtmPeptideTableProxyModel * parent, const PtmGroupingExperiment * p_ptm_grouping_experiment, const PtmSampleScan * p_ptm_sample, PeptideMatch * p_peptide_match):QAction(parent) { _p_ptm_peptide_table_proxy_model = parent; - _p_peptide_match = p_peptide_match; + _peptide_match = *p_peptide_match; this->setIcon(PtmPeptideMenuQicon(p_ptm_grouping_experiment, p_ptm_sample, p_peptide_match)); //this->setText(p_peptide_match->getPeptideXtpSp().get()->getSequence()); @@ -81,7 +80,11 @@ PtmPeptideMenuQaction::PtmPeptideMenuQaction(PtmPeptideTableProxyModel * parent, #endif } void PtmPeptideMenuQaction::doTriggered(bool triggered) { - _p_ptm_peptide_table_proxy_model->getPtmPeptideListWindowP()->askPeptideDetailView(*_p_peptide_match); + PeptideEvidence * p_peptide_evidence = _peptide_match.getPeptideEvidence(); + qDebug() << "PtmPeptideMenuQaction::doTriggered begin" << _peptide_match.getPeptideEvidence(); + qDebug() << "PtmPeptideMenuQaction::doTriggered begin 2 " << p_peptide_evidence; + qDebug() << "PtmPeptideMenuQaction::doTriggered begin 3 " << p_peptide_evidence->getPeptideXtpSp().get()->toString(); + _p_ptm_peptide_table_proxy_model->getPtmPeptideListWindowP()->askPeptideDetailView(p_peptide_evidence); } PtmPeptideMenuQaction::~PtmPeptideMenuQaction() @@ -153,7 +156,7 @@ void PtmPeptideTableProxyModel::onTableClicked(const QModelIndex &index) PtmSampleScanSp sp_ptm_sample_scan = _p_ptm_table_model->getPtmSampleScanSpList().at(row); if (sp_ptm_sample_scan.get()->getPeptideMatchList().size() == 1) { - _p_ptm_peptide_list_window->askPeptideDetailView(sp_ptm_sample_scan.get()->getPeptideMatchList().at(0)); + _p_ptm_peptide_list_window->askPeptideDetailView(sp_ptm_sample_scan.get()->getPeptideMatchList().at(0).getPeptideEvidence()); } else { this->showContextMenu(index); diff --git a/src/gui/ptm_peptide_list_view/ptmpeptidetableproxymodel.h b/src/gui/ptm_peptide_list_view/ptmpeptidetableproxymodel.h index a375082bb2789d5f5b5a927a4ab30072342934f3..373ca4d30f17a0f3c7b89b85f1b6903a4b765305 100644 --- a/src/gui/ptm_peptide_list_view/ptmpeptidetableproxymodel.h +++ b/src/gui/ptm_peptide_list_view/ptmpeptidetableproxymodel.h @@ -50,7 +50,7 @@ public: private: const PtmSampleScan * _p_ptm_sample_scan; - const PeptideMatch * _p_peptide_match; + const PeptideMatch _peptide_match; const PtmGroupingExperiment * _p_ptm_grouping_experiment; }; @@ -65,7 +65,7 @@ public slots: void doTriggered(bool triggered); private: - PeptideMatch * _p_peptide_match; + PeptideMatch _peptide_match; PtmPeptideTableProxyModel * _p_ptm_peptide_table_proxy_model; };