Commit cd28a56c authored by Mathieu Giraud's avatar Mathieu Giraud

core/segment.cpp: calls best_overlap_split (for VJ) on possibly rev-comped sequence

The 4 sequences added in 6503f6ae now give correct results.
All the 68 (now 72) test sequences are now passing on both strands.
parent f419e701
......@@ -792,13 +792,15 @@ FineSegmenter::FineSegmenter(Sequence seq, Germline *germline, Cost segment_c,
/* The sequence is segmented */
segmented = true ;
because = reversed ? SEG_MINUS : SEG_PLUS ;
string sequence_or_rc = getSequence().sequence; // segmented sequence, possibly rev-comped
//overlap VJ
if(Jstart-Vend <=0){
int overlap=Vend-Jstart+1;
string seq_left = sequence.substr(0, Vend+1);
string seq_right = sequence.substr(Jstart);
string seq_left = sequence_or_rc.substr(0, Vend+1);
string seq_right = sequence_or_rc.substr(Jstart);
best_overlap_split(overlap, seq_left, seq_right,
germline->rep_5.sequence(best_V), germline->rep_3.sequence(best_J),
......@@ -811,7 +813,7 @@ FineSegmenter::FineSegmenter(Sequence seq, Germline *germline, Cost segment_c,
// string chevauchement = removeChevauchement();
/// used only below, then recomputed in finishSegmentation() ;
seg_N = revcomp(sequence, reversed).substr(Vend+1, Jstart-Vend-1);
seg_N = sequence_or_rc.substr(Vend+1, Jstart-Vend-1);
code = germline->rep_5.label(best_V) +
" "+ string_of_int(del_V) +
......
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