From fcfd7be522ce914b0aa11cd4555aeab2d2141428 Mon Sep 17 00:00:00 2001
From: Alexander Kabui
Date: Fri, 19 Nov 2021 11:10:33 +0300
Subject: Feature/fix wgcna api path (#630)
* add correct path gn3 api endpoint
* remove ununsed dependencies;replace libraries with ones from guix
* replace xterm cdn libs---
wqflask/wqflask/templates/wgcna_setup.html | 37 ++++++++----------------------
wqflask/wqflask/wgcna/gn3_wgcna.py | 10 +++-----
2 files changed, 12 insertions(+), 35 deletions(-)
(limited to 'wqflask')
diff --git a/wqflask/wqflask/templates/wgcna_setup.html b/wqflask/wqflask/templates/wgcna_setup.html
index 86d9fa10..d7acd5f2 100644
--- a/wqflask/wqflask/templates/wgcna_setup.html
+++ b/wqflask/wqflask/templates/wgcna_setup.html
@@ -9,7 +9,8 @@
}
-
+
+
-
-
-
-
-
-
-
+
+
-
+
{% endblock %}
\ No newline at end of file
diff --git a/wqflask/wqflask/wgcna/gn3_wgcna.py b/wqflask/wqflask/wgcna/gn3_wgcna.py
index c4cc2e7f..15728f22 100644
--- a/wqflask/wqflask/wgcna/gn3_wgcna.py
+++ b/wqflask/wqflask/wgcna/gn3_wgcna.py
@@ -4,7 +4,9 @@ and process data to be rendered by datatables
import requests
from types import SimpleNamespace
+
from utility.helper_functions import get_trait_db_obs
+from utility.tools import GN_SERVER_URL
def fetch_trait_data(requestform):
@@ -24,7 +26,6 @@ def process_dataset(trait_list):
traits = []
strains = []
- # xtodo unique traits and strains
for trait in trait_list:
traits.append(trait[0].name)
@@ -33,9 +34,6 @@ def process_dataset(trait_list):
for strain in trait[0].data:
strains.append(strain)
input_data[trait[0].name][strain] = trait[0].data[strain].value
- # "sample_names": list(set(strains)),
- # "trait_names": form_traits,
- # "trait_sample_data": form_strains,
return {
"input": input_data,
@@ -77,9 +75,7 @@ def process_image(response):
def run_wgcna(form_data):
"""function to run wgcna"""
- GN3_URL = "http://127.0.0.1:8081"
-
- wgcna_api = f"{GN3_URL}/api/wgcna/run_wgcna"
+ wgcna_api = f"{GN_SERVER_URL}api/wgcna/run_wgcna"
# parse form data
--
cgit v1.2.3