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

more ptm peptide columns

parent 2a7ecd76
No related branches found
No related tags found
No related merge requests found
...@@ -52,5 +52,17 @@ bool PtmSampleScan::add(const PeptideMatch * p_peptide_match) { ...@@ -52,5 +52,17 @@ bool PtmSampleScan::add(const PeptideMatch * p_peptide_match) {
return false; return false;
} }
_peptide_match_list.push_back(p_peptide_match); _peptide_match_list.push_back(p_peptide_match);
//sort list
std::sort(_peptide_match_list.begin(),_peptide_match_list.end(),[](const PeptideMatch * first, const PeptideMatch * second) {
return (first->getEvalue() < second->getEvalue()) ;
});
return true; return true;
} }
std::vector<unsigned int> PtmSampleScan::getBestPtmPositionList() const {
std::vector<unsigned int> list;
return list;
}
...@@ -49,6 +49,7 @@ public: ...@@ -49,6 +49,7 @@ public:
const PeptideMatch * getRepresentativePeptideMatch() const; const PeptideMatch * getRepresentativePeptideMatch() const;
bool add(const PeptideMatch * p_peptide_match); bool add(const PeptideMatch * p_peptide_match);
std::vector<unsigned int> getBestPtmPositionList() const;
private: private:
std::vector<const PeptideMatch *> _peptide_match_list; std::vector<const PeptideMatch *> _peptide_match_list;
......
...@@ -88,6 +88,10 @@ const QString PtmPeptideTableModel::getTitle(std::int8_t column) { ...@@ -88,6 +88,10 @@ const QString PtmPeptideTableModel::getTitle(std::int8_t column) {
break; break;
case (std::int8_t) PtmPeptideListColumn::besthyperscore: case (std::int8_t) PtmPeptideListColumn::besthyperscore:
return "top hyperscore"; return "top hyperscore";
case (std::int8_t) PtmPeptideListColumn::bestposition:
return "top PTM positions";
case (std::int8_t) PtmPeptideListColumn::allobservedposition:
return "observed PTM positions";
} }
return ""; return "";
...@@ -134,6 +138,10 @@ const QString PtmPeptideTableModel::getDescription(std::int8_t column) { ...@@ -134,6 +138,10 @@ const QString PtmPeptideTableModel::getDescription(std::int8_t column) {
break; break;
case (std::int8_t) PtmPeptideListColumn::besthyperscore: case (std::int8_t) PtmPeptideListColumn::besthyperscore:
return "best X!Tandem hyperscore"; return "best X!Tandem hyperscore";
case (std::int8_t) PtmPeptideListColumn::bestposition:
return "PTM positions of the top identified peptide (best Evalue) for this scan";
case (std::int8_t) PtmPeptideListColumn::allobservedposition:
return "all observed PTM positions for the same scan";
} }
return ""; return "";
...@@ -212,6 +220,12 @@ QVariant PtmPeptideTableModel::data(const QModelIndex &index, int role ) const { ...@@ -212,6 +220,12 @@ QVariant PtmPeptideTableModel::data(const QModelIndex &index, int role ) const {
case (std::int8_t)PtmPeptideListColumn::besthyperscore: case (std::int8_t)PtmPeptideListColumn::besthyperscore:
return _ptm_sample_scan_list.at(row).get()->getRepresentativePeptideMatch()->getParam(PeptideMatchParam::tandem_hyperscore); return _ptm_sample_scan_list.at(row).get()->getRepresentativePeptideMatch()->getParam(PeptideMatchParam::tandem_hyperscore);
break; break;
case (std::int8_t)PtmPeptideListColumn::bestposition:
//return _ptm_sample_scan_list.at(row).get()->getBestPtmPositionList();
break;
case (std::int8_t)PtmPeptideListColumn::allobservedposition:
//return _ptm_sample_scan_list.at(row).get()->getObservedPtmPositionList();
break;
} }
} }
......
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