Skip to content
Permalink
7fc912d077
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
124 lines (113 sloc) 5.18 KB
{% extends 'base.html' %}
{% block title %}
{% if profiles %}
Profile comparison
{% else %}
No profiles found !
{% endif %}
{% endblock %}
{% block container %}
<div class="top-pad">
{% if profiles %}
<ol class="breadcrumb">
<li><a href="{{ url_for('main.screen') }}">Home</a></li>
<li><a href="{{ url_for('main.features') }}">Tools</a></li>
<li><a href="{{ url_for('profile_comparison.profile_comparison_main') }}">Compare Profiles</a></li>
<li class="active"><strong>Results</strong></li>
</ol>
{% if cluster %}
<h1>Profile comparison: <strong>{{ cluster.name }}</strong> <small>({{ cluster.method.method }})</small></h1>
{% import "macros/cluster_actions.html" as ca %}
<div class="row">
<div class="col-xs-6"><p><strong>View as: </strong>{{ ca.cluster_actions(cluster.id, exclude=["profile"]) }}</p></div>
<div class="col-xs-6"><p class="pull-right">
{% if normalize == 1 %}
<span class="text-muted">Normalization: <strong>Enabled</strong></span> | (<a href="{{ url_for('profile_comparison.profile_comparison_cluster', cluster_id=cluster.id, normalize=0)}}">disable</a>)
{% else %}
<span class="text-muted">Normalization: <strong>Disabled</strong></span> | (<a href="{{ url_for('profile_comparison.profile_comparison_cluster', cluster_id=cluster.id, normalize=1)}}">enable</a>)
{% endif %}
</p>
</div>
</div>
{% else %}
<h1>Profile comparison</h1>
{% endif %}
<div id="canvas-holder" class="center-block">
<canvas id="chart-line" class="center-block" width="800" height="600"/>
</div>
{% if data %}
<div>
<a class="btn btn-primary pull-right" href="data:text/plain;base64,{{data}}" download="profile_data.txt">Download</a>
<br />
</div>
{% endif %}
{% else %}
<ol class="breadcrumb">
<li><a href="{{ url_for('main.screen') }}">Home</a></li>
<li><a href="{{ url_for('main.features') }}">Tools</a></li>
<li class="active"><strong>Compare Profiles</strong></li>
</ol>
<h1>Compare Profiles</h1>
<p>Use this tool to simultaniously display the expression profiles of multiple genes of interest.</p>
<div class="row">
<div class="col-md-4 col-md-offset-2 col-xs-8">
<div class="panel panel-primary">
<div class="panel-heading"><strong>Select genes</strong></div>
<div class="panel-body">
<form method="POST" action="{{ url_for('profile_comparison.profile_comparison_main') }}" role="form">
{{ form.csrf_token }}
{{form.species_id(class_="form-control") }}<br />
{{form.probes(class_="form-control") }}<br />
<div class="input-group">{{ form.normalize.label }}&nbsp;&nbsp;{{form.normalize(checked=True) }}</div>
<div class="pull-right">
{% if example and example.probes %}
<button class="btn btn-default" id="load_example">Load example</button>
{% endif %}
<button type="submit" class="btn btn-primary" data-toggle="modal" data-target="#loaderModal">Show profiles</button>
</div>
</form>
</div>
</div>
</div>
<div class="col-md-4 col-xs-4">
<div class="panel panel-default">
<div class="panel-heading"><strong>Help</strong></div>
<div class="panel-body">
<ul>
<li>First select a <strong>species</strong> of interest</li>
<li>Enter a list of gene identifiers (or probe ids) for the genes of interest, separated by
spaces, tabs or newlines.</li>
<li>By default profiles are normalized against the most expressed gene in each profile (recommended). The checkbox allow you to disable this feature.</li>
<li>Click <strong>Show profiles</strong></li>
</ul>
</div>
</div>
</div>
</div>
{% endif %}
</div>
{% endblock %}
{% block extrajs %}
<script src="{{ url_for('static', filename='js/Chart.min.js') }}"></script>
{% if profiles %}
<script>
$(function () {
var data = {{ profiles|safe }};
var ctx = document.getElementById("chart-line").getContext("2d");
var myChart = new Chart(ctx, data);
});
</script>
{% endif %}
{% if example and example.probes %}
<script>
$(function() {
$('#load_example').click(function (ev) {
ev.preventDefault();
{% for key, value in example.items() %}
$('#{{key}}').val("{{value}}");
{% endfor %}
});
});
</script>
{% endif %}
{% endblock %}