diff options
Diffstat (limited to 'wqflask')
-rw-r--r-- | wqflask/wqflask/correlation/correlation_gn3_api.py | 3 | ||||
-rw-r--r-- | wqflask/wqflask/templates/demo_correlation_page.html | 78 | ||||
-rw-r--r-- | wqflask/wqflask/views.py | 2 |
3 files changed, 77 insertions, 6 deletions
diff --git a/wqflask/wqflask/correlation/correlation_gn3_api.py b/wqflask/wqflask/correlation/correlation_gn3_api.py index 8ee4a9b7..b4480076 100644 --- a/wqflask/wqflask/correlation/correlation_gn3_api.py +++ b/wqflask/wqflask/correlation/correlation_gn3_api.py @@ -47,11 +47,14 @@ def create_target_this_trait(start_vars): # target_dataset.get_trait_data(list(self.sample_data.keys())) this_trait = retrieve_sample_data(this_trait, this_dataset) + print(f"Starting to creat the target dataset ") + dataset_start_time = time.time() target_dataset.get_trait_data(list(sample_data.keys())) time_taken = time.time() - initial_time + print(f"the time taken to create dataset is",time.time()-dataset_start_time) print(f"the time taken to create dataset abnd trait is",time_taken) diff --git a/wqflask/wqflask/templates/demo_correlation_page.html b/wqflask/wqflask/templates/demo_correlation_page.html index a8651067..1900a0bd 100644 --- a/wqflask/wqflask/templates/demo_correlation_page.html +++ b/wqflask/wqflask/templates/demo_correlation_page.html @@ -10,11 +10,79 @@ {% endblock %} {% block content %} <div class="container"> - {{correlation_results}} -<!-- - {% for corr in correlation_results %} - <div>{{corr}}</div> - {% endfor %} --> + <div class="container-title">CORRELATION RESULTS</div> + <div class="header_content"> + <h3>Trait_Name<h3> + <h3>Rho value</h3> + <h3>Num overlap </h3> + <h3>P value</h3> + </div> + <div class="container-body"> + {% for corr_result in correlation_results %} + {% for key,value in corr_result.items()%} + <div class="container-content"> + <div><p>trait_name_here</p></div> + {%for o_key,o_value in value.items()%} + <div><p>{{o_value}}</p></div> + {%endfor%} + {% endfor %} +</div> + {% endfor %} +</div> </div> + +<style type="text/css"> + body{ + width: 100vw; + height: 100vh; + + } + .container { + width: 80vw; + margin: 0 auto; + height: 100vh; + } + + .container-title { + font-weight:bold; + width: 100%; + padding:5px 3px; + border-bottom: 2px solid #000; + text-align: center; + + } + + .header_content { + width: 100%; + display: flex; + justify-content: space-between; + + } + + .header_content h3 { + width: 100%; + } + + + .container-body { + max-height: 40vh; + width: 100%; + } + + .container-content { + display: flex; + justify-content: space-between; + padding:3px 2px; + /*align-items: center;*/ + + } + + .container-content div{ + } + + + +</style> {% endblock %} + diff --git a/wqflask/wqflask/views.py b/wqflask/wqflask/views.py index 6ca9b23f..072db466 100644 --- a/wqflask/wqflask/views.py +++ b/wqflask/wqflask/views.py @@ -882,7 +882,7 @@ def corr_compute_page(): logger.info("In corr_compute, request.form is:", pf(request.form)) logger.info(request.url) correlation_results = compute_correlation(request.form) - return render_template("demo_correlation_page.html",correlation_results=correlation_results) + return render_template("demo_correlation_page.html",correlation_results=correlation_results[1:20]) @app.route("/corr_matrix", methods=('POST',)) def corr_matrix_page(): |