Commit c5f71c1e authored by Mathieu Giraud's avatar Mathieu Giraud

core/segment.{h,cpp}: rename constants to UNSEG_ONLY_V/J

Following f78c6fc3, name these constants in a positive way,
as we report these unsegmentation cases.
parent 67f28a89
......@@ -262,9 +262,9 @@ void Segmenter::checkLeftRightEvaluesThreshold(double threshold, int strand)
if (evalue_left >= threshold && evalue_right >= threshold)
because = UNSEG_TOO_FEW_ZERO ;
else if ((strand == 1 ? evalue_left : evalue_right) >= threshold)
because = UNSEG_TOO_FEW_V ;
because = UNSEG_ONLY_J ;
else if ((strand == 1 ? evalue_right : evalue_left) >= threshold)
because = UNSEG_TOO_FEW_J ;
because = UNSEG_ONLY_V ;
else if (evalue >= threshold) // left and right are <= threshold, but their sum is > threshold
because = UNSEG_TOO_FEW_ZERO ;
}
......@@ -618,7 +618,7 @@ void KmerSegmenter::computeSegmentation(int strand, KmerAffect before, KmerAffec
evalue_right = pvalues.second * multiplier ;
evalue = evalue_left + evalue_right ;
// This can lead to UNSEG_TOO_FEW_ZERO or UNSEG_TOO_FEW_V/J
// This can lead to UNSEG_TOO_FEW_ZERO or UNSEG_ONLY_V/J
checkLeftRightEvaluesThreshold(threshold, strand);
if (because != NOT_PROCESSED)
......
......@@ -45,7 +45,7 @@ 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_J, UNSEG_TOO_FEW_V,
UNSEG_TOO_FEW_ZERO, UNSEG_ONLY_V, UNSEG_ONLY_J,
UNSEG_BAD_DELTA_MIN, UNSEG_AMBIGUOUS,
UNSEG_TOO_SHORT_FOR_WINDOW,
......@@ -156,7 +156,7 @@ protected:
/**
* Compares evalue_left, evalue_right and evalue against the provided threshold
* @post some evalue is above the threshold ==> because is set to UNSEG_TOO_FEW_ZERO, UNSEG_TOO_FEW_V or UNSEG_TOO_FEW_J
* @post some evalue is above the threshold ==> because is set to UNSEG_TOO_FEW_ZERO, UNSEG_ONLY_J or UNSEG_ONLY_V
*/
void checkLeftRightEvaluesThreshold(double threshold, int strand);
......
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