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

qunit : debug test

parent ce322781
......@@ -14,19 +14,22 @@ test("Axis : ", function() {
deepEqual(axis.labels, [], "default axis");
//abundance
axis.useSize()
axis.custom(function(cloneID){return m.clone(cloneID).getSizeZero()},
function(){return m.min_size},
1,
true,
true
)
deepEqual(axis.labels, [
{"geneColor": undefined,"pos": 0,"text": "100%", "type": "line"},
{"geneColor": undefined,"pos": 1,"text": "100%", "type": "line"},
{"geneColor": undefined,"pos": 0.5,"text": "10%", "type": "line"},
{"geneColor": undefined,"pos": 1,"text": "1%", "type": "line"}
{"geneColor": undefined,"pos": 0,"text": "1%", "type": "line"}
], "check size labels");
equal(axis.pos(0).toPrecision(3), 0.651, "clone 0 (5%) position -> 0.651")
equal(axis.pos(0).toPrecision(3), 0.349, "clone 0 (5%) position -> 0.651")
equal(axis.pos(1).toPrecision(3), 0.500, "clone 1 (10%) position -> 0.5")
equal(axis.pos(2).toPrecision(3), 0.452, "clone 2 (12.5%) position -> 0.452")
equal(axis.pos(2).toPrecision(3), 0.548, "clone 2 (12.5%) position -> 0.452")
axis.m.changeGermline("TRG")
//germline V
......
......@@ -60,7 +60,7 @@ test("clone : name", function() {
equal(c1.getSize(), 0.10, "cluster c1+c2 size : 0.10");
equal(c1.getStrSize(), "10.000%", "cluster c1+c2 size (%) : 10%");
equal(c1.getSequenceReads(), 10, "clone c1 reads : 10");
equal(c1.get('reads'), 10, "clone c1 reads : 10");
equal(c1.getSequenceSize(), "0.05", "clone c1 size : 0.05");
console.log(m.samples.order)
equal(c1.getHtmlInfo(), "<h2>Cluster info : hello</h2><div id='info_window'><table><tr><th></th><td>Diag</td><td>Fu-1</td><td>Fu-2</td><td>Fu-3</td></tr><tr><td class='header' colspan='5'> clone </td></tr><tr><td> clone name </td><td colspan='4'>hello</td></tr><tr><td> clone size (n-reads (total reads) )</td><td>20 (200)</td><td>20 (100)</td><td>30 (200)</td><td>30 (100)</td></tr><tr><td> clone size (%)</td><td>10.000 % </td><td>20.000 % </td><td>15.000 % </td><td>30.000 % </td><tr><td class='header' colspan='5'> representative sequence</td></tr><tr><td> sequence name </td><td colspan='4'>hello</td></tr><tr><td> code </td><td colspan='4'>hello</td></tr><tr><td> length </td><td colspan='4'>26</td></tr><tr><td> size (n-reads (total reads) )</td><td>10 (200)</td><td>10 (100)</td><td>15 (200)</td><td>15 (100)</td></tr><tr><td> size (%)</td><td>5.000 % </td><td>10.000 % </td><td>7.500 % </td><td>15.000 % </td></tr><tr><td class='header' colspan='5'> segmentation</td></tr><tr><td> sequence </td><td colspan='4'>abcdefghijklmnopqrstuvwxyz</td></tr><tr><td> id </td><td colspan='4'>id1</td></tr><tr><td> 5 </td><td colspan='4'>undefined V</td></tr><tr><td> 4 </td><td colspan='4'>IGHD2*03</td></tr><tr><td> 3 </td><td colspan='4'>IGHV4*01</td></tr><tr><td class='header' colspan='5'> &nbsp; </td></tr></table></div>",
......@@ -86,7 +86,7 @@ test("clone : size", function() {
equal(c1.getSize(), 0.10, "cluster c1+c2 size : 0.10");
equal(c1.getStrSize(), "10.000%", "cluster c1+c2 size (%) : 10%");
equal(c1.getSequenceReads(), 10, "clone c1 reads : 10");
equal(c1.get('reads'), 10, "clone c1 reads : 10");
equal(c1.getSequenceSize(), "0.05", "clone c1 size : 0.05");
});
......@@ -98,12 +98,12 @@ test("clone : system", function() {
var c1 = new Clone(json_clone1, m, 0)
m.initClones()
equal(c1.getSystem(), "TRG", "getSystem() >> clone system : TRG");
equal(c1.getV(), "undefined V", "getV() >> V : undefined");
equal(c1.getD(), "IGHD2*03", "getD() >> D (+allele): IGHD2*03");
equal(c1.getJ(), "IGHV4*01", "getJ() >> J (+alelele): IGHV4*01");
equal(c1.getD(false), "IGHD2", "getD() >> D : IGHD2");
equal(c1.getJ(false), "IGHV4", "getJ() >>J : IGHV4");
equal(c1.get('germline'), "TRG", "getSystem() >> clone system : TRG");
equal(c1.getGene('5'), "undefined V", "getV() >> V : undefined");
equal(c1.getGene('4'), "IGHD2*03", "getD() >> D (+allele): IGHD2*03");
equal(c1.getGene('3'), "IGHV4*01", "getJ() >> J (+alelele): IGHV4*01");
equal(c1.getGene('4', false), "IGHD2", "getD() >> D : IGHD2");
equal(c1.getGene('3', false), "IGHV4", "getJ() >>J : IGHV4");
equal(c1.getGene("4"), "IGHD2*03", "getGene() >> D (+allele): IGHD2*03");
equal(c1.getNlength(), 9, "getNlength() >> 9");
......
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