Commit 7e1e62f0 authored by Jerome Mariette's avatar Jerome Mariette
Browse files

No commit message

No commit message
parent 0e3436da
......@@ -31,8 +31,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
</div>
{/block}
{block name=content}
<div class="sub-content sc-bottom">
{block name=content}
<ul id="myTab" class="nav nav-tabs">
<li class="active"><a href="#results" data-toggle="tab">{block name=results_title} Results {/block}</a></li>
{if $analyse.params != ""}
......@@ -78,8 +78,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
{/block}
</div>
</div>
{/block}
</div>
{/block}
{* Modal initialization *}
{* Global tmpl *}
......
......@@ -27,9 +27,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
</ul>
{/block}
{block name=results_title} Alpha diversity {/block}
{block name=results}
<input type="hidden" id="analyse_name" value="{$analyse.name}"/>
{block name=content}
{* First find out all levels used *}
{assign var="levels" value=array()}
{foreach from=$analyse_results key=sample item=sample_results}
......@@ -64,89 +63,131 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
<input type="hidden" id="tre_jclass_{$group|replace:".":"_"}" value="{$analyse_results["all"][$group].tre_jclass}"/>
{/foreach}
{/if}
<input type="hidden" id="analyse_name" value="{$analyse.name}"/>
<ul id="myTab" class="nav nav-tabs">
<li class="active"><a href="#alpha" data-toggle="tab">Alpha diversity</a></li>
{if $tree_avail}
<li class="active"><a href="#beta" data-toggle="tab">Alpha diversity</a></li>
{/if}
<li><a href="#parameters" data-toggle="tab">Parameters</a></li>
<li><a href="#downloads" data-toggle="tab">{block name=downloads_title} Downloads {/block}</a></li>
</ul>
<table class="table table-striped table-bordered dataTable analysis-result-table">
<thead>
<tr>
<th rowspan=2><center><input type="checkbox" id="chk_all_sample"></center></th>
{if $analyse_results|@count > 1 }
<th rowspan=2>Samples ({$analyse_results|@count})</th>
{$beta_done=true}
{/if}
<th rowspan=2>Number of sequences</th>
{foreach $levels as $group}
<th colspan={$estimators|@count}> {$group} </th>
{/foreach}
</tr>
<tr>
{foreach $levels as $group}
<th>OTUs</th>
{foreach $estimators as $estimator}
{if $estimator != "sobs"}
<th>{$estimator}</th>
<div id="myTabContent" class="tab-content">
<div class="tab-pane fade in active" id="alpha">
<table class="table table-striped table-bordered dataTable analysis-result-table">
<thead>
<tr>
<th rowspan=2><center><input type="checkbox" id="chk_all_sample"></center></th>
{if $analyse_results|@count > 1 }
<th rowspan=2>Samples ({$analyse_results|@count})</th>
{$beta_done=true}
{/if}
{/foreach}
{/foreach}
</tr>
</thead>
<tbody>
{assign var="analyse_results_sorted" value=$analyse_results|@ksort}
{assign var="i" value=0}
{foreach from=$analyse_results_sorted key=sample item=sample_results}
{if $sample != "all"}
<tr>
<td><center>
<input type="checkbox" id="chk_sample_{$i}" value="sample">
<th rowspan=2>Number of sequences</th>
{foreach $levels as $group}
<th colspan={$estimators|@count}> {$group} </th>
{/foreach}
</tr>
<tr>
{foreach $levels as $group}
<input type="hidden" id="rarefaction_curve_x_{$i}_{$group|replace:".":"_"}" value="{$sample_results[$group].rarefaction_x}"/>
<input type="hidden" id="rarefaction_curve_y_{$i}_{$group|replace:".":"_"}" value="{$sample_results[$group].rarefaction_y}"/>
{if $sample_results[$group].otus != "" }
<input type="hidden" id="otus_{$i}_{$group|replace:".":"_"}" value="{$sample_results[$group].otus}"/>
{/if}
<th>OTUs</th>
{foreach $estimators as $estimator}
{if $estimator != "sobs"}
<th>{$estimator}</th>
{/if}
{/foreach}
{/foreach}
</center></td>
{if $analyse_results|@count > 1 }
<td id="sample_id_{$i}">{$sample|get_description:$descriptions}</td>
</tr>
</thead>
<tbody>
{assign var="analyse_results_sorted" value=$analyse_results|@ksort}
{assign var="i" value=0}
{foreach from=$analyse_results_sorted key=sample item=sample_results}
{if $sample != "all"}
<tr>
<td><center>
<input type="checkbox" id="chk_sample_{$i}" value="sample">
{foreach $levels as $group}
<input type="hidden" id="rarefaction_curve_x_{$i}_{$group|replace:".":"_"}" value="{$sample_results[$group].rarefaction_x}"/>
<input type="hidden" id="rarefaction_curve_y_{$i}_{$group|replace:".":"_"}" value="{$sample_results[$group].rarefaction_y}"/>
{if $sample_results[$group].otus != "" }
<input type="hidden" id="otus_{$i}_{$group|replace:".":"_"}" value="{$sample_results[$group].otus}"/>
{/if}
{/foreach}
</center></td>
{if $analyse_results|@count > 1 }
<td id="sample_id_{$i}">{$sample|get_description:$descriptions}</td>
{/if}
<td>{$sample_results["default"]["nb_seq"]|number_format:0:' ':' '}</td>
{foreach $levels as $group}
<td><center>{$sample_results[$group]["sobs"]|number_format:0:' ':' '}</center></td>
{foreach $estimators as $estimator}
{if $estimator != "sobs"}
{assign var="display_value" value=";"|explode:$sample_results[$group][$estimator]}
{if $display_value|@count == 3 }
<td nowrap="nowrap"><center>{$display_value[0]|number_format:2:'.':' '} <br /> ({$display_value[1]|number_format:2:'.':' '}:{$display_value[2]|number_format:2:'.':' '})</center></td>
{else}
<td nowrap="nowrap"><center>{$sample_results[$group][$estimator]|number_format:2:'.':' '}</center></td>
{/if}
{/if}
{/foreach}
{/foreach}
</tr>
{$i = $i +1}
{/if}
<td>{$sample_results["default"]["nb_seq"]|number_format:0:' ':' '}</td>
{foreach $levels as $group}
<td><center>{$sample_results[$group]["sobs"]|number_format:0:' ':' '}</center></td>
{foreach $estimators as $estimator}
{if $estimator != "sobs"}
{assign var="display_value" value=";"|explode:$sample_results[$group][$estimator]}
{if $display_value|@count == 3 }
<td nowrap="nowrap"><center>{$display_value[0]|number_format:2:'.':' '} <br /> ({$display_value[1]|number_format:2:'.':' '}:{$display_value[2]|number_format:2:'.':' '})</center></td>
{else}
<td nowrap="nowrap"><center>{$sample_results[$group][$estimator]|number_format:2:'.':' '}</center></td>
{/if}
{/foreach}
</tbody>
<tfoot>
<tr>
<th align="left" colspan="10">
With selection :
{if $beta_done}
<button type="button" class="btn btn-small rarefaction-line-view-btn single-selection-btn"><i class=" icon-signal"></i> Rarefaction curves</button>
<button type="button" class="btn btn-small venn-view-btn multiple-selection-btn"><i class=" icon-search"></i> Venn diagram</button>
{else}
<button type="button" class="btn btn-small rarefaction-line-view-btn single-selection-btn"><i class=" icon-signal"></i> Rarefaction curves</button>
{/if}
</th>
</tr>
</tfoot>
</table>
</div>
{if $tree_avail}
<div class="tab-pane fade in active" id="beta">
<div id="svgCanvas"></div>
</div>
{/if}
<div class="tab-pane fade" id="parameters">
{block name=params}
{block name=params_content}
<ul>
<li class="parameter">{$analyse.params}</li>
</ul>
{/block}
{/block}
</div>
<div class="tab-pane fade" id="downloads">
{block name=download}
{if $nb_files != 0}
<p><ul>
{$dir=$data_folder|cat:$analyse.directory}
{assign var="nb_files" value=0}
{foreach $dir|scandir as $file}
{if $file != "." and $file != "" and $file != ".." and ($file|substr:-strlen(".png")) != ".png"}
{$link=(('fileadmin'|cat:$analyse.directory)|cat:'/')|cat:$file}
<li class="filelist"><a href="{$link}">{$file}</a> </li>
{$nb_files = $nb_files + 1}
{/if}
{/foreach}
{/foreach}
</tr>
{$i = $i +1}
{/if}
{/foreach}
</tbody>
<tfoot>
<tr>
<th align="left" colspan="10">
With selection :
{if $beta_done}
<button type="button" class="btn btn-small rarefaction-line-view-btn single-selection-btn"><i class=" icon-signal"></i> Rarefaction curves</button>
<button type="button" class="btn btn-small venn-view-btn multiple-selection-btn"><i class=" icon-search"></i> Venn diagram</button>
{else}
<button type="button" class="btn btn-small rarefaction-line-view-btn single-selection-btn"><i class=" icon-signal"></i> Rarefaction curves</button>
{/if}
</th>
</tr>
</tfoot>
</table>
{if $tree_avail}
<h3> Beta diversity analysis results </h3>
<div class="underline"> </div>
<br />
<div id="svgCanvas"></div>
{/if}
</ul></p>
{else}
<div class="alert alert-info">
Results folder not synchronized yet...
</div>
{/if}
{/block}
</div>
</div>
{/block}
\ No newline at end of file
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