aboutsummaryrefslogtreecommitdiff
path: root/wqflask
diff options
context:
space:
mode:
authorAlexander Kabui2022-01-19 12:58:10 +0300
committerBonfaceKilz2022-02-09 08:49:56 +0300
commit1d34c15ddafc516dfaf6064f4fad2bf09795d5ed (patch)
treecb5f52db1c0f359463cb4bbab01145b45576cadc /wqflask
parent1f8705001631e00ca719ba49068d0b7bee10f3af (diff)
downloadgenenetwork2-1d34c15ddafc516dfaf6064f4fad2bf09795d5ed.tar.gz
parse input data
Diffstat (limited to 'wqflask')
-rw-r--r--wqflask/wqflask/ctl/gn3_ctl_analysis.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/wqflask/wqflask/ctl/gn3_ctl_analysis.py b/wqflask/wqflask/ctl/gn3_ctl_analysis.py
index d44f8bf0..2b5c0f0b 100644
--- a/wqflask/wqflask/ctl/gn3_ctl_analysis.py
+++ b/wqflask/wqflask/ctl/gn3_ctl_analysis.py
@@ -3,6 +3,20 @@ import requests
from utility.tools import GN3_LOCAL_URL
+def parse_form_data(form_data: dict):
+ """function to parse/validate form data
+ input: dict containing required data
+ output: dict with parsed data
+
+ """
+
+ form_data["nperm"] = int(form_data["nperm"])
+ form_data["significance"] = float(int(form_data["significance"]))
+ form_data["strategy"] = form_data["strategy"].capitalize()
+
+ return form_data
+
+
def run_ctl():
"""function to make an api call
to gn3 and run ctl"""