Commit c9a58da7 authored by Celine Noirot's avatar Celine Noirot
Browse files

Correct handling of 2 versions

parent c3471ccf
......@@ -47,14 +47,14 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
{if substr_count($analyse.params, 'rrbs')}
{$is_rrbs=true}
{/if}
{if 'totalPairs'|array_key_exists:$firstelt["default"] }
{$is_old_version=true}
{if $analyse_results[key($analyse_results)]["default"]["totalPairs"] }
{$is_old_version=true}
{/if}
<table class="table table-striped table-bordered dataTable analysis-result-table">
<thead>
<tr>
<th>Samples {if $analyse_results|@count > 1 }({$analyse_results|@count}){/if}</th>
{if $is_old_version}
{if $is_old_version==1}
<th class="numeric-sort" >Number of pairs</th>
<th class="numeric-sort" >Number of remaining pairs</th>
<th class="numeric-sort" >% of removed pairs</th>
......@@ -84,7 +84,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
{assign var="trimmed_reads" value=0}
{foreach from=$analyse_results_sorted key=sample item=sample_results}
{if $is_old_version}
{$totalPairs=$totalPairs+$sample_results["default"].totalPairs}
{$total_reads=$total_reads+$sample_results["default"].totalPairs}
{$trimmed_reads=$trimmed_reads+$sample_results["default"].pairsRemoved}
{else}
{$total_reads=$total_reads+$sample_results["default"].total_reads}
......@@ -93,7 +93,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
<tr>
<td>{$sample|get_description:$descriptions}</td>
{if $is_old_version}
<td>{$sample|get_description:$descriptions}</td>
<td>{$sample_results["default"].totalPairs|number_format:0:' ':' '}</td>
<td>{($sample_results["default"].totalPairs - $sample_results["default"].pairsRemoved)|number_format:0:' ':' '}</td>
<td>{round(($sample_results["default"].pairsRemoved/$sample_results["default"].totalPairs)*100,2)}</td>
......@@ -132,10 +131,13 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
<th>Total</th>
<th>{$total_reads|number_format:0:' ':' '}</th>
<th>{($total_reads - $trimmed_reads)|number_format:0:' ':' '}</th>
{if ! $is_old_version}
<th></th>
<th></th>
<th></th>
<th></th>
{/if}
{if $is_paired }
<th></th>
{/if}
......@@ -144,10 +146,13 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
<th>Mean</th>
<th>{($total_reads/($analyse_results|@count))|number_format:0:' ':' '}</th>
<th>{(($total_reads - $trimmed_reads)/($analyse_results|@count))|number_format:0:' ':' '}</th>
<th></th>
<th></th>
<th></th>
<th></th>
{if ! $is_old_version}
<th></th>
<th></th>
<th></th>
<th></th>
{/if}
{if $is_paired }
<th></th>
{/if}
......
Supports Markdown
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