Commit 12f7f950 authored by Thonier Florian's avatar Thonier Florian

segmenter.js; add some bypass and modification if clone haven't sequence content

Link to #3945 & #3960
parent 3b008401
......@@ -817,7 +817,9 @@ Segment.prototype = {
this.resetAlign()
if ( typeof this.sequence[id]=="undefined"){
this.sequence[id] = new genSeq(id, locus, this.m, this)
this.sequence[id].load("str")
if ((!isNaN(Number(id)) && this.m.clones[id].sequence) || isNaN(Number(id)) ){
this.sequence[id].load("str")
}
var divParent = document.getElementById("listSeq");
var previous_li = divParent.getElementsByTagName("li");
if (previous_li && previous_li.length === 0) {
......@@ -832,9 +834,10 @@ Segment.prototype = {
this.div_element(spanF, id);
var spanM = document.createElement('span');
spanM.id = "m" + id;
spanM.className = "seq-mobil";
spanM.innerHTML = this.sequence[id].load(str).toString(this);
if ((!isNaN(Number(id)) && this.m.clones[id].sequence) || isNaN(Number(id)) ) {
spanM.innerHTML = this.sequence[id].load(str).toString(this);
}
li.appendChild(spanF);
li.appendChild(spanM);
divParent.appendChild(li);
......@@ -1511,6 +1514,8 @@ Sequence.prototype = Object.create(genSeq.prototype);
var stop = -1;
var clone = this.m.clone(this.id);
if (!clone.sequence) return
if (clone.hasSeg('cdr3')){
if (typeof clone.seg.cdr3.start != "undefined") {
start = this.pos[clone.seg.cdr3.start];
......
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