Commit 34068e0b authored by Mathieu Giraud's avatar Mathieu Giraud

core/segment.{h,cpp}: e-value threshold is now on both left and right sides

Store and check getLeftRightProbabilityAtLeastOrAbove()
parent 0045c06c
......@@ -159,6 +159,11 @@ string Segmenter::getInfoLine() const
if (evalue > NO_LIMIT_VALUE)
s += " " + scientific_string_of_double(evalue);
if (evalue_left > NO_LIMIT_VALUE)
s += " " + scientific_string_of_double(evalue_left);
if (evalue_right > NO_LIMIT_VALUE)
s += "/" + scientific_string_of_double(evalue_right);
return s ;
}
......@@ -360,6 +365,17 @@ KmerMultiSegmenter::KmerMultiSegmenter(Sequence seq, MultiGermline *multigermlin
if (the_kseg->evalue > threshold_nb_expected) {
the_kseg->setSegmentationStatus(UNSEG_NOISY);
}
pair <double, double> p = the_kseg->getKmerAffectAnalyser()->getLeftRightProbabilityAtLeastOrAbove();
the_kseg->evalue_left = p.first;
the_kseg->evalue_right = p.second;
if (the_kseg->evalue_left > threshold_nb_expected) {
the_kseg->setSegmentationStatus(UNSEG_NOISY); // TOO_FEW_V ?
}
if (the_kseg->evalue_right > threshold_nb_expected) {
the_kseg->setSegmentationStatus(UNSEG_NOISY); // TOO_FEW_J ?
}
}
}
......@@ -567,6 +583,8 @@ FineSegmenter::FineSegmenter(Sequence seq, Germline *germline, Cost segment_c)
Dend=0;
segment_cost=segment_c;
evalue = NO_LIMIT_VALUE;
evalue_left = NO_LIMIT_VALUE;
evalue_right = NO_LIMIT_VALUE;
CDR3start = -1;
CDR3end = -1;
......@@ -931,6 +949,10 @@ void KmerSegmenter::toJsonList(JsonList *seg)
if (evalue > NO_LIMIT_VALUE)
seg->add("_evalue", scientific_string_of_double(evalue));
if (evalue_left > NO_LIMIT_VALUE)
seg->add("_evalue_left", scientific_string_of_double(evalue_left));
if (evalue_right > NO_LIMIT_VALUE)
seg->add("_evalue_right", scientific_string_of_double(evalue_right));
JsonList *json_affectValues;
json_affectValues=new JsonList();
......
......@@ -77,6 +77,8 @@ protected:
int best_D;
double evalue;
double evalue_left;
double evalue_right;
string seg_N1, seg_D, seg_N2;
Cost segment_cost;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment