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

detecting peaks

parent c7286806
No related branches found
No related tags found
No related merge requests found
......@@ -32,6 +32,28 @@
#include <pappsomspp/pappsoexception.h>
#include "../xicworkerthread.h"
#include "../../project_view/projectwindow.h"
#include <pappsomspp/xic/detection/xicdetectionzivy.h>
#include <pappsomspp/exception/exceptionnotpossible.h>
class XicDetectionList: public pappso::XicDetectionSinkInterface {
public:
void setXicPeak (pappso::XicPeak & xic_peak) override {
_peak_list.push_back(xic_peak);
};
const std::vector<pappso::XicPeak> & getXicPeakList() const {
return _peak_list;
};
void clear() {
_peak_list.clear();
};
private :
unsigned int _count=0;
std::vector<pappso::XicPeak> _peak_list;
};
XicBox::XicBox(XicWindow *parent):
QWidget(parent),
......@@ -135,6 +157,26 @@ void XicBox::setXic(std::vector< pappso::XicSp> xic_sp_list) {
emit loadXic(_p_peptide_evidence->getMsRunP(), _isotope_mass_list[_xic_widget_list.size()].get()->getMz(), _p_xic_window->getXicExtractPrecision(), XicExtractMethod::max);
}
*/
_xic_detection_list.clear();
XicDetectionList xic_list;
pappso::XicDetectionZivy zivy;
zivy.setSmoothingHalfEdgeWindows(2);
zivy.setDetectionThresholdOnMaxmin(3);
zivy.setDetectionThresholdOnMinmax(3);
zivy.setDetectionThresholdOnMaxmin(6000);
zivy.setDetectionThresholdOnMinmax(5000);
for (int i=0; i < xic_sp_list.size(); i++) {
try {
xic_list.clear();
zivy.detect(*(xic_sp_list[i].get()), &xic_list);
_xic_detection_list.push_back(xic_list.getXicPeakList());
}
catch (const pappso::ExceptionNotPossible & e) {
qDebug() << e.qwhat();
}
}
qDebug() << "XicBox::setXic end";
......
......@@ -69,6 +69,7 @@ private:
std::vector<pappso::PeptideNaturalIsotopeAverageSp> _isotope_mass_list;
pappso::XicSp _xic_sp;
std::vector<pappso::XicWidget *> _xic_widget_list;
std::vector<std::vector<pappso::XicPeak>> _xic_detection_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