Commit 812f8e82 authored by Mathieu Giraud's avatar Mathieu Giraud

js/segmenter.js: V/D/J spans, works even there is no N between segments

Fix a bug introduced in f682e77f : there can be, at a same position, the end
of a span and the start of a new one.
parent 2a3958c1
......@@ -1070,14 +1070,17 @@ Sequence.prototype = {
var vdjArray = this.getVdjStartEnd(clone);
var vdjArrayRev = {};
vdjArrayRev[vdjArray["5start"]] = {'type':'V', 'color': this.m.colorMethod == "V" ? clone.colorV : ""};
vdjArrayRev[vdjArray["3start"]] = {'type':'J', 'color': this.m.colorMethod == "J" ? clone.colorJ : ""};
// We first put the end positions
vdjArrayRev[vdjArray["5end"]] = {'type':'N', 'color': ""};
vdjArrayRev[vdjArray["3end"]] = {'type':'N', 'color': ""};
if (typeof vdjArray["4start"]!= 'undefined' && typeof clone.seg["4end"] != 'undefined'){
vdjArrayRev[vdjArray["4start"]] = {'type':'D', 'color': ""};
vdjArrayRev[vdjArray["4end"]] = {'type':'N', 'color': ""};
// We now put the start positions (that may override previous end positions)
vdjArrayRev[vdjArray["4start"]] = {'type':'D', 'color': ""};
}
vdjArrayRev[vdjArray["5start"]] = {'type':'V', 'color': this.m.colorMethod == "V" ? clone.colorV : ""};
vdjArrayRev[vdjArray["3start"]] = {'type':'J', 'color': this.m.colorMethod == "J" ? clone.colorJ : ""};
}
var window_start = this.pos[clone.sequence.indexOf(clone.id)];
......
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