aboutsummaryrefslogtreecommitdiff
path: root/wqflask
diff options
context:
space:
mode:
authorzsloan2016-10-05 19:00:17 +0000
committerzsloan2016-10-05 19:00:17 +0000
commite8f96b1a4b506fed6b62ffa6b0ea2b530f4550f3 (patch)
treef11412bd6b160fdacb49a17a4e955a29c0e275e0 /wqflask
parent2f74217d2dba0ebe879ea0caf7f28d01e55878df (diff)
downloadgenenetwork2-e8f96b1a4b506fed6b62ffa6b0ea2b530f4550f3.tar.gz
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.
Diffstat (limited to 'wqflask')
-rw-r--r--wqflask/wqflask/templates/ctl_setup.html109
-rw-r--r--wqflask/wqflask/templates/wgcna_setup.html85
2 files changed, 98 insertions, 96 deletions
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 %} <!-- Start of body -->
<div class="container">
+ {% if request.form['trait_list'].split(",")|length < 4 %}
+ <div class="alert alert-danger" role="alert">
+ <span class="glyphicon glyphicon-exclamation-sign" aria-hidden="true"></span>
+ <span class="sr-only">Error:</span>
+ <h2>Too few phenotypes as input</h2>
+ 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.
+ </div>
+ {% else %}
<h1>CTL analysis parameters</h1>
{{(request.form['trait_list'].split(',')|length -1)}} phenotypes as input
-<form action="/ctl_results" method="post" class="form-horizontal">
- <input type="hidden" name="trait_list" id="trait_list" value= "{{request.form['trait_list']}}">
+ <form action="/ctl_results" method="post" class="form-horizontal">
+ <input type="hidden" name="trait_list" id="trait_list" value= "{{request.form['trait_list']}}">
+ <div class="dropdown">
+ <label for="Strategy">Strategy</label>
+ <div class="col-sm-10">
+ <select name="strategy" id="strategy">
+ <option value="Exact">Exact</option>
+ <option value="Full">Full</option>
+ <option value="Pairwise">Pairwise</option>
+ </select>
+ </div>
+ </div>
- <div class="dropdown">
- <label for="Strategy">Strategy</label>
- <div class="col-sm-10">
- <select name="strategy" id="strategy">
- <option value="Exact">Exact</option>
- <option value="Full">Full</option>
- <option value="Pairwise">Pairwise</option>
- </select>
- </div>
- </div>
+ <div class="dropdown">
+ <label for="Permutations">Number of permutation (Used when strategy is Full or Pairwise)</label>
+ <div class="col-sm-10">
+ <select name="nperm" id="nperm">
+ <option value="100">100</option>
+ <option value="1000" selected="selected">1000</option>
+ <option value="10000">10000</option>
+ </select>
+ </div>
+ </div>
- <div class="dropdown">
- <label for="Permutations">Number of permutation (Used when strategy is Full or Pairwise)</label>
- <div class="col-sm-10">
- <select name="nperm" id="nperm">
- <option value="100">100</option>
- <option value="1000" selected="selected">1000</option>
- <option value="10000">10000</option>
- </select>
- </div>
- </div>
-
- <div class="dropdown">
- <label for="Coefficient">Type of correlation coefficient</label>
- <div class="col-sm-10">
- <select name="parametric" id="parametric">
- <option value="False">Spearman</option>
- <option value="True">Pearson</option>
- </select>
- </div>
- </div>
-
-
- <div class="dropdown">
- <label for="Significance">Significance level</label>
- <div class="col-sm-10">
- <select name="significance" id="significance">
- <option value="0.1">0.1</option>
- <option value="0.05" selected="selected">0.05</option>
- <option value="0.001">0.001</option>
- </select>
- </div>
- </div>
- <br>
- <div class="form-group">
- <div class="col-sm-10">
- <input type="submit" class="btn btn-primary" value="Run CTL using these settings" />
- </div>
- </div>
+ <div class="dropdown">
+ <label for="Coefficient">Type of correlation coefficient</label>
+ <div class="col-sm-10">
+ <select name="parametric" id="parametric">
+ <option value="False">Spearman</option>
+ <option value="True">Pearson</option>
+ </select>
+ </div>
+ </div>
+ <div class="dropdown">
+ <label for="Significance">Significance level</label>
+ <div class="col-sm-10">
+ <select name="significance" id="significance">
+ <option value="0.1">0.1</option>
+ <option value="0.05" selected="selected">0.05</option>
+ <option value="0.001">0.001</option>
+ </select>
+ </div>
+ </div>
+ <br>
+ <div class="form-group">
+ <div class="col-sm-10">
+ <input type="submit" class="btn btn-primary" value="Run CTL using these settings" />
+ </div>
+ </div>
</form>
-
+{% endif %}
</div>
{% 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 %} <!-- Start of body -->
<h1> WGCNA analysis parameters</h1>
<div class="container">
- {% if request.form['trait_list'].split(",")|length <= 4 %}
-
- <div class="alert alert-danger" role="alert">
- <span class="glyphicon glyphicon-exclamation-sign" aria-hidden="true"></span>
- <span class="sr-only">Error:</span>
- <h2>
- Too few phenotypes as input
- </h2>
- 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
- </div>
- {% else %}
- <form action="/wgcna_results" method="post" class="form-horizontal">
- <input type="hidden" name="trait_list" id="trait_list" value= "{{request.form['trait_list']}}">
- <div class="form-group">
- <label for="SoftThresholds"> Soft threshold: </label>
- <div class="col-sm-10">
- <input type="text" class="form-inline" name="SoftThresholds" id="SoftThresholds" value="1,2,3,4,5,6,7,8,9">
- </div>
- </div>
- <div class="form-group">
- <label for="MinModuleSize"> Minimum module size: </label>
- <div class="col-sm-10">
- <input type="text" class="form-inline" name="MinModuleSize" id="MinModuleSize" value="30">
- </div>
- </div>
- <div class="form-group">
- <label for="TOMtype"> TOMtype: </label>
- <div class="col-sm-10">
- <input type="text" class="form-inline" name="TOMtype" id="TOMtype" value="unsigned">
- </div>
- </div>
- <div class="form-group">
- <label for="mergeCutHeight"> mergeCutHeight: </label>
- <div class="col-sm-10">
- <input type="text" class="form-inline" name="mergeCutHeight" id="mergeCutHeight" value="0.25">
- </div>
- </div>
- <div class="form-group">
- <div class="col-sm-10">
- <input type="submit" class="btn btn-primary" value="Run WGCNA using these settings" />
- </div>
- </div>
- </form>
- {% endif %}
+ {% if request.form['trait_list'].split(",")|length < 4 %}
+ <div class="alert alert-danger" role="alert">
+ <span class="glyphicon glyphicon-exclamation-sign" aria-hidden="true"></span>
+ <span class="sr-only">Error:</span>
+ <h2>Too few phenotypes as input</h2>
+ 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.
+ </div>
+ {% else %}
+ <form action="/wgcna_results" method="post" class="form-horizontal">
+ <input type="hidden" name="trait_list" id="trait_list" value= "{{request.form['trait_list']}}">
+ <div class="form-group">
+ <label for="SoftThresholds"> Soft threshold: </label>
+ <div class="col-sm-10">
+ <input type="text" class="form-inline" name="SoftThresholds" id="SoftThresholds" value="1,2,3,4,5,6,7,8,9">
+ </div>
+ </div>
+ <div class="form-group">
+ <label for="MinModuleSize"> Minimum module size: </label>
+ <div class="col-sm-10">
+ <input type="text" class="form-inline" name="MinModuleSize" id="MinModuleSize" value="30">
+ </div>
+ </div>
+ <div class="form-group">
+ <label for="TOMtype"> TOMtype: </label>
+ <div class="col-sm-10">
+ <input type="text" class="form-inline" name="TOMtype" id="TOMtype" value="unsigned">
+ </div>
+ </div>
+ <div class="form-group">
+ <label for="mergeCutHeight"> mergeCutHeight: </label>
+ <div class="col-sm-10">
+ <input type="text" class="form-inline" name="mergeCutHeight" id="mergeCutHeight" value="0.25">
+ </div>
+ </div>
+ <div class="form-group">
+ <div class="col-sm-10">
+ <input type="submit" class="btn btn-primary" value="Run WGCNA using these settings" />
+ </div>
+ </div>
+ </form>
+ {% endif %}
</div>
{% endblock %}