diff options
Diffstat (limited to 'gn2/wqflask/templates/ctl_results.html')
-rw-r--r-- | gn2/wqflask/templates/ctl_results.html | 77 |
1 files changed, 77 insertions, 0 deletions
diff --git a/gn2/wqflask/templates/ctl_results.html b/gn2/wqflask/templates/ctl_results.html new file mode 100644 index 00000000..1c31b499 --- /dev/null +++ b/gn2/wqflask/templates/ctl_results.html @@ -0,0 +1,77 @@ +{% extends "base.html" %} +{% block css %} + <link rel="stylesheet" type="text/css" href="/static/new/css/network_graph.css" /> + <link rel="stylesheet" type="text/css" href="{{ url_for('css', filename='cytoscape-panzoom/cytoscape.js-panzoom.css') }}"> + <link rel="stylesheet" type="text/css" href="{{ url_for('css', filename='qtip2/jquery.qtip.min.css') }}"> + <style> + /* The Cytoscape Web container must have its dimensions set. */ + html, body { height: 100%; width: 100%; padding: 0; margin: 0; } + #cytoscapeweb { width: 70%; height: 70%; } + </style> +{% endblock %} + +{% block title %}CTL results{% endblock %} + +{% block content %} <!-- Start of body --> +<div class="container"> + <h1>CTL Results</h1> + {{(request.form['trait_list'].split(',')|length)}} phenotypes as input<br> + + <!-- + <a href="/tmp/{{ results['imgurl1'] }}"> + <img alt="Embedded Image" src="data:image/png;base64, + {% for elem in results['imgdata1'] -%} + {% print("%c"|format(elem)) %} + {%- endfor %} + " /></a> --> + + <h3>CTL/QTL Plots for individual traits</h3> + {% for r in range(2, (request.form['trait_list'].split(',')|length +1)) %} + <a href="/tmp/{{ results['imgurl' + r|string] }}"> + <img width=100 height=100 alt="Embedded Image" src="data:image/png;base64, + {% for elem in results['imgdata' + r|string] -%} + {% print("%c"|format(elem)) %} + {%- endfor %} + " /></a> + {% endfor %} + <h3>Tabular results</h3> + <table width="80%"> + <tr><th>trait</th><th>marker</th><th>trait</th><th>LOD</th><th>dCor</th></tr> + significant CTL:<br> + {% for r in range(results['ctlresult'][0]|length) %} + <tr> + {% for c in range(results['ctlresult']|length) %} + <td> + {% if c > 2 %} + {{results['ctlresult'][c][r]|float|round(2)}} + {% else %} + {{results['ctlresult'][c][r]}} + {% endif %} + </td> + {% endfor %} + </tr> + {% endfor %} + </table> + <h3>Network Figure</h3> + <div id="cytoscapeweb" class="col-xs-9" style="min-height:700px !important;"></div> +</div> +{% endblock %} + +{% block js %} + + <script> + elements_list = {{ elements | safe }} + gn2_url = "{{ gn2_url | safe }}" + </script> + + <script language="javascript" type="text/javascript" src="{{ url_for('js', filename='DataTables/js/jquery.js') }}"></script> + <script language="javascript" type="text/javascript" src="{{ url_for('js', filename='qtip2/jquery.qtip.min.js') }}"></script> + <script language="javascript" type="text/javascript" src="{{ url_for('js', filename='js_alt/underscore.min.js') }}"></script> + <script language="javascript" type="text/javascript" src="{{ url_for('js', filename='cytoscape/cytoscape.min.js') }}"></script> + <script language="javascript" type="text/javascript" src="{{ url_for('js', filename='cytoscape-panzoom/cytoscape-panzoom.js') }}"></script> + <!-- should be using cytoscape-popper for tips, see docs --> + <script language="javascript" type="text/javascript" src="{{ url_for('js', filename='cytoscape-qtip/cytoscape-qtip.js') }}"></script> + + <script language="javascript" type="text/javascript" src="/static/new/javascript/ctl_graph.js"></script> + +{% endblock %} |