Commit 5f5ccdd2 authored by flothoni's avatar flothoni Committed by Mathieu Giraud

model: move Qunit data into data_test.js;

Update test with it
parent 5faab27c
......@@ -3128,13 +3128,6 @@ changeAlleleNotation: function(alleleNotation, update, save) {
this.primersSetData.primer_fictif.TRD.primer5 = ["GATTTTACTCAAGGACGGTT", "GCAAAGAACCTGGCTGT", "AGATTTTACTCAAGGAC"] // V3, V2,
this.primersSetData.primer_fictif.TRD.primer3 = ["AGGAACCCGTGTGACT", "GAACACAACTCATCGTGGA", "GAACTGGCATCAAACTCTTC"] // J1, J2, J3
// Test qunits
this.primersSetData.primer_test.IGH = {};
this.primersSetData.primer_test.IGH.primer5 = [] // IGH seq from model_test.js
this.primersSetData.primer_test.IGH.primer3 = []
this.primersSetData.primer_test.TRG = {};
this.primersSetData.primer_test.TRG.primer5 = ["GGAAGGCCCCACAGCG"] // TRG seq from model_test.js
this.primersSetData.primer_test.TRG.primer3 = ["AACTTCGCCTGGTAA"]
},
......@@ -3225,6 +3218,7 @@ changeAlleleNotation: function(alleleNotation, update, save) {
this.primerSetCurrent = primersSet;
console.log("Current primer set : "+ this.primerSetCurrent)
this.switchPrimers();
console.log("Switch primers values : "+ this.primerSetCurrent)
this.update();
return 0
}
......
......@@ -412,3 +412,15 @@ analysis_data_clusters = {
]
]
}
// Test qunits
primersSetData = {};
primersSetData.primer_test = {};
primersSetData.primer_test.IGH = {};
primersSetData.primer_test.IGH.primer5 = [] // IGH seq from model_test.js
primersSetData.primer_test.IGH.primer3 = []
primersSetData.primer_test.TRG = {};
primersSetData.primer_test.TRG.primer5 = ["GGAAGGCCCCACAGCG"] // TRG seq from model_test.js
primersSetData.primer_test.TRG.primer3 = ["AACTTCGCCTGGTAA"]
\ No newline at end of file
......@@ -383,11 +383,15 @@ QUnit.test("model: primer detection", function(assert) {
// model primer setting
assert.equal(m.switchPrimersSet("no set"), 1, "primer set doesn't exist")
assert.equal(m.switchPrimersSet("ecngs"), 0, "primer set exist & are set")
// Test switch to a Qunit dataset
m.primersSetData = primersSetData // no primer for IGH, One primer for TRG
assert.equal(m.switchPrimersSet("primer_test"), 0, "primer set exist & are set")
// primer found inside clones
assert.equal(typeof m.clones[2]["seg"]["primer5"], "undefined", "Control neg primer 5 not in sequence")
assert.equal(typeof m.clones[2]["seg"]["primer3"], "undefined", "Control neg primer 3 not in sequence")
assert.equal(m.clones[2]["seg"]["primer5"], undefined, "Control neg primer 5 not in sequence")
assert.equal(m.clones[2]["seg"]["primer3"], undefined, "Control neg primer 3 not in sequence")
assert.deepEqual(m.clones[3]["seg"]["primer5"], { seq: "GGAAGGCCCCACAGCG", start: 0, stop: 15 }, "Found primer 5")
assert.deepEqual(m.clones[3]["seg"]["primer3"], { seq: "AACTTCGCCTGGTAA", start: 226, stop: 240 }, "Found primer 3")
......
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