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

peptide match pointer not const in ptmpeptidescan

parent f8559048
No related branches found
No related tags found
No related merge requests found
......@@ -112,7 +112,7 @@ bool PtmIsland::containsPeptideMatch(const PeptideMatch* peptide_match) const {
});
}
void PtmIsland::addPeptideMatch(const PeptideMatch* p_peptide_match) {
void PtmIsland::addPeptideMatch(PeptideMatch* p_peptide_match) {
if (_position_list.size()==1) {
unsigned int position = _position_list[0];
if (p_peptide_match->containsPosition(position)) {
......@@ -155,7 +155,7 @@ bool PtmIsland::merge(PtmIslandSp ptm_island_sp) {
_position_list.erase(std::unique(_position_list.begin(), _position_list.end()), _position_list.end());
std::vector<const PeptideMatch *>::const_iterator it_result = std::max_element(_peptide_match_list.begin(), _peptide_match_list.end(), [](const PeptideMatch * a, const PeptideMatch * b)
std::vector<PeptideMatch *>::const_iterator it_result = std::max_element(_peptide_match_list.begin(), _peptide_match_list.end(), [](const PeptideMatch * a, const PeptideMatch * b)
{
return (a->getStop() < b->getStop());
});
......@@ -173,7 +173,7 @@ bool PtmIsland::merge(PtmIslandSp ptm_island_sp) {
std::vector<PtmSampleScanSp> PtmIsland::getPtmSampleScanSpList() const {
qDebug() << "PtmIsland::getPtmSampleScanSpList begin" ;
std::vector<PtmSampleScanSp> sample_scan_list;
for (const PeptideMatch * p_peptide_match:_peptide_match_list) {
for (PeptideMatch * p_peptide_match:_peptide_match_list) {
std::vector<PtmSampleScanSp>::iterator it_ptm = sample_scan_list.begin();
std::vector<PtmSampleScanSp>::iterator it_ptm_end = sample_scan_list.end();
......
......@@ -50,7 +50,7 @@ public:
PtmIsland(const ProteinMatch* p_protein_match, unsigned int position);
PtmIsland(const PtmIsland & other);
~PtmIsland();
void addPeptideMatch(const PeptideMatch* p_peptide_match);
void addPeptideMatch(PeptideMatch* p_peptide_match);
/** @brief merge with the given ptm island if there is at least one common peptide match
* */
......@@ -77,7 +77,7 @@ public:
private:
const ProteinMatch * _protein_match_p;
std::vector<const PeptideMatch *> _peptide_match_list;
std::vector<PeptideMatch *> _peptide_match_list;
//std::vector<std::size_t> _sample_scan_set;
std::vector<unsigned int> _position_list;
unsigned int _protein_stop=0;
......
......@@ -36,7 +36,7 @@ QColor PtmSampleScan::_color_other_best = QColor("#ff7878");
QColor PtmSampleScan::_color_no_best = QColor("yellow");
PtmSampleScan::PtmSampleScan(const PeptideMatch * p_peptide_match) {
PtmSampleScan::PtmSampleScan(PeptideMatch * p_peptide_match) {
_peptide_match_list.push_back(p_peptide_match);
}
......@@ -48,7 +48,7 @@ PtmSampleScan::~PtmSampleScan() {
const PeptideMatch * PtmSampleScan::getRepresentativePeptideMatch() const {
return _peptide_match_list[0];
}
bool PtmSampleScan::add(const PeptideMatch * p_peptide_match) {
bool PtmSampleScan::add(PeptideMatch * p_peptide_match) {
if(getRepresentativePeptideMatch()->getHashSampleScan() != p_peptide_match->getHashSampleScan()) {
return false;
}
......@@ -136,6 +136,6 @@ const QString PtmSampleScan::getHtmlSequence(const PtmGroupingExperiment * p_ptm
return sequence_html;
}
const std::vector<const PeptideMatch *> & PtmSampleScan::getPeptideMatchList() const {
const std::vector<PeptideMatch *> & PtmSampleScan::getPeptideMatchList() const {
return _peptide_match_list;
}
......@@ -44,19 +44,19 @@ typedef std::shared_ptr<PtmSampleScan> PtmSampleScanSp;
class PtmSampleScan
{
public:
PtmSampleScan(const PeptideMatch * p_peptide_match);
PtmSampleScan(PeptideMatch * p_peptide_match);
PtmSampleScan(const PtmSampleScan& other);
~PtmSampleScan();
const PeptideMatch * getRepresentativePeptideMatch() const;
bool add(const PeptideMatch * p_peptide_match);
bool add(PeptideMatch * p_peptide_match);
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<const PeptideMatch *> & getPeptideMatchList() const;
const std::vector<PeptideMatch *> & getPeptideMatchList() const;
private:
std::vector<const PeptideMatch *> _peptide_match_list;
std::vector<PeptideMatch *> _peptide_match_list;
static QColor _color_best;
static QColor _color_other_best;
static QColor _color_no_best;
......
......@@ -74,6 +74,7 @@ public slots:
void refreshGroup(IdentificationGroup * p_ident_group);
void refreshPtmGroup(IdentificationGroup * p_ident_group);
void doAcceptedLabelingMethod();
void doViewPeptideDetail(PeptideMatch * peptide_match);
// void setColor(const QColor &color);
// void setShape(Shape shape);
signals:
......@@ -87,7 +88,6 @@ signals:
protected :
void doViewPeptideList(IdentificationGroup * p_ident_group, ProteinMatch * protein_match);
void doViewPeptideDetail(PeptideMatch * peptide_match);
void doViewProteinDetail(ProteinMatch * protein_match);
void doIdentificationGroupEdited(IdentificationGroup* p_identification_group);
void computeFdr();
......
......@@ -80,6 +80,9 @@ PtmIslandListWindow::~PtmIslandListWindow()
delete _ptm_proxy_model_p;
}
ProjectWindow * PtmIslandListWindow::getProjectWindowP() {
return _project_window;
}
void PtmIslandListWindow::setIdentificationGroup(IdentificationGroup * p_identification_group) {
qDebug() << "PtmIslandListWindow::setIdentificationGroup begin " ;
......@@ -117,7 +120,7 @@ void PtmIslandListWindow::doIdentificationPtmGroupGrouped(IdentificationGroup *
//_p_proxy_model->setSourceModel(_protein_table_model_p);
_ptm_table_model_p->setIdentificationGroup(p_identification_group);
emit ptmIslandDataChanged();
//ui->ptm_island_tableview->resizeRowToContents(_ptm_table_model_p->rowCount());
}
......@@ -151,6 +154,6 @@ void PtmIslandListWindow::askViewPtmPeptideList(PtmIsland * ptm_island) {
}
const IdentificationGroup * PtmIslandListWindow::getIdentificationGroup() const {
return _p_identification_group;
}
const IdentificationGroup * PtmIslandListWindow::getIdentificationGroup() const {
return _p_identification_group;
}
......@@ -51,6 +51,7 @@ public:
void setIdentificationGroup(IdentificationGroup * p_identification_group);
void resizeColumnsToContents();
const IdentificationGroup * getIdentificationGroup() const;
ProjectWindow * getProjectWindowP();
public slots:
......
......@@ -31,6 +31,7 @@
#include "../ptm_island_list_view/ptmislandlistwindow.h"
#include "ptmpeptidetablemodel.h"
#include "ptmsequencedelegate.h"
#include "../project_view/projectwindow.h"
#include "ui_ptm_peptide_list_view.h"
......@@ -72,6 +73,7 @@ PtmPeptideListWindow::PtmPeptideListWindow(PtmIslandListWindow * parent):QMainWi
//connect (_project_window, SIGNAL(identificationPtmGroupGrouped(IdentificationGroup *)), this,SLOT(doIdentificationPtmGroupGrouped(IdentificationGroup *)));
//connect (_project_window, SIGNAL(identificationGroupGrouped(IdentificationGroup *)), this,SLOT(doIdentificationGroupGrouped(IdentificationGroup *)));
connect(ui->ptm_peptide_tableview, SIGNAL(clicked(const QModelIndex &)), _ptm_proxy_model_p, SLOT(onTableClicked(const QModelIndex &)));
connect (this, SIGNAL(requestPeptideDetailView(PeptideMatch *)), _p_ptm_island_list_window->getProjectWindowP(),SLOT(doViewPeptideDetail(PeptideMatch *)));
#endif
}
......@@ -82,7 +84,7 @@ 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(const PeptideMatch * p_peptide_match) {
void PtmPeptideListWindow::askPeptideDetailView(PeptideMatch * p_peptide_match) {
qDebug() << "PtmPeptideListWindow::askPeptideDetailView begin";
emit requestPeptideDetailView(p_peptide_match);
qDebug() << "PtmPeptideListWindow::askPeptideDetailView end";
......
......@@ -49,10 +49,10 @@ public:
explicit PtmPeptideListWindow(PtmIslandListWindow * parent = 0);
~PtmPeptideListWindow();
void setPtmIsland(PtmIsland * p_ptm_island);
void askPeptideDetailView(const PeptideMatch * p_peptide_match);
void askPeptideDetailView(PeptideMatch * p_peptide_match);
signals:
void requestPeptideDetailView(const PeptideMatch * p_peptide_match);
void requestPeptideDetailView(PeptideMatch * p_peptide_match);
private:
......
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