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

core/segment.{cpp,h}: do not recognize a D when it is shorter than MIN_D_SIZE (5)

The boolean dSegmented is now correctly set (but it is still not used...)
parent 81369fec
......@@ -529,6 +529,8 @@ string format_del(int deletions)
FineSegmenter::FineSegmenter(Sequence seq, Germline *germline, Cost segment_c)
{
segmented = false;
dSegmented = false;
because = 0 ;
segmented_germline = germline ;
info_extra = "" ;
......@@ -612,8 +614,6 @@ FineSegmenter::FineSegmenter(Sequence seq, Germline *germline, Cost segment_c)
segmented = (Vend != (int) string::npos) && (Jstart != (int) string::npos) &&
(Jstart - Vend >= germline->delta_min) && (Jstart - Vend <= germline->delta_max);
dSegmented=false;
if (!segmented)
{
because = DONT_KNOW;
......@@ -726,8 +726,16 @@ void FineSegmenter::FineSegmentD(Germline *germline){
Dend = l + end;
string seq = getSequence().sequence;
if (length>0) dSegmented=true;
// recompute remaining length for D
length = germline->rep_4.sequence(best_D).length() - del_D_right - del_D_left;
if (length < MIN_D_LENGTH)
return ;
dSegmented=true;
//overlap VD
if(Dstart-Vend <=0){
......
......@@ -13,6 +13,9 @@
#include "json.h"
#define EXTEND_D_ZONE 5
#define MIN_D_LENGTH 5 /* If a D-REGION is smaller than this threshold, it is not output */
#define RATIO_STRAND 5 /* The ratio between the affectations in one
strand and the other, to safely attribute a
segment to a given 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