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

WIP: new class to handle ptm sample scan ambiguity

parent 7f6e1434
No related branches found
No related tags found
No related merge requests found
......@@ -172,6 +172,18 @@ bool PtmIsland::merge(PtmIslandSp ptm_island_sp) {
std::vector<PtmSampleScanSp> PtmIsland::getPtmSampleScanSpList() const {
std::vector<PtmSampleScanSp> sample_scan_list;
for (const 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();
while ((it_ptm != it_ptm_end) && (it_ptm->get()->add(p_peptide_match) == false)) {
//peptide added
}
if (it_ptm == it_ptm_end) {
//peptide NOT added
sample_scan_list.push_back(std::make_shared<PtmSampleScan>(p_peptide_match));
}
}
return sample_scan_list;
}
......@@ -29,7 +29,7 @@
#include "ptmsamplescan.h"
PtmSampleScan::PtmSampleScan() {
PtmSampleScan::PtmSampleScan(const PeptideMatch * p_peptide_match) {
}
PtmSampleScan::PtmSampleScan(const PtmSampleScan& other){
......@@ -37,3 +37,6 @@ PtmSampleScan::PtmSampleScan(const PtmSampleScan& other){
PtmSampleScan::~PtmSampleScan() {
}
bool PtmSampleScan::add(const PeptideMatch * p_peptide_match) {
return false;
}
......@@ -43,10 +43,11 @@ typedef std::shared_ptr<PtmSampleScan> PtmSampleScanSp;
class PtmSampleScan
{
public:
PtmSampleScan();
PtmSampleScan(const PeptideMatch * p_peptide_match);
PtmSampleScan(const PtmSampleScan& other);
~PtmSampleScan();
bool add(const PeptideMatch * p_peptide_match);
private:
std::vector<const PeptideMatch *> _peptide_match_list;
......
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