aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzsloan2021-04-30 18:38:57 +0000
committerzsloan2021-04-30 18:38:57 +0000
commit699b952c7bda5426f3f3e947454f656a4ec7538b (patch)
treec579c8ec672f969913c5e810aa01d3ca60e79af0
parent385da724b63f57d0fb1bbe3476cea31ef837c081 (diff)
downloadgenenetwork2-699b952c7bda5426f3f3e947454f656a4ec7538b.tar.gz
Fixed issue where Network Graph wouldn't show edges if multiple nodes had the same trait name; instead use combo of trait name and dataset name as the edge IDs
-rw-r--r--wqflask/wqflask/network_graph/network_graph.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/wqflask/wqflask/network_graph/network_graph.py b/wqflask/wqflask/network_graph/network_graph.py
index 93785a3a..a41df1ed 100644
--- a/wqflask/wqflask/network_graph/network_graph.py
+++ b/wqflask/wqflask/network_graph/network_graph.py
@@ -140,7 +140,7 @@ class NetworkGraph:
if abs(sample_r) > max_corr:
max_corr = abs(sample_r)
- edge_data = {'id': str(this_trait.name) + '_to_' + str(target_trait.name),
+ edge_data = {'id': f"{str(this_trait.name)}:{str(this_trait.dataset.name)}" + '_to_' + f"{str(target_trait.name)}:{str(target_trait.dataset.name)}",
'source': str(this_trait.name) + ":" + str(this_trait.dataset.name),
'target': str(target_trait.name) + ":" + str(target_trait.dataset.name),
'correlation': round(sample_r, 3),