From b62b1c8e1d93bcd637ea531efbe55f8aa7aa6656 Mon Sep 17 00:00:00 2001 From: DannyArends Date: Sat, 19 Sep 2015 13:07:58 +0200 Subject: Adding views and passing the trait_list information from setup to results --- wqflask/wqflask/views.py | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) (limited to 'wqflask') diff --git a/wqflask/wqflask/views.py b/wqflask/wqflask/views.py index 89302120..73899316 100755 --- a/wqflask/wqflask/views.py +++ b/wqflask/wqflask/views.py @@ -177,13 +177,19 @@ def help(): doc = docs.Docs("help") return render_template("docs.html", **doc.__dict__) -@app.route("/wgcna", methods=('POST',)) -def wcgna(): +@app.route("/wgcna_setup", methods=('POST',)) +def wcgna_setup(): + print("In wgcna, request.form is:", request.form) # We are going to get additional user input for the analysis + return render_template("wgcna_setup.html", **request.form) # Display them using the template + +@app.route("/wgcna_results", methods=('POST',)) +def wcgna_results(): print("In wgcna, request.form is:", request.form) - wgcna = wgcna_analysis.WGCNA() # Start R, load the package and pointers and create the analysis - wgcnaA = wgcna.run_analysis(request.form) # Start the analysis, a wgcnaA object should be a separate long running thread - result = wgcna.process_results(wgcnaA) # After the analysis is finished store the result - return render_template("wgcna_results.html", **result) # Display them using the template + wgcna = wgcna_analysis.WGCNA() # Start R, load the package and pointers and create the analysis + wgcnaA = wgcna.run_analysis(request.form) # Start the analysis, a wgcnaA object should be a separate long running thread + result = wgcna.process_results(wgcnaA) # After the analysis is finished store the result + return render_template("wgcna_results.html", **result) # Display them using the template + @app.route("/news") def news_route(): -- cgit v1.2.3