From ffafc46a3f7d35b7224808a4e504001fa4e5c08f Mon Sep 17 00:00:00 2001 From: flothoni Date: Wed, 27 Nov 2019 17:31:14 +0100 Subject: [PATCH 1/3] clone.js; fix error on distributions if analysis is loaded Link to #4034 --- browser/js/clone.js | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/browser/js/clone.js b/browser/js/clone.js index a0ce89fe2..7d674ba38 100644 --- a/browser/js/clone.js +++ b/browser/js/clone.js @@ -788,12 +788,16 @@ Clone.prototype = { } } else if (cluster.length == 0) { // Look for cluster that include this clone - var cluster_clone = this.m.clone(clone.mergedId) - if (cluster_clone.active || cluster_clone.isFiltered) { // cluster ? - this.current_reads[timepoint] -= clone.reads[timepoint] - this.current_clones[timepoint] -= 1 + // If analysis is loaded, the value is undefined at the first call of this function + if (clone.mergedId != undefined){ + + var cluster_clone = this.m.clone(clone.mergedId) + if (cluster_clone.active || cluster_clone.isFiltered) { // cluster ? + this.current_reads[timepoint] -= clone.reads[timepoint] + this.current_clones[timepoint] -= 1 + } + // Attention , un clone cluster + split sera vu comme actif... } - // Attention , un clone cluster + split sera vu comme actif... } } } -- GitLab From 217c8a257ac094f8db77fb4dff43d6220d40f183 Mon Sep 17 00:00:00 2001 From: flothoni Date: Thu, 28 Nov 2019 11:48:35 +0100 Subject: [PATCH 2/3] Revert "clone.js; fix error on distributions if analysis is loaded" This reverts commit ffafc46a3f7d35b7224808a4e504001fa4e5c08f. --- browser/js/clone.js | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/browser/js/clone.js b/browser/js/clone.js index 7d674ba38..a0ce89fe2 100644 --- a/browser/js/clone.js +++ b/browser/js/clone.js @@ -788,16 +788,12 @@ Clone.prototype = { } } else if (cluster.length == 0) { // Look for cluster that include this clone - // If analysis is loaded, the value is undefined at the first call of this function - if (clone.mergedId != undefined){ - - var cluster_clone = this.m.clone(clone.mergedId) - if (cluster_clone.active || cluster_clone.isFiltered) { // cluster ? - this.current_reads[timepoint] -= clone.reads[timepoint] - this.current_clones[timepoint] -= 1 - } - // Attention , un clone cluster + split sera vu comme actif... + var cluster_clone = this.m.clone(clone.mergedId) + if (cluster_clone.active || cluster_clone.isFiltered) { // cluster ? + this.current_reads[timepoint] -= clone.reads[timepoint] + this.current_clones[timepoint] -= 1 } + // Attention , un clone cluster + split sera vu comme actif... } } } -- GitLab From 1759f4d9ad3d574712edc3225b598947f023cd0f Mon Sep 17 00:00:00 2001 From: flothoni Date: Thu, 28 Nov 2019 11:50:34 +0100 Subject: [PATCH 3/3] model.js; fix error of clustered clones at analysis loading Link to #4034 --- browser/js/model.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/browser/js/model.js b/browser/js/model.js index f9a50e6e0..3cbffc574 100644 --- a/browser/js/model.js +++ b/browser/js/model.js @@ -471,6 +471,12 @@ changeAlleleNotation: function(alleleNotation) { var cloneID = this.mapID[clusters[i][j]] new_cluster = new_cluster.concat(this.clusters[cloneID]); this.clusters[cloneID] = []; + // Set the mergeId value for cluterized clones + var clone = this.clones[cloneID] + if (j != 0){ + clone.mergedId = this.mapID[clusters[i][0]] + } + }else{ tmp.push(clusters[i][j]) } -- GitLab