Commit 4cf6d14f authored by Mathieu Giraud's avatar Mathieu Giraud

AffectAnalyser: remove results.before and results.after

Only results.before_left and results.after_right are signifiant to assert the segmentation
parent 99abec91
......@@ -21,8 +21,6 @@ typedef struct affect_infos_s {
int first_pos_max; /* First position of maximum */
int last_pos_max; /* Last position of maximum */
int max_value; /* Maximal value */
int nb_before; /* Nb of affectations “before” */
int nb_after; /* Nb of affectations “after */
int nb_before_right; /* Nb of “before” right of the maximum */
int nb_after_right; /* Same with “after” */
int nb_before_left; /* Nb of “before” left of the maximum */
......@@ -393,9 +391,6 @@ affect_infos KmerAffectAnalyser<T>::getMaximum(const T &before,
results.nb_before_right++;
}
results.nb_before = results.nb_before_right + results.nb_before_left;
results.nb_after = results.nb_after_right + results.nb_after_left;
/* Main test:
1) do we have enough affectations in good positions ('before' at the left and 'after' at the right) ?
We tolerate some of them in bad positions, but there must be 'ratioMin' more in good positions
......
......@@ -256,11 +256,11 @@ void KmerSegmenter::computeSegmentation(int strand, int delta_min, int delta_max
max = kaa->getMaximum(AFFECT_J_BWD, AFFECT_V_BWD);
if (! max.max_found) {
if ((strand == 1 && max.nb_before == 0)
|| (strand == -1 && max.nb_after == 0))
if ((strand == 1 && max.nb_before_left == 0)
|| (strand == -1 && max.nb_after_right == 0))
because = UNSEG_TOO_FEW_V ;
else if ((strand == 1 && max.nb_after == 0)
|| (strand == -1 && max.nb_before == 0))
else if ((strand == 1 && max.nb_after_right == 0)
|| (strand == -1 && max.nb_before_left == 0))
{
because = UNSEG_TOO_FEW_J ;
} else
......
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