aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--wqflask/wqflask/network_graph/network_graph.py9
-rw-r--r--wqflask/wqflask/static/new/javascript/network_graph.js2
2 files changed, 7 insertions, 4 deletions
diff --git a/wqflask/wqflask/network_graph/network_graph.py b/wqflask/wqflask/network_graph/network_graph.py
index c99fce01..93785a3a 100644
--- a/wqflask/wqflask/network_graph/network_graph.py
+++ b/wqflask/wqflask/network_graph/network_graph.py
@@ -27,7 +27,6 @@ from utility import helper_functions
from utility import corr_result_helpers
from utility.tools import GN2_BRANCH_URL
-
class NetworkGraph:
def __init__(self, start_vars):
@@ -69,7 +68,7 @@ class NetworkGraph:
this_trait = trait_db[0]
this_db = trait_db[1]
- this_db_samples = this_db.group.samplelist
+ this_db_samples = this_db.group.all_samples_ordered()
this_sample_data = this_trait.data
corr_result_row = []
@@ -80,7 +79,11 @@ class NetworkGraph:
for target in self.trait_list:
target_trait = target[0]
target_db = target[1]
- target_samples = target_db.group.samplelist
+
+ if str(this_trait) == str(target_trait) and str(this_db) == str(target_db):
+ continue
+
+ target_samples = target_db.group.all_samples_ordered()
target_sample_data = target_trait.data
diff --git a/wqflask/wqflask/static/new/javascript/network_graph.js b/wqflask/wqflask/static/new/javascript/network_graph.js
index 02c3b817..480443ee 100644
--- a/wqflask/wqflask/static/new/javascript/network_graph.js
+++ b/wqflask/wqflask/static/new/javascript/network_graph.js
@@ -115,7 +115,7 @@ window.onload=function() {
correlation_line = '<b>Sample r: ' + this.data().correlation + '</b><br>'
p_value_line = 'Sample p(r): ' + this.data().p_value + '<br>'
overlap_line = 'Overlap: ' + this.data().overlap + '<br>'
- scatter_plot = '<a href="' + gn2_url + '/corr_scatter_plot?dataset_1=' + this.data().source.split(":")[1] + '&dataset_2=' + this.data().target.split(":")[1] + '&trait_1=' + this.data().source.split(":")[0] + '&trait_2=' + this.data().target.split(":")[0] + '" >View Scatterplot</a>'
+ scatter_plot = '<a href="' + gn2_url + '/corr_scatter_plot?method=pearson&dataset_1=' + this.data().source.split(":")[1] + '&dataset_2=' + this.data().target.split(":")[1] + '&trait_1=' + this.data().source.split(":")[0] + '&trait_2=' + this.data().target.split(":")[0] + '" >View Scatterplot</a>'
return correlation_line + p_value_line + overlap_line + scatter_plot
},
position: {