Commit 20f32bb3 authored by Mathieu Giraud's avatar Mathieu Giraud

core/segment.{h,cpp}: reorder SEG/UNSEG causes, pretty-print

And correctly initialize 'because' in segment.cpp
parent 1f501e13
......@@ -202,7 +202,7 @@ KmerSegmenter::KmerSegmenter(Sequence seq, Germline *germline, int multiplier)
segmented_germline = germline ;
reversed = false;
Dend=0;
because = 0 ; // Cause of unsegmentation
because = NOT_PROCESSED ; // Cause of unsegmentation
score = 0 ;
evalue = NO_LIMIT_VALUE;
evalue_left = NO_LIMIT_VALUE;
......@@ -303,7 +303,7 @@ KmerSegmenter::KmerSegmenter(Sequence seq, Germline *germline, int multiplier)
}
}
if (!because)
if (because == NOT_PROCESSED)
{
// Yes, it is segmented
segmented = true;
......@@ -605,7 +605,7 @@ FineSegmenter::FineSegmenter(Sequence seq, Germline *germline, Cost segment_c)
{
segmented = false;
dSegmented = false;
because = 0 ;
because = NOT_PROCESSED ;
segmented_germline = germline ;
info_extra = "" ;
label = seq.label ;
......@@ -696,7 +696,7 @@ FineSegmenter::FineSegmenter(Sequence seq, Germline *germline, Cost segment_c)
if (!segmented)
{
because = DONT_KNOW;
because = NOT_PROCESSED;
info = " @" + string_of_int (Vend + FIRST_POS) + " @" + string_of_int(Jstart + FIRST_POS) ;
if (Jstart - Vend < germline->delta_min)
......
......@@ -36,18 +36,23 @@
using namespace std;
enum SEGMENTED { DONT_KNOW, SEG_PLUS, SEG_MINUS, UNSEG_TOO_SHORT, UNSEG_STRAND_NOT_CONSISTENT,
enum SEGMENTED { NOT_PROCESSED,
TOTAL_SEG_AND_WINDOW,
SEG_PLUS, SEG_MINUS,
UNSEG_TOO_SHORT, UNSEG_STRAND_NOT_CONSISTENT,
UNSEG_TOO_FEW_ZERO, UNSEG_TOO_FEW_V, UNSEG_TOO_FEW_J,
UNSEG_BAD_DELTA_MIN, UNSEG_BAD_DELTA_MAX, UNSEG_AMBIGUOUS, UNSEG_NOISY,
UNSEG_TOO_SHORT_FOR_WINDOW,
TOTAL_SEG_AND_WINDOW,
STATS_SIZE } ;
const char* const segmented_mesg[] = { "?", "SEG_+", "SEG_-", "UNSEG too short", "UNSEG strand",
const char* const segmented_mesg[] = { "?",
"SEG",
"SEG_+", "SEG_-",
"UNSEG too short", "UNSEG strand",
"UNSEG too few (0)", "UNSEG too few V", "UNSEG too few J",
"UNSEG < delta_min", "UNSEG > delta_max", "UNSEG ambiguous",
"UNSEG noisy",
"UNSEG too short w",
"SEG",
} ;
class Segmenter {
......
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