Commit 1c3e6fc5 authored by Penom Nom's avatar Penom Nom
Browse files

The component UsearchChimera becomes an analysis.

parent 19341adb
{*
Copyright (C) 2014 INRA
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*}
{extends file='AnalysisTemplate.tpl'}
{block name=params_title} Parameters {/block}
{block name=params_content}
{assign var="params" value=" "|explode:$analyse.params}
<ul>
{if in_array("-uchime_denovo", $params)}
<li class="parameter">Abundance is used to distinguish chimeras from parents (-uchime_denovo).</li>
{/if}
</ul>
{/block}
{block name=results_title} Cleaning results {/block}
{block name=results}
<table class="table table-striped table-bordered dataTable analysis-result-table">
<thead>
<tr>
{if $analyse_results|@count > 1 }
<th class="string-sort">Samples ({$analyse_results|@count})</th>
{/if}
<th class="numeric-sort">Before filtering</th>
<th class="numeric-sort">After filtering</th>
<th class="numeric-sort">Chimeras</th>
<th class="numeric-sort">% deleted</th>
</tr>
</thead>
{assign var="nb_reads_begining" value=0}
{assign var="nb_reads_end" value=0}
{assign var="filtered" value=0}
{assign var="analyse_results_sorted" value=$analyse_results|@ksort}
<tbody>
{foreach from=$analyse_results_sorted key=sample item=sample_results}
<tr>
{if $analyse_results|@count > 1 }
<td>{$sample|get_description:$descriptions}</td>
{/if}
{$nb_reads_sample=$nb_reads_begining+$sample_results["default"].nb_non_chimeras+$sample_results["default"].nb_chimeras}
{$nb_reads_begining=$nb_reads_begining+$nb_reads_sample}
{$nb_reads_end=$nb_reads_end+$sample_results["default"].nb_non_chimeras}
{$filtered=$filtered+$sample_results["default"].nb_chimeras}
<td>{$nb_reads_sample|number_format:0:' ':' '}</td>
<td>{$sample_results["default"].nb_non_chimeras|number_format:0:' ':' '}</td>
<td>{$sample_results["default"].nb_chimeras|number_format:0:' ':' '}</td>
<td>{(($sample_results["default"].nb_chimeras/$nb_reads_sample)*100.00)|number_format:2:'.':' '}</td>
</tr>
{/foreach}
</tbody>
{if $analyse_results|@count > 1 }
<tfoot>
<tr>
<th>Total</th>
<th>{$nb_reads_begining|number_format:0:' ':' '}</th>
<th>{$nb_reads_end|number_format:0:' ':' '}</th>
<th>{$filtered|number_format:0:' ':' '}</th>
<th>{(100.00-((($nb_reads_end)*100)/$nb_reads_begining))|number_format:2:'.':' '}</th>
</tr>
<tr>
<th>Mean</th>
<th>{($nb_reads_begining/($analyse_results|@count))|number_format:0:' ':' '}</th>
<th>{($nb_reads_end/($analyse_results|@count))|number_format:0:' ':' '}</th>
<th>{($filtered/($analyse_results|@count))|number_format:0:' ':' '}</th>
<th>{(100.00-((($nb_reads_end)*100)/$nb_reads_begining))|number_format:2:'.':' '}</th>
</tr>
</tfoot>
{/if}
</table>
{/block}
\ No newline at end of file
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