Commit d97cfefa authored by Marc Duez's avatar Marc Duez
Browse files

model.js/segmenter.js : default color for V/D/J gene

parent f0f3883a
...@@ -468,8 +468,15 @@ max-height: calc(~"100%" - @margin) ...@@ -468,8 +468,15 @@ max-height: calc(~"100%" - @margin)
letter-spacing: 0.12em; letter-spacing: 0.12em;
} }
.V {
color: #ffb300;
}
.D { .D {
color: #fb000d; color: #c7007d;
}
.J {
color: #009b95;
} }
/*tag*/ /*tag*/
......
...@@ -339,6 +339,8 @@ Model.prototype = { ...@@ -339,6 +339,8 @@ Model.prototype = {
* détermine le nombre d'allele pour chaque gene et y attribue une couleur * détermine le nombre d'allele pour chaque gene et y attribue une couleur
* */ * */
loadGermline: function () { loadGermline: function () {
var self = this
console.log("loadGermline()"); console.log("loadGermline()");
self.germline = {}; self.germline = {};
self.germline.v = {} self.germline.v = {}
...@@ -561,7 +563,7 @@ Model.prototype = { ...@@ -561,7 +563,7 @@ Model.prototype = {
var vGene = this.windows[i].V[0]; var vGene = this.windows[i].V[0];
this.windows[i].colorV = this.germline.v[vGene].color; this.windows[i].colorV = this.germline.v[vGene].color;
} else { } else {
this.windows[i].colorV = color['@default']; this.windows[i].colorV = "";
} }
} }
...@@ -571,7 +573,7 @@ Model.prototype = { ...@@ -571,7 +573,7 @@ Model.prototype = {
var jGene = this.windows[i].J[0]; var jGene = this.windows[i].J[0];
this.windows[i].colorJ = this.germline.j[jGene].color; this.windows[i].colorJ = this.germline.j[jGene].color;
} else { } else {
this.windows[i].colorJ = color['@default']; this.windows[i].colorJ = "";
} }
} }
......
...@@ -237,6 +237,7 @@ Segment.prototype = { ...@@ -237,6 +237,7 @@ Segment.prototype = {
var spanV = document.createElement('span'); var spanV = document.createElement('span');
spanV.className="V"; spanV.className="V";
if (this.m.colorMethod == "V")
spanV.style.color=this.m.windows[cloneID].colorV; spanV.style.color=this.m.windows[cloneID].colorV;
var v_seq=this.m.windows[cloneID].sequence.substr(0, this.m.windows[cloneID].Vend+1); var v_seq=this.m.windows[cloneID].sequence.substr(0, this.m.windows[cloneID].Vend+1);
...@@ -275,6 +276,7 @@ Segment.prototype = { ...@@ -275,6 +276,7 @@ Segment.prototype = {
var spanJ = document.createElement('span'); var spanJ = document.createElement('span');
spanJ.className="J"; spanJ.className="J";
if (this.m.colorMethod == "J")
spanJ.style.color=this.m.windows[cloneID].colorJ; spanJ.style.color=this.m.windows[cloneID].colorJ;
spanJ.innerHTML=this.m.windows[cloneID].sequence.substr(this.m.windows[cloneID].Jstart); spanJ.innerHTML=this.m.windows[cloneID].sequence.substr(this.m.windows[cloneID].Jstart);
spanM.appendChild(spanJ); spanM.appendChild(spanJ);
...@@ -393,6 +395,7 @@ Segment.prototype = { ...@@ -393,6 +395,7 @@ Segment.prototype = {
// V gene container // V gene container
var spanV = document.createElement('span'); var spanV = document.createElement('span');
spanV.className="V"; spanV.className="V";
if (this.m.colorMethod == "V")
spanV.style.color=m.windows[memTab[i]].colorV; spanV.style.color=m.windows[memTab[i]].colorV;
// N region container // N region container
var spanN1 = document.createElement('span'); var spanN1 = document.createElement('span');
...@@ -404,6 +407,7 @@ Segment.prototype = { ...@@ -404,6 +407,7 @@ Segment.prototype = {
// J gene container // J gene container
var spanJ = document.createElement('span'); var spanJ = document.createElement('span');
spanJ.className="J"; spanJ.className="J";
if (this.m.colorMethod == "J")
spanJ.style.color=m.windows[memTab[i]].colorJ; spanJ.style.color=m.windows[memTab[i]].colorJ;
if(typeof m.windows[memTab[i]].sequence !='undefined' && m.windows[memTab[i]].sequence!=0){ if(typeof m.windows[memTab[i]].sequence !='undefined' && m.windows[memTab[i]].sequence!=0){
......
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