diff options
author | zsloan | 2021-04-29 16:47:31 -0500 |
---|---|---|
committer | GitHub | 2021-04-29 16:47:31 -0500 |
commit | 3b0b0ed962bc7c0faa26198face58abd5d417396 (patch) | |
tree | 44998fd1b561e1f4fde3edbc7bc5d375b003b91f | |
parent | 4c8c5390bdba594c217d7ca0114a80a6b3634e24 (diff) | |
parent | 72248f8474400a4f27717bda9309e95d1b1bae57 (diff) | |
download | genenetwork2-3b0b0ed962bc7c0faa26198face58abd5d417396.tar.gz |
Merge pull request #569 from zsloan/bug/network_graph_fixes
Bug/network graph fixes
-rw-r--r-- | wqflask/wqflask/network_graph/network_graph.py | 9 | ||||
-rw-r--r-- | wqflask/wqflask/static/new/javascript/network_graph.js | 2 |
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: { |