From e8f96b1a4b506fed6b62ffa6b0ea2b530f4550f3 Mon Sep 17 00:00:00 2001
From: zsloan
Date: Wed, 5 Oct 2016 19:00:17 +0000
Subject: CTL now displays proper error if fewer than 4 traits are selected.
Also, WGCNA previously incorrectly gave an error when fewer than 5 traits
were selected instead of fewer than 4 (because it said '<= 4').
I also improved the formatting for the html for both CTl and WGCNA Analysis.
---
wqflask/wqflask/templates/ctl_setup.html | 109 +++++++++++++++--------------
wqflask/wqflask/templates/wgcna_setup.html | 85 +++++++++++-----------
2 files changed, 98 insertions(+), 96 deletions(-)
(limited to 'wqflask')
diff --git a/wqflask/wqflask/templates/ctl_setup.html b/wqflask/wqflask/templates/ctl_setup.html
index 9c0d7bea..592e4b36 100644
--- a/wqflask/wqflask/templates/ctl_setup.html
+++ b/wqflask/wqflask/templates/ctl_setup.html
@@ -1,65 +1,70 @@
{% extends "base.html" %}
-{% block title %}WCGNA analysis{% endblock %}
+{% block title %}CTL analysis{% endblock %}
{% block content %}
+ {% if request.form['trait_list'].split(",")|length < 4 %}
+
+
+ Error:
+
Too few phenotypes as input
+ Please make sure you select enough phenotypes / genes to perform CTL. Your collection needs to contain at least 4 different traits. You provided {{request.form['trait_list'].split(',')|length}} traits as input.
+
+ {% else %}
CTL analysis parameters
{{(request.form['trait_list'].split(',')|length -1)}} phenotypes as input
-
-
+{% endif %}
{% endblock %}
diff --git a/wqflask/wqflask/templates/wgcna_setup.html b/wqflask/wqflask/templates/wgcna_setup.html
index b4a5730d..c5461497 100644
--- a/wqflask/wqflask/templates/wgcna_setup.html
+++ b/wqflask/wqflask/templates/wgcna_setup.html
@@ -4,49 +4,46 @@
{% block content %}
WGCNA analysis parameters
- {% if request.form['trait_list'].split(",")|length <= 4 %}
-
-
-
- Error:
-
- Too few phenotypes as input
-
- Please make sure you select enough phenotypes / genes to perform WGCNA, your collection needs to contain at least 4 different phenotypes. You provided {{request.form['trait_list'].split(',')|length}} phenotypes as input
-
- {% else %}
-
- {% endif %}
+ {% if request.form['trait_list'].split(",")|length < 4 %}
+
+
+ Error:
+
Too few phenotypes as input
+ Please make sure you select enough phenotypes / genes to perform WGCNA. Your collection needs to contain at least 4 different phenotypes. You provided {{request.form['trait_list'].split(',')|length}} phenotypes as input.
+
+ {% else %}
+
+ {% endif %}
{% endblock %}
--
cgit v1.2.3