Commit 73178e81 authored by Mathieu Giraud's avatar Mathieu Giraud

core/segment.cpp: report UNSEG_STRAND_NOT_CONSISTENT only when there are enough k-mers

In situations where there are very few k-mers, we prefer to report UNSEG_TOO_FEW_ZERO,
being more consistent to what is done with the e-value check.
parent 29fd0c64
......@@ -289,8 +289,11 @@ KmerSegmenter::KmerSegmenter(Sequence seq, Germline *germline, double threshold,
after = KmerAffect(germline->affect_3, 1);
} else {
// Ambiguous information: we have positive and negative strands
// and there is not enough difference to put them aparat.
because = UNSEG_STRAND_NOT_CONSISTENT ;
// and there is not enough difference to put them apart.
if (nb_strand[0] + nb_strand[1] >= DETECT_THRESHOLD_STRAND)
because = UNSEG_STRAND_NOT_CONSISTENT ;
else
because = UNSEG_TOO_FEW_ZERO ;
return ;
}
......
......@@ -20,6 +20,10 @@
strand and the other, to safely attribute a
segment to a given strand */
#define DETECT_THRESHOLD_STRAND 5 /* If the number of total affectations
is above this threshold, then a sequence with no clearly attributed
stranf will be marked as STRAND_NOT_CONSISTEN */
#define DETECT_THRESHOLD 5 /* If the number of both V and J affectations
is above this threshold, then the sequence,
if it not segmented, will be marked as AMBIGUOUS */
......
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