From 97663c7d0aa4b457948301849a46e6d9b42664c9 Mon Sep 17 00:00:00 2001
From: zsloan
Date: Thu, 29 Apr 2021 21:38:07 +0000
Subject: Changed the way sample data is fetched for network graph to include
parents/f1s
---
wqflask/wqflask/network_graph/network_graph.py | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/wqflask/wqflask/network_graph/network_graph.py b/wqflask/wqflask/network_graph/network_graph.py
index 132e1884..ca3d5bb3 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(object):
def __init__(self, start_vars):
@@ -69,7 +68,7 @@ class NetworkGraph(object):
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,8 @@ class NetworkGraph(object):
for target in self.trait_list:
target_trait = target[0]
target_db = target[1]
- target_samples = target_db.group.samplelist
+
+ target_samples = target_db.group.all_samples_ordered()
target_sample_data = target_trait.data
--
cgit v1.2.3
From 53b0ba9672c8855a82fe7695832f869347bf9f88 Mon Sep 17 00:00:00 2001
From: zsloan
Date: Thu, 29 Apr 2021 21:39:52 +0000
Subject: Don't draw edges between a trait and itself
---
wqflask/wqflask/network_graph/network_graph.py | 3 +++
1 file changed, 3 insertions(+)
diff --git a/wqflask/wqflask/network_graph/network_graph.py b/wqflask/wqflask/network_graph/network_graph.py
index ca3d5bb3..a45eaad4 100644
--- a/wqflask/wqflask/network_graph/network_graph.py
+++ b/wqflask/wqflask/network_graph/network_graph.py
@@ -80,6 +80,9 @@ class NetworkGraph(object):
target_trait = target[0]
target_db = target[1]
+ 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
--
cgit v1.2.3
From 02184d2e867e7d14a825c739d55eb00c9aa142b7 Mon Sep 17 00:00:00 2001
From: zsloan
Date: Thu, 29 Apr 2021 21:40:17 +0000
Subject: Fix corr_scatter_plot url to include method - without method it was
throwing an error
---
wqflask/wqflask/static/new/javascript/network_graph.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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 = 'Sample r: ' + this.data().correlation + '
'
p_value_line = 'Sample p(r): ' + this.data().p_value + '
'
overlap_line = 'Overlap: ' + this.data().overlap + '
'
- scatter_plot = 'View Scatterplot'
+ scatter_plot = 'View Scatterplot'
return correlation_line + p_value_line + overlap_line + scatter_plot
},
position: {
--
cgit v1.2.3