Commit e4d3f1dc authored by flothoni's avatar flothoni
Browse files

clone & axes; update list of non productivity

Link to #4675
parent 13eda1ca
Pipeline #237335 passed with stages
in 49 minutes and 17 seconds
......@@ -158,7 +158,8 @@ AXIS_DEFAULT = {
"productive": {text:"productive"},
"stop-codon": {text:"stop codon"},
"out-of-frame": {text:"out of frame"},
"no-WPGxG-pattern": {text:"no {WP}GxG pattern"}
"no-WPGxG-pattern": {text:"no {WP}GxG pattern"},
"not-productive": {text:"not productive"}
fct: function(clone) {return clone.getProductivityNameDetailed()},
sort : false,
......@@ -1082,13 +1082,12 @@ Clone.prototype = {
return "no CDR3 detected"
} else if (this.isProductive() == true) {
return "productive"
} else if (this.isProductive() == false) {
if (this.isInFrame() == false){
return "out of frame"
} else if (this.hasStopCodon() == true) {
return "stop codon"
} else {
var cause = this.getUnproductivityCause()
if (cause != undefined) {
return cause
} else {
return "not productive"
return "not-productive"
......@@ -761,12 +761,16 @@ QUnit.test("productivity detailed", function(assert) {
var c3 = m.clones[2]
var c4 = m.clones[3]
var c5 = m.clones[4]
var c6 = m.clones[5]
assert.equal(c1.getProductivityNameDetailed(), "out-of-frame", "detailed productivity; out-of-frame");
assert.equal(c2.getProductivityNameDetailed(), "stop-codon", "detailed productivity; stop-codon");
assert.equal(c3.getProductivityNameDetailed(), "not productive", "detailed productivity; unproductive simple");
assert.equal(c3.getProductivityNameDetailed(), "not-productive", "detailed productivity; unproductive simple");
assert.equal(c4.getProductivityNameDetailed(), "no CDR3 detected", "detailed productivity; without junction");
assert.equal(c5.getProductivityNameDetailed(), "productive", "detailed productivity; productive");
assert.equal(c6.getProductivityNameDetailed(), "no-WPGxG-pattern", "detailed productivity; no-WPGxG-pattern");
QUnit.test("export_airr", function(assert) {
var m = new Model();
......@@ -210,17 +210,17 @@ QUnit.test("axes productivity detailed", function(assert) {
var sp = new ScatterPlot("visu",m);
assert.equal(sp.returnActiveclones(), 5, "returnActiveClones -> 5");
assert.equal(sp.returnActiveclones(), 6, "returnActiveClones -> 6");
sp.changeSplitMethod("productivity detailed", "productivity detailed", "grid");
var axes_legend = document.getElementById("visu_axis_x_container").childNodes
setTimeout( function() {
assert.equal( axes_legend[0].__data__.text, "no CDR3 detected", "sp legend productivity; no CDR3 detected")
assert.equal( axes_legend[1].__data__.text, "productive", "sp legend productivity; productive")
assert.equal( axes_legend[2].__data__.text, "non productive", "sp legend productivity; non productive")
assert.equal( axes_legend[3].__data__.text, "stop codon", "sp legend productivity; stop codon")
assert.equal( axes_legend[4].__data__.text, "out of frame", "sp legend productivity; out of frame")
assert.equal( axes_legend[5].__data__.text, "?", "sp legend productivity; '?'")
assert.equal( axes_legend[2].__data__.text, "stop codon", "sp legend productivity; stop codon")
assert.equal( axes_legend[3].__data__.text, "out of frame", "sp legend productivity; out of frame")
assert.equal( axes_legend[4].__data__.text, "no {WP}GxG pattern", "sp legend productivity; no {WP}GxG pattern")
assert.equal( axes_legend[5].__data__.text, "not productive", "sp legend productivity; not productive")
}, 150);
\ No newline at end of file
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