Commit e8318912 authored by maxime mano's avatar maxime mano
Browse files

Run with barcode visualisation, part 1 before migration to git

parent 78b07f36
......@@ -48,11 +48,12 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
{block name=results_title} Reports {/block}
{block name=results}
{assign var="analyse_results_sorted" value=$analyse_results|@ksort}
{assign var="analyse_results_sorted" value=$analyse_results["ONT_sample"]|@ksort}
{assign var="metrics" value=$analyse_results["metrics"]}
{assign var="basic" value=$analyse_results["ONT_sample"].basic}
{assign var="quality" value=$analyse_results["ONT_sample"].quality}
{assign var="plots" value=$analyse_results["ONT_sample"].plots}
{assign var="plots_barcode" value=$analyse_results["ONT_sample"].plots_barcode}
{assign var='basic_headers' value=','|explode:$metrics['basic'].headers}
{assign var='basic_count' value=$basic_headers|@count}
......@@ -61,11 +62,16 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
{assign var='quality_count' value=$quality_headers|@count}
{assign var='plots_headers' value=','|explode:$metrics['plots'].headers}
{assign var='plots_count' value=$quality_headers|@count}
{assign var='plots_count' value=$plots_headers|@count}
{assign var='plots_barcode_headers' value=','|explode:$metrics['plots_barcode'].headers}
{assign var='plots_barcode_count' value=$plots_barcode_headers|@count}
{assign var='barcode_headers' value=','|explode:$metrics['barcode'].headers|@ksort}
{assign var='barcode_headers_count' value=$barcode_headers|@count}
{assign var='barcode_name_sample' value=','|explode:$metrics['barcode'].names|@ksort}
{assign var='barcode_name_count' value=$barcode_name_sample|@count}
{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}
{*debug*}
<div>
<legend>Analyse results report - Sample name : {$descriptions.sample_1}</legend>
......@@ -129,30 +135,62 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
</tr>
{$data_col = $data_col + 1}
{/foreach}
{if $barcode_name_count > 1 }
{foreach from=$plots_barcode_headers key=k item=head}
<tr>
<td><label>{$head}</label></td>
<td><a class="imglink" href="{$plots_barcode.$head}" ><i class="glyphicon glyphicon-picture"></i></a></td>
</tr>
{$data_col = $data_col + 1}
{/foreach}
{/if}
</tbody>
</table>
</div>
{/if}
</div>
</div>
{*If there are barcodes file in the run*}
{if $barcode_results_count > 1 }
{if $barcode_name_count > 1 }
<table id="rs_subreads_datatable" class="table table-striped table-bordered dataTable analysis-result-table">
<table id="ont_stats_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=$barcode_name_sample|@count}
{assign var="nb_samples" value=$barcode_name_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 SubReads results (Before filters)</center></th>
<th colspan="{$barcode_headers_count}"><center>Barcode ONT results</center></th>
</tr>
<tr>
{assign var="th_id" value=2}
{foreach from=$barcode_headers key=k item=head}
{if $head == 'Reads'}
<th class = "numeric-sort" id="th_id_{$th_id}">NB SubReads</th>
{elseif $head == 'Bases'}
<th class = "numeric-sort" id="th_id_{$th_id}">NB Bases</th>
{if $head == 'total_bases'}
<th class = "numeric-sort" id="th_id_{$th_id}">Total bases</th>
{elseif $head == 'nb_reads'}
<th class = "numeric-sort" id="th_id_{$th_id}">Nb reads</th>
{elseif $head == 'median_read_length'}
<th class = "numeric-sort" id="th_id_{$th_id}">Median read length</th>
{elseif $head == 'median_read_quality'}
<th class = "numeric-sort" id="th_id_{$th_id}">Median read quality</th>
{elseif $head == 'N50_read_length'}
<th class = "numeric-sort" id="th_id_{$th_id}">N50 read length</th>
{elseif $head == 'L50_read_length'}
<th class = "numeric-sort" id="th_id_{$th_id}">L50 read length</th>
{elseif $head == 'barcode_score'}
<th class = "numeric-sort" id="th_id_{$th_id}">Barcode score</th>
{elseif $head == 'nb_read_Q>10'}
<th class = "numeric-sort" id="th_id_{$th_id}">Nb reads Q>10</th>
{elseif $head == 'total_bases_Q>10'}
<th class = "numeric-sort" id="th_id_{$th_id}">Total bases Q>10</th>
{elseif $head == 'median_yield_per_sec'}
<th class = "numeric-sort" id="th_id_{$th_id}">Median yield per sec</th>
{elseif $head == 'nb_actif_channel'}
<th class = "numeric-sort" id="th_id_{$th_id}">Nb actif channel</th>
{/if}
{$th_id = $th_id +1}
{/foreach}
......@@ -162,50 +200,59 @@ 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")}
{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">
<div class="col-md-2 col-lg-2">
<h4>Barcode SubReads results (Before filters)</h4>
<ul class="list-unstyled">
{foreach from=$analyse_results_sorted key=sample item=sample_results}
{if $sample|in_array:$barcode_name_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}
<span class="checkbox"><label><input type="checkbox" data-column="{$data_col}" class="toogle-vis" checked/> {$head}</label></span>
{$data_col = $data_col + 1}
{if $head == 'total_bases'}
<th class = "numeric-sort" id="th_id_{$th_id}">{($sample_results.$head)|number_format:0:',':' '}</th>
{elseif $head == 'nb_reads'}
<th class = "numeric-sort" id="th_id_{$th_id}">{($sample_results.$head)|number_format:0:',':' '}</th>
{elseif $head == 'median_read_length'}
<th class = "numeric-sort" id="th_id_{$th_id}">{($sample_results.$head)|number_format:0:',':' '}</th>
{elseif $head == 'median_read_quality'}
<th class = "numeric-sort" id="th_id_{$th_id}">{($sample_results.$head)|number_format:1:',':' '}</th>
{elseif $head == 'N50_read_length'}
<th class = "numeric-sort" id="th_id_{$th_id}">{($sample_results.$head)|number_format:0:',':' '}</th>
{elseif $head == 'L50_read_length'}
<th class = "numeric-sort" id="th_id_{$th_id}">{($sample_results.$head)|number_format:0:',':' '}</th>
{elseif $head == 'barcode_score'}
<th class = "numeric-sort" id="th_id_{$th_id}">{($sample_results.$head)|number_format:1:',':' '}</th>
{elseif $head == 'nb_read_Q>10'}
<th class = "numeric-sort" id="th_id_{$th_id}">{($sample_results.$head)|number_format:0:',':' '}</th>
{elseif $head == 'total_bases_Q>10'}
<th class = "numeric-sort" id="th_id_{$th_id}">{($sample_results.$head)|number_format:0:',':' '}</th>
{elseif $head == 'median_yield_per_sec'}
<th class = "numeric-sort" id="th_id_{$th_id}">{($sample_results.$head)|number_format:0:',':' '}</th>
{elseif $head == 'nb_actif_channel'}
<th class = "numeric-sort" id="th_id_{$th_id}">{($sample_results.$head)|number_format:0:',':' '}</th>
{/if}
{$th_id = $th_id +1}
{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}
</ul>
</div>
</div>
</div>
*}
</tr>
{$i = $i + 1}
{/if}
{/foreach}
</tbody>
<tfoot>
<tr>
<tr>
<th>Total : </th>
<th>&nbsp;</th>
{foreach from=$barcode_headers key=k item=head}
......@@ -247,6 +294,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
{/if}
<div class="tx-nG6-pi1-help">
<img src="" alt="" class="img" />
<p>Help for Basic metrics report :</p>
......@@ -311,6 +362,17 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
<li><strong>outrm_lengthvsqscore_density</strong> :
The length and qscore distribution of reads with density for this Flow Cell.
</li>
{if $barcode_name_count > 1 }
<li><strong>qscoreboxplot</strong> :
Boxplots for each barcode of the mean qscore of reads for this Flow Cell.
</li>
<li><strong>qscorepertimeintervalsboxplot</strong> :
Boxplots for each barcode of the mean qscore of reads per interval of time for this Flow Cell.
</li>
<li><strong>qscorevariation</strong> :
Variation per time for each barcode of the mean qscore of reads for this Flow Cell.
</li>
{/if}
</ul>
</span>
</div>
......
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