Commit 1f6b2afc authored by aurelien beliard's avatar aurelien beliard Committed by Mathieu Giraud

remove to_100 normalization method

parent d2d3c5d8
......@@ -474,7 +474,7 @@ Clone.prototype = {
if (this.m.reads.segmented[time] === 0 ) return 0
var result = this.getReads(time) / this.m.reads.segmented[time]
if (this.m.norm && this.m.normalization.method!="constant") result = this.m.normalize(result, time)
if (this.m.norm ) result = this.m.normalize(result, time)
return result
},
......
......@@ -971,7 +971,7 @@ Graph.prototype = {
var max = this.m.precision*this.m.max_size
//get ready for something really dirty
if (this.m.norm && this.m.normalization.method == "constant"){
if (this.m.norm){
for (var i=0; i<this.m.samples.order.length; i++) {
for (var j=0; j<this.m.clones.length; j++){
var size = this.m.precision*this.m.clone(j).getSize()
......
......@@ -625,11 +625,12 @@ changeAlleleNotation: function(alleleNotation) {
var A = this.normalization.A[time] /* standard/spike at point time */
var B = this.normalization.B /* standard/spike expected value */
if (this.normalization.method=="constant" || original_size <= A){
if (original_size <= A){
normalized_size = (original_size * B) / A
}else{
normalized_size = B + ( (original_size - A) * ( (1 - B) / (1 - A) ) )
}
// }else{
// normalized_size = B + ( (original_size - A) * ( (1 - B) / (1 - A) ) )
// }
}else{
normalized_size = original_size
......@@ -716,7 +717,7 @@ changeAlleleNotation: function(alleleNotation) {
this.max_size = 1
this.min_size = min_size
if (this.norm && this.normalization.method=="constant"){
if (this.norm){
for (var j=0; j<this.samples.order.length; j++){
if(this.normalization.A[j]==0){
max = this.normalization.B
......@@ -1933,18 +1934,6 @@ changeAlleleNotation: function(alleleNotation) {
this.tagSelector.style.top=top+"px";
},
/**
* change the strategy for normalization
* @param {string} method - can be 'constant' or 'to-100'
* */
changeNormMethod : function (method){
this.normalization.method=method;
if (this.normalization.type=="data" && method !="constant"){
this.normalization.method="constant";
}
this.update()
},
/**
* load a new germline and update
......
......@@ -63,7 +63,7 @@
"hide": []
},
"normalization": {
"method": "constant",
"A": [],
"B": 0,
"id": -1
......
......@@ -68,7 +68,6 @@ analysis_data = {
"hide": []
},
"normalization": {
"method": "constant",
"A": [],
"B": 0,
"id": -1
......
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