diff options
author | Alexander Kabui | 2022-01-26 00:14:49 +0300 |
---|---|---|
committer | BonfaceKilz | 2022-02-09 08:49:56 +0300 |
commit | 1bb1812fe0594cc2e8b0a32d09760f0cffc4bd96 (patch) | |
tree | 1a9d56918cf8910f4f9001fabd280a54e813a9f6 /wqflask | |
parent | e404ff12248409d47c65f970807f2311cc01cf3a (diff) | |
download | genenetwork2-1bb1812fe0594cc2e8b0a32d09760f0cffc4bd96.tar.gz |
modify ctl endpoint
Diffstat (limited to 'wqflask')
-rw-r--r-- | wqflask/wqflask/ctl/gn3_ctl_analysis.py | 2 | ||||
-rw-r--r-- | wqflask/wqflask/views.py | 13 |
2 files changed, 12 insertions, 3 deletions
diff --git a/wqflask/wqflask/ctl/gn3_ctl_analysis.py b/wqflask/wqflask/ctl/gn3_ctl_analysis.py index f2873ac0..73eadb25 100644 --- a/wqflask/wqflask/ctl/gn3_ctl_analysis.py +++ b/wqflask/wqflask/ctl/gn3_ctl_analysis.py @@ -23,7 +23,7 @@ def process_significance_data(significant_data): if col in ["dcor", "LOD"]: - dataset_rows[index].append(round(col_data, 2)) + dataset_rows[index].append(round(float(col_data), 2)) else: dataset_rows[index].append(col_data) diff --git a/wqflask/wqflask/views.py b/wqflask/wqflask/views.py index 23b4e07a..ec321401 100644 --- a/wqflask/wqflask/views.py +++ b/wqflask/wqflask/views.py @@ -45,6 +45,7 @@ from flask import send_from_directory from flask import redirect from flask import url_for from flask import send_file +from flask import jsonify # Some of these (like collect) might contain endpoints, so they're still used. # Blueprints should probably be used instead. @@ -68,7 +69,9 @@ from wqflask.correlation.correlation_gn3_api import compute_correlation from wqflask.correlation_matrix import show_corr_matrix from wqflask.correlation import corr_scatter_plot # from wqflask.wgcna import wgcna_analysis -# from wqflask.ctl import ctl_analysis +from wqflask.ctl import ctl_analysis +from wqflask.ctl.gn3_ctl_analysis import run_ctl + from wqflask.wgcna.gn3_wgcna import run_wgcna from wqflask.snp_browser import snp_browser from wqflask.search_results import SearchResultPage @@ -354,6 +357,13 @@ def ctl_setup(): return render_template("ctl_setup.html", **request.form) + +@app.route("/ctl_results",methods=["POST"]) +def ctl_results(): + + ctl_results = run_ctl(request.form) + return render_template("gn3_ctl_results.html",**ctl_results) + @app.route("/intro") def intro(): doc = Docs("intro", request.args) @@ -1079,4 +1089,3 @@ def display_diffs_users(): return render_template("display_files_user.html", files=files) - |