Skip to content
Snippets Groups Projects
Commit f8582d20 authored by Renne Thomas's avatar Renne Thomas
Browse files

Correct wrong index protein details from PTM island

parent dec86f8a
No related branches found
No related tags found
1 merge request!33Multiples Corrections and features implementations
......@@ -152,7 +152,7 @@ PtmGroupingExperiment::setValidationState(ValidationState validation_state)
_peptide_validation_state = validation_state;
}
void
PtmGroupingExperiment::addProteinMatch(const ProteinMatch *p_protein_match)
PtmGroupingExperiment::addProteinMatch(ProteinMatch *p_protein_match)
{
if(p_protein_match->getValidationState() >= _peptide_validation_state)
{
......
......@@ -50,7 +50,7 @@ class PtmGroupingExperiment
* experiment
*/
void setValidationState(ValidationState validation_state);
void addProteinMatch(const ProteinMatch *p_protein_match);
void addProteinMatch(ProteinMatch *p_protein_match);
void startGrouping();
/** @brief get the ptm island subgroup list
......
......@@ -36,7 +36,7 @@
#include <pappsomspp/utils.h>
#include <set>
PtmIsland::PtmIsland(const ProteinMatch *p_protein_match, unsigned int position)
PtmIsland::PtmIsland(ProteinMatch *p_protein_match, unsigned int position)
: _protein_match_p(p_protein_match)
{
_position_list.push_back(position);
......@@ -142,8 +142,8 @@ PtmIsland::setProteinNumber(unsigned int prot_number)
{
_prot_number = prot_number;
}
const ProteinMatch *
PtmIsland::getProteinMatch() const
ProteinMatch *
PtmIsland::getProteinMatch()
{
return _protein_match_p;
}
......
......@@ -48,7 +48,7 @@ typedef std::shared_ptr<PtmIsland> PtmIslandSp;
class PtmIsland
{
public:
PtmIsland(const ProteinMatch *p_protein_match, unsigned int position);
PtmIsland(ProteinMatch *p_protein_match, unsigned int position);
PtmIsland(const PtmIsland &other);
~PtmIsland();
void addPeptideMatch(const PeptideMatch &peptide_match);
......@@ -60,7 +60,7 @@ class PtmIsland
bool containsPeptideMatch(const PeptideMatch &element) const;
std::vector<std::size_t> getSampleScanSet() const;
const ProteinMatch *getProteinMatch() const;
ProteinMatch *getProteinMatch();
unsigned int getProteinStartPosition() const;
void setPtmIslandSubgroup(PtmIslandSubgroup *p_ptm_island_subgroup);
void setProteinNumber(unsigned int prot_number);
......@@ -82,7 +82,7 @@ class PtmIsland
const std::vector<PeptideMatch> &getPeptideMatchList() const;
private:
const ProteinMatch *_protein_match_p;
ProteinMatch *_protein_match_p;
std::vector<PeptideMatch> _peptide_match_list;
// std::vector<std::size_t> _sample_scan_set;
std::vector<unsigned int> _position_list;
......
......@@ -186,15 +186,19 @@ PtmIslandListWindow::getPtmIslandListColumnDisplay(
void
PtmIslandListWindow::setColumnMenuList()
{
PtmIslandListQActionColumn *p_action;
for(int i = 0; i < _ptm_table_model_p->columnCount(); i++)
if(ui->menu_Columns->isEmpty())
{
p_action = new PtmIslandListQActionColumn(
this, PtmIslandTableModel::getPtmIslandListColumn(i));
ui->menu_Columns->addAction(p_action);
PtmIslandListQActionColumn *p_action;
for(int i = 0; i < _ptm_table_model_p->columnCount(); i++)
{
p_action = new PtmIslandListQActionColumn(
this, PtmIslandTableModel::getPtmIslandListColumn(i));
ui->menu_Columns->addAction(p_action);
}
}
}
void
PtmIslandListWindow::doNotCheckedHide(bool hide)
{
......
......@@ -207,9 +207,10 @@ PtmIslandProxyModel::onTableClicked(const QModelIndex &index)
int col = source_index.column();
ProteinMatch *p_protein_match =
_p_ptm_island_table_model->getIdentificationGroup()
->getProteinMatchList()
.at(row);
_p_ptm_island_table_model->getPtmGroupingExperiment()
->getPtmIslandList()
.at(row)
->getProteinMatch();
if(col == (std::int8_t)PtmIslandListColumn::checked)
{
......
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