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) {
return false;
}
_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;
}
std::vector<unsigned int> PtmSampleScan::getBestPtmPositionList() const {
std::vector<unsigned int> list;
return list;
}
......@@ -49,6 +49,7 @@ public:
const PeptideMatch * getRepresentativePeptideMatch() const;
bool add(const PeptideMatch * p_peptide_match);
std::vector<unsigned int> getBestPtmPositionList() const;
private:
std::vector<const PeptideMatch *> _peptide_match_list;
......
......@@ -88,6 +88,10 @@ const QString PtmPeptideTableModel::getTitle(std::int8_t column) {
break;
case (std::int8_t) PtmPeptideListColumn::besthyperscore:
return "top hyperscore";
case (std::int8_t) PtmPeptideListColumn::bestposition:
return "top PTM positions";
case (std::int8_t) PtmPeptideListColumn::allobservedposition:
return "observed PTM positions";
}
return "";
......@@ -134,6 +138,10 @@ const QString PtmPeptideTableModel::getDescription(std::int8_t column) {
break;
case (std::int8_t) PtmPeptideListColumn::besthyperscore:
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 "";
......@@ -212,6 +220,12 @@ QVariant PtmPeptideTableModel::data(const QModelIndex &index, int role ) const {
case (std::int8_t)PtmPeptideListColumn::besthyperscore:
return _ptm_sample_scan_list.at(row).get()->getRepresentativePeptideMatch()->getParam(PeptideMatchParam::tandem_hyperscore);
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