Commit c7af6f74 authored by Claire Kuchly's avatar Claire Kuchly
Browse files

debug : PacBio_sample with multiple sample

parent 1adf555b
......@@ -18,8 +18,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
{extends file='AnalysisTemplate.tpl'}
{block name=results_title} Reports {/block}
{block name=results}
{block name=results}
{assign var="analyse_results_sorted" value=$analyse_results|@ksort}
{assign var="metrics" value=$analyse_results["metrics"]}
{assign var="metrics2" value=$analyse_results["metrics2"]}
......@@ -36,7 +35,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
{assign var='barcode_headers' value=','|explode:$metrics2['barcode_results'].headers|@ksort}
{assign var='barcode_results_count' value=$barcode_headers|@count}
{assign var='barcode_name_sample' value=','|explode:$metrics2['barcode_results'].barcode_sample|@ksort}
<div>
......@@ -47,18 +46,22 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
<div class="col-md-3 col-lg-3">
<h4>Loading report</h4>
<ul class="list-unstyled">
{foreach from=$analyse_results_sorted key=sample item=results_sample}
{if $sample != "metrics" and $sample != "metrics2"}
{foreach from=$loading_headers key=k item=head}
<li>
<div>
{if ($head == 'Productivity 0') or ($head == 'Productivity 1') or ($head == 'Productivity 2')}
<label>{$head} : </label> {($analyse_results_sorted['Pacbio_sample']['loading'].$head*100)|number_format:2:',':' '}%
<label>{$head} : </label> {($results_sample['loading'].$head*100)|number_format:2:',':' '}%
{else}
<label>{$head} : </label> {($analyse_results_sorted['Pacbio_sample']['loading'].$head*100)|number_format:0:',':' '}
<label>{$head} : </label> {($results_sample['loading'].$head*100)|number_format:0:',':' '}
{/if}
</div>
</li>
{$data_col = $data_col + 1}
{/foreach}
{/if}
{/foreach}
</ul>
</div>
{/if}
......@@ -66,38 +69,47 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
<div class="col-md-4 col-lg-4">
<h4>Polymerase reads Stats</h4>
<ul class="list-unstyled">
{foreach from=$analyse_results_sorted key=sample item=results_sample}
{if $sample != "metrics" and $sample != "metrics2"}
{foreach from=$postfilter_headers key=k item=head}
<li>
<div>
{if ($head == 'readlen' || $head == 'readscore')}
<label>{$head} : </label> <a class="imglink" href="{$analyse_results_sorted['Pacbio_sample']['postfilter_stats'].$head}" >pic</a>
{else}
<label>{$head} : </label> {($analyse_results_sorted['Pacbio_sample']['postfilter_stats'].$head*100)|number_format:0:',':' '}
{/if}
</div>
</li>
{$data_col = $data_col + 1}
{/foreach}
</ul>
</div>
{if ($head == 'readlen' || $head == 'readscore')}
<label>{$head} : </label> <a class="imglink" href="{$results_sample['postfilter_stats'].$head}" >pic</a>
{else}
<label>{$head} : </label> {($results_sample['postfilter_stats'].$head*100)|number_format:0:',':' '}
{/if}
</div>
</li>
{$data_col = $data_col + 1}
{/foreach}
{/if}
{/foreach}
</ul>
</div>
{/if}
{if $metrics['subreads_stats']}
<div class="col-md-4 col-lg-4">
<h4>Subreads Filter Stats</h4>
<ul class="list-unstyled">
{foreach from=$subreads_headers key=k item=head}
<li>
<div>
{if $head == 'report' }
<label>{$head} : </label> <a class="imglink" href="{$analyse_results_sorted['Pacbio_sample']['subreads_stats'].$head}" >pic</a>
{else}
<label>{$head} : </label> {($analyse_results_sorted['Pacbio_sample']['subreads_stats'].$head*100)|number_format:0:',':' '}
{/if}
</div>
</li>
{$data_col = $data_col + 1}
{/foreach}
</ul>
{foreach from=$analyse_results_sorted key=sample item=results_sample}
{if $sample != "metrics" and $sample != "metrics2"}
{foreach from=$subreads_headers key=k item=head}
<li>
<div>
{if $head == 'report' }
<label>{$head} : </label> <a class="imglink" href="{$results_sample['subreads_stats'].$head}" >pic</a>
{else}
<label>{$head} : </label> {($results_sample['subreads_stats'].$head*100)|number_format:0:',':' '}
{/if}
</div>
</li>
{$data_col = $data_col + 1}
{/foreach}
{/if}
{/foreach}
</ul>
</div>
{/if}
</div>
......@@ -120,13 +132,13 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
*}
{*If there are barcodes file in the run*}
{if $barcode_results_count > 1 }
{if $barcode_name_sample > 1 }
<table id="rs_subreads_datatable" 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>
{assign var="nb_samples" value=$analyse_results|@count - 3 }
{assign var="nb_samples" value=$barcode_name_sample|@count}
<th class="string-sort" rowspan="2" id="th_id_1"><center>Sample {if $nb_samples > 1 }({$nb_samples}){/if}</center></th>
<th colspan="{$barcode_results_count}"><center>Barcode results (Before filters)</center></th>
</tr>
......@@ -146,29 +158,31 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
{$i = 1}
{assign var="totalReads" value=0}
{assign var="totalBases" value=0}
{foreach from=$analyse_results_sorted key=sample item=sample_results}
{if ($sample!="metrics2") and ($sample!="metrics") and ($sample!="Pacbio_sample")}
<tr>
<td><center><input type="checkbox" id="chk_sample_{$i}" value="sample"/></center></td>
<td id='sample_{$i}_col_1' class="sample_name">{$sample}</td>
{$col_id = 2}
{foreach from=$barcode_headers key=k item=head}
{if $head == 'Reads'}
<td id="sample_{$i}_col_{$col_id}">{$sample_results['barcode_results'].$head|number_format:0:',':' '}</td>
{$totalReads = $totalReads + $sample_results['barcode_results'].$head}
{elseif $head == 'Bases'}
<td id="sample_{$i}_col_{$col_id}">{$sample_results['barcode_results'].$head|number_format:0:',':' '}</td>
{$totalBases = $totalBases + $sample_results['barcode_results'].$head}
{/if}
{$col_id = $col_id + 1}
{/foreach}
</tr>
{$i = $i + 1}
{/if}
{/foreach}
{foreach from=$analyse_results_sorted key=sample item=sample_results}
{if ($sample!="metrics2") and ($sample!="metrics")}
{foreach from=$barcode_name_sample item=sample}
<tr>
<td><center><input type="checkbox" id="chk_sample_{$i}" value="sample"/></center></td>
<td id='sample_{$i}_col_1' class="sample_name">{$sample}</td>
{$col_id = 2}
{foreach from=$barcode_headers key=k item=head}
{if $head == 'Reads'}
<td id="sample_{$i}_col_{$col_id}">{$sample_results[$sample].$head|number_format:0:',':' '}</td>
{$totalReads = $totalReads + $sample_results[$sample].$head}
{elseif $head == 'Bases'}
<td id="sample_{$i}_col_{$col_id}">{$sample_results[$sample].$head|number_format:0:',':' '}</td>
{$totalBases = $totalBases + $sample_results[$sample].$head}
{/if}
{$col_id = $col_id + 1}
{/foreach}
</tr>
{$i = $i + 1}
{/foreach}
{/if}
{/foreach}
<div>
{$data_col = 2}
<div class="row">
......@@ -291,6 +305,5 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
</span>
</div>
{/block}
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