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

WIP: new intensity value

parent 2a37a68a
No related branches found
No related tags found
No related merge requests found
......@@ -440,6 +440,8 @@ XicBox::drawObservedAreaBars(
double sum = 0;
int i = 0;
std::vector<double> common_peak_rt_measure_list;
qDebug() << "XicBox::setXic plot _isotope_mass_list";
for(const XicBoxNaturalIsotope &xic_isotope : _natural_isotope_list)
{
......@@ -456,6 +458,11 @@ XicBox::drawObservedAreaBars(
}
else
{
addCommonRt(common_peak_rt_measure_list,
peak_to_draw.get(),
xic_isotope.xic_sp.get());
sum += peak_to_draw.get()->getArea();
observed_intensity_data << peak_to_draw.get()->getArea();
QString isotope_name = QString("+%1").arg(
......@@ -671,3 +678,35 @@ XicBox::onIsotopicDistributionClick()
// ui->histo_widget->legend->clear();
setPeptideEvidence(_p_peptide_evidence);
}
void
XicBox::addCommonRt(std::vector<double> &common_peak_rt_measure_list,
const pappso::TracePeak *peak,
const pappso::Xic *xic) const
{
if(common_peak_rt_measure_list.size() == 0)
{ // no common peaks, filling with whole peak
auto it = pappso::findFirstEqualOrGreaterX(
xic->begin(), xic->end(), peak->getLeftBoundary().x);
while(it != xic->end())
{
common_peak_rt_measure_list.push_back(it->x);
it++;
}
}
else
{
std::vector<double> intersect(common_peak_rt_measure_list.size());
std::vector<double> new_rt;
auto it = pappso::findFirstEqualOrGreaterX(
xic->begin(), xic->end(), peak->getLeftBoundary().x);
while(it != xic->end())
{
new_rt.push_back(it->x);
it++;
}
}
}
......@@ -93,6 +93,15 @@ class XicBox : public QWidget
void drawObservedAreaBars(
const std::vector<pappso::TracePeakCstSPtr> &observed_peak_to_draw);
/** @brief select common retention times between peaks
* @param common_peak_rt_measure_list vector to fill
* @param peak peak to consider
* @param xic to consider
*/
void addCommonRt(std::vector<double> &common_peak_rt_measure_list,
const pappso::TracePeak *peak,
const pappso::Xic *xic) const;
private:
Ui::XicBox *ui;
QThread _xic_thread;
......
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