...
  View open merge request
Commits (2)
......@@ -31,13 +31,13 @@
* @param {Model} model
* @param {integer} index - clone index, it's just the clone position in the model's clone array
* */
function Clone(data, model, index, virtual) {
function Clone(data, model, index, type) {
if (type == undefined) { type = "clone" } // bikehedding...
this.m = model
this.index = index
this.split = false
this.seg = {};
this.segEdited = false
this.virtual = typeof virtual !== 'undefined' ? virtual : false
var key = Object.keys(data)
......@@ -67,16 +67,46 @@ function Clone(data, model, index, virtual) {
this.shortName = this.shortName.replace(new RegExp('TRG', 'g'), "");
this.shortName = this.shortName.replace(new RegExp('\\*..', 'g'), "");
}
var list_type_param = ["inList", "inSegmenter", "inGrid", "inBar", "inTimeline", "virtual", "computeStat"]
for (pos in list_type_param){
var field = list_type_param[pos]
this[field] = false
}
if (type == "clone"){
this.inList = true
this.inSegmenter = true
this.inGrid = true
this.inBar = true
this.inTimeline = true
this.computeStat = true
} else if (type == "other"){
this.inList = true
this.virtual = true
} else if (type == "manual"){
this.inList = true
this.inSegmenter = true
this.virtual = true
} else if (type.indexOf("distrib") != -1){
var splitted = type.split("")
this.parent = splitted[splitted.length-1]
this.inGrid = true
this.inBar = true
this.virtual = true
}
this.m.clusters[index]=[index]
this.m.clones[index]=this
this.tag = this.getTag();
this.computeGCContent()
this.computeCoverage()
this.computeEValue()
if (this.computeStat){
this.computeGCContent()
this.computeCoverage()
this.computeEValue()
// .warn, client computed warnings
this.computeWarnings()
// .warn, client computed warnings
this.computeWarnings()
}
}
function nullIfZero(x) { return (x === 0 || x === '0') ? '' : x }
......
......@@ -348,7 +348,7 @@ Model_loader.prototype = {
"reads": [],
"germline" : this.system_available[q],
};
new Clone(other, self, index, true);
new Clone(other, self, index, "other");
index++ ;
}
......