Commit 89c537e9 authored by Mathieu Giraud's avatar Mathieu Giraud

Merge branch 'hotfix-c/3043-load_custom_germline' into 'dev'

Hotfix c/3043 load custom germline

See merge request !153
parents a9892948 7d11ee39
Pipeline #17575 passed with stages
in 5 minutes and 49 seconds
......@@ -123,6 +123,7 @@ Germline.prototype = {
if (type=="D") type2="4"
if (type=="J") type2="3"
if (typeof this.m.germlineList.list[system] !== 'undefined' &&
typeof this.m.germlineList.list[system].recombinations !== 'undefined' && // Old 'custom' germline format, see #3043
typeof this.m.germlineList.list[system].recombinations[0] !== 'undefined'){
if (typeof this.m.germlineList.list[system].recombinations[0][type2] !== 'undefined' ){
for (var i=0; i<this.m.germlineList.list[system].recombinations[0][type2].length; i++){
......
......@@ -32,3 +32,30 @@ QUnit.test("GermlineList : ", function(assert) {
assert.equal(gl.getColor('AZE'), "#ffffff", "AZE should have a color")
assert.equal(gl.getShortcut('AZE'), "$", "AZE should have a shortcut")
})
QUnit.test("Germline load : ", function(assert) {
// Test if the function work correctly with the load of a 'custom' system
model = new Model()
gl = new GermlineList();
gerlmine_custom = {
"custom": {
"3": [
"start_reference.fa"
],
"4": [],
"5": [
"ends_reference_D.fa"
],
"shortcut": "X"
}
}
gl.add( gerlmine_custom )
model.germlineList = gl
model.germlineV = new Germline(model);
model.germlineV.load("custom", "V", this)
console.log( model.germlineV.system )
assert.equal(model.germlineV.system, "custom", "Load correctly an old fashion custom system")
})
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