Commit 93afa8d8 authored by Jerome Mariette's avatar Jerome Mariette
Browse files

No commit message

No commit message
parent 6cc5a09e
......@@ -23,7 +23,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
<div class="analysis">
<h2>Analysis {$analyse.name} :</h2>
<p><strong>{$analyse.description}</strong> <br />
<br />
All data related to this analysis use <strong> {$analyse_size} </strong> on the hard drive.
</p>
</div>
......
......@@ -163,5 +163,79 @@ $(function () {
}
});
$(".length-btn").click(function() {
if ($(":checked[id^=chk_sample_]").size() == 0) {
$("#user_information_dialog").dialog("option", "title", "Error");
$("#user_information_dialog").html("<div class='tx-nG6-pi1-error'>No raw selected, please select a raw to access this fonctionality.</div>").dialog("open");
var buttons = {};
buttons["Ok"] = function(){ $(this).dialog("close"); }
$("#user_information_dialog").dialog('option', 'buttons', buttons);
} else if ($(":checked[id^=chk_sample_]").size() > 1) {
$("#user_information_dialog").dialog("option", "title", "Error");
$("#user_information_dialog").html("<div class='tx-nG6-pi1-error'>Only 1 raw should be selected to access this fonctionality.</div>").dialog("open");
var buttons = {};
buttons["Ok"] = function(){ $(this).dialog("close"); }
$("#user_information_dialog").dialog('option', 'buttons', buttons);
} else {
$("#img_dialog").dialog("option", "title", "nG6 - " + $("#analyse_name").val());
$("#img_dialog").dialog("option", "width", 850);
$("#img_dialog").dialog("option", "height", 450);
$("#img_dialog").html('<div id="highcharts_container"></div>').dialog("open");
var index = 0;
$(":checked[id^=chk_sample_]").each(function() {
index = $(this).attr("id").split("_")[2];
});
var sample = $("#sample_name_"+index).html(),
parseInt10 = function(val) { return parseInt(val,10) },
categories = $("#length_x_"+index).val().split(",").map(parseInt10),
series = new Array({data: $("#length_y_"+index).val().split(",").map(parseInt10)});
chart = new Highcharts.Chart({
chart: {
renderTo: 'highcharts_container',
type: 'column'
},
title: {
text: 'Contigs length distribution'
},
credits: { enabled: false },
xAxis: {
categories: categories,
title: {
text: 'Contigs length'
},
labels: {
rotation: -45,
align: 'right'
}
},
yAxis: {
min: 0,
title: {
text: 'Number of contigs'
}
},
legend: { enabled: false },
tooltip: {
formatter: function() {
if (this.y > 1) {
return this.y +' contigs';
} else {
return this.y +' contig';
}
}
},
plotOptions: {
column: {
pointPadding: 0.2,
borderWidth: 0
}
},
series: series
});
}
});
});
......@@ -24,7 +24,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
<div class="analysis">
<h2>Analysis {$analyse.name} :</h2>
<p><strong>{$analyse.description}</strong> <br />
<br />
All data related to this analysis use <strong> {$analyse_size} </strong> on the hard drive.
</p>
</div>
......@@ -303,10 +302,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
</div>
{/if}
{assign var="has_depth_js_graph" value=false}
{assign var="has_js_graph" value=false}
{foreach from=$analyse_results_sorted key=sample item=sample_results}
{if $sample_results["aceDepth"].depthpng_x AND $sample_results["aceDepth"].depthpng_y}
{assign var="has_depth_js_graph" value=true}
{assign var="has_js_graph" value=true}
{/if}
{/foreach}
<div class="tab-pane fade" id="ace">
......@@ -315,15 +314,19 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
<table id="ace-table" class="display">
<thead>
<tr>
{if $has_depth_js_graph}
{if $has_js_graph}
<th rowspan="2"><center><input type="checkbox" id="chk_all_sample"></center></th>
{/if}
{if $analyse_results|@count > 1 }
<th rowspan="2">Samples ({$analyse_results|@count})</th>
<th rowspan="2">Number of contigs</th>
<th rowspan="2">Reads</th>
{if $has_js_graph}
<th colspan="4">Length</th>
{else}
<th colspan="5">Length</th>
{if $has_depth_js_graph}
{/if}
{if $has_js_graph}
<th colspan="4">Depth</th>
{else}
<th colspan="5">Depth</th>
......@@ -340,14 +343,14 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
<th>Max</th>
<th>Median</th>
<th>Mean</th>
{if $analyse_results|@count > 1 }
{if $analyse_results|@count > 1 AND !$has_js_graph}
<th></th>
{/if}
<th>Min</th>
<th>Max</th>
<th>Median</th>
<th>Mean</th>
{if $analyse_results|@count > 1 AND !$has_depth_js_graph}
{if $analyse_results|@count > 1 AND !$has_js_graph}
<th></th>
{/if}
</tr>
......@@ -359,7 +362,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
{$nb_contigs=$nb_contigs+$sample_results["aceContigs"].nbcontigs}
{$nb_reads=$nb_reads+$sample_results["aceContigs"].nbreads}
<tr>
{if $has_depth_js_graph}
{if $has_js_graph}
<td><center> <input type="checkbox" id="chk_sample_{$i}" value="sample"></center></td>
{/if}
......@@ -372,9 +375,11 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
<td>{$sample_results["aceContigs"].maxlength|number_format:0:' ':' '}</td>
<td>{$sample_results["aceContigs"].medlength|number_format:0:' ':' '}</td>
<td>{$sample_results["aceContigs"].meanlength|number_format:0:' ':' '}</td>
{if $analyse_results|@count > 1 }
{if $analyse_results|@count > 1 AND $sample_results["aceContigs"].lengthpng}
<td><a class="imglink" href="{$sample_results["aceContigs"].lengthpng}"> len </a></td>
{/if}
<input type="hidden" id="length_x_{$i}" value="{$sample_results["aceContigs"].lengthpng_x}"/>
<input type="hidden" id="length_y_{$i}" value="{$sample_results["aceContigs"].lengthpng_y}"/>
<td>{$sample_results["aceDepth"].mindepth|number_format:0:' ':' '}</td>
<td>{$sample_results["aceDepth"].maxdepth|number_format:0:' ':' '}</td>
<td>{$sample_results["aceDepth"].meddepth|number_format:0:' ':' '}</td>
......@@ -391,7 +396,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
{if $analyse_results|@count > 1 }
<tfoot>
<tr class="tx-nG6-pi1-listrowlast">
{if $has_depth_js_graph}
{if $has_js_graph}
<td></td>
{/if}
<td>Total</td>
......@@ -401,17 +406,19 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
<td>/</td>
<td>/</td>
<td>/</td>
{if !$has_js_graph}
<td>/</td>
{/if}
<td>/</td>
<td>/</td>
<td>/</td>
<td>/</td>
{if !$has_depth_js_graph}
{if !$has_js_graph}
<td></td>
{/if}
</tr>
<tr class="tx-nG6-pi1-listrowlast">
{if $has_depth_js_graph}
{if $has_js_graph}
<td></td>
{/if}
<td>Mean</td>
......@@ -421,28 +428,30 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
<td>/</td>
<td>/</td>
<td>/</td>
{if !$has_js_graph}
<td>/</td>
{/if}
<td>/</td>
<td>/</td>
<td>/</td>
<td>/</td>
{if !$has_depth_js_graph}
{if !$has_js_graph}
<td></td>
{/if}
</tr>
{if $has_depth_js_graph}
{if $has_js_graph}
<tr>
<th align="left" colspan="13">
With selection : </button><button type="button" class="btn depth-btn"><span><span>Depth</span></span></button>
With selection : <button type="button" class="btn pill-l depth-btn"><span><span>Depth</span></span></button><button type="button" class="btn pill-r length-btn"><span><span>Length</span></span></button>
</th>
</tr>
{/if}
</tfoot>
{else if $has_depth_js_graph}
{else if $has_js_graph}
<tfoot>
<tr>
<th align="left" colspan="13">
With selection : </button><button type="button" class="btn depth-btn"><span><span>Depth</span></span></button>
With selection : <button type="button" class="btn pill-l depth-btn"><span><span>Depth</span></span></button><button type="button" class="btn pill-r length-btn"><span><span>Length</span></span></button>
</th>
</tr>
</tfoot>
......
......@@ -173,8 +173,8 @@ table.tx-nG6-pi1-listrow tr.tx-nG6-pi1-listrowlast{
border-bottom-left-radius:7px;
}
table.tx-nG6-pi1-listrow td { border-bottom: 1px solid #ddd; }
ul li.filelist { list-style: none; margin-left: 10px; padding-left: 17px; background: url(../img/ico-fleche.png) left 4px no-repeat; }
ul li.parameter { list-style: none; margin-left: 10px; padding-left: 17px; background: url(../img/ico-fleche.png) left 4px no-repeat; }
ul li.filelist { list-style: none; margin-left: -25px; padding-left: 17px; background: url(../img/ico-fleche.png) left 4px no-repeat; }
ul li.parameter { list-style: none; margin-left: -25px; padding-left: 17px; background: url(../img/ico-fleche.png) left 4px no-repeat; }
.tx-nG6-pi1-hidden { color:#9a9a9a; }
.tx-nG6-pi1-hidden a { color:#aacbfb; }
.tx-nG6-pi1-help {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment