Commit 88619d55 authored by Mathieu Giraud's avatar Mathieu Giraud

core/segment.{h,cpp}: extract AlignBox::getLength()

parent cf44a5a0
......@@ -45,6 +45,10 @@ AlignBox::AlignBox(string _key, string _color) {
ref_label = "";
}
int AlignBox::getLength() {
return end - start + 1 ;
}
char AlignBox::getInitial() {
// TRGV -> V, IGHD -> D...
......@@ -1070,11 +1074,11 @@ bool FineSegmenter::FineSegmentD(Germline *germline,
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);
float evalue_DD_new = multiplier * box_DD->getLength() * box_DD->ref.size() * segment_cost.toPValue(score_new);
#ifdef DEBUG_EVALUE
cout << "multiplier " << multiplier
<< ", length " << (box_DD->end - box_DD->start + 1)
<< ", length " << box_DD->getLength()
<< ", D size " << box_DD->ref.size()
<< " ==> e-value (DD) " << std::scientific << evalue_DD_new << std::fixed << endl ;
#endif
......
......@@ -94,6 +94,11 @@ class AlignBox
*/
char getInitial();
/**
* Returns the length
*/
int getLength();
/**
* Returns the position in the reference string corresponding to the position in the read
* Preliminary implementation, only works for the start of V and J boxes
......
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