Commit 56016dc8 authored by Mathieu Giraud's avatar Mathieu Giraud
Browse files

segment.cpp: realign D after the overlap handling to check whether the e-value is still good

Discussion with @mikael-s and @flothoni.

We now run another dynamic programming once the overlap was handled -- only
on the best reference sequence -- to check the actual e-value of the D segment.
parent 095e9b95
......@@ -918,6 +918,18 @@ bool FineSegmenter::FineSegmentD(Germline *germline,
seg_N2 = check_and_resolve_overlap(seq, box_DD->start, seq.length(),
box_DD, box_Z, segment_cost);
// Realign D to see whether the score is enough
DynProg dp = DynProg(box_DD->getSequence(seq), box_DD->ref,
DynProg::SemiGlobal, segment_cost, false, false);
int score_new = dp.compute();
float evalue_DD_new = multiplier * (box_DD->end - box_DD->start + 1) * box_DD->ref.size() * segment_cost.toPValue(score_new);
if (evalue_DD_new > evalue_threshold)
return false ;
return true;
Supports Markdown
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