...
  View open merge request
Commits (3)
......@@ -316,7 +316,7 @@ Clone.prototype = {
* If it does not exist return null
*/
getSegStartStop: function(field_name) {
if (this.hasSeg(field_name) &&
if (this.sequence && this.hasSeg(field_name) &&
typeof this.seg[field_name].start !== 'undefined' &&
typeof this.seg[field_name].stop !== 'undefined') {
return {'start': this.seg[field_name].start,
......
......@@ -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);
......@@ -1492,7 +1495,7 @@ Sequence.prototype = Object.create(genSeq.prototype);
str = typeof str !== 'undefined' ? str : this.m.clone(this.id).sequence;
if (typeof this.m.clone(this.id).sequence == 'undefined' || this.m.clone(this.id).sequence === 0) {
str = this.m.clone(this.id).id
str = "" // By default don't show ID as sequence if clone haven't sequence content
}
this.seq = str.split("")
......@@ -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];
......