Commit 9a4ccd3a authored by Penom Nom's avatar Penom Nom
Browse files

correction of charts. The pipeline has been modified to store required values...

correction of charts. The pipeline has been modified to store required values in the required format.
parent 46bbdfd6
This diff is collapsed.
......@@ -17,173 +17,86 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
{extends file='AnalysisTemplate.tpl'}
{block name=params_title} Parameters used {/block}
{block name=params_content}
{assign var=options value=" "|explode:$analyse.params}
<h5>Infer Experiment parameters</h5>
<ul>
<ul>
<li class="parameter">The maximum sample size was set to {$options[0]} reads.</li>
</ul>
</ul>
<h5>Inner Distance parameters</h5>
<ul>
<ul>
{if $options[11] != "" && $options[12] != ""}
<li class="parameter">The minimum size of inserts was set to {$options[11]} bp.</li>
<li class="parameter">The maximum size of inserts was set to {$options[12]} bp.</li>
{else}
<li class="parameter">This analysis was not done.</li>
{/if}
</ul>
</ul>
<h5>Junction Annotation parameters</h5>
{block name=params}
{assign var="params" value=" "|explode:$analyse.params}
<ul>
<ul>
<li class="parameter">The minimum size of introns was set to {$options[1]} bp.</li>
</ul>
</ul>
<h5>Junction Saturation parameters</h5>
<ul>
<ul>
<li class="parameter">Sampling percent step was set to {$options[2]} %.</li>
<li class="parameter">The minimum sampling percent was set to {$options[3]} %.</li>
<li class="parameter">The maximum sampling percent was set to {$options[4]} %.</li>
<li class="parameter">The minimum size of introns was set to {$options[5]} bp.</li>
<li class="parameter">The minimum number of reads covering one junction was set to {$options[6]} read(s).</li>
</ul>
</ul>
<h5>RPKM Saturation parameters</h5>
<ul>
<ul>
<li class="parameter">Sampling percent step was set to {$options[7]} %.</li>
<li class="parameter">The minimum sampling percent was set to {$options[8]} %.</li>
<li class="parameter">The maximum sampling percent was set to {$options[9]} %.</li>
{if $options[10] eq "none" || $options[10] eq ""}
<li class="parameter">There is no strand rules for those data.</li>
{else}
<li class="parameter">The strand rules are {$options[10]} for those data.</li>
{/if}
</ul>
<li>
{foreach from=$params key=k item=v}
{$v}
{/foreach}
</li>
</ul>
{/block}
{block name=content}
{block name=results_title} Reads and quality statistics {/block}
{block name=results}
<input type="hidden" id="analyse_name" value="{$analyse.name}"/>
<ul id="myTab" class="nav nav-tabs">
<li class="active"><a href="#qrnaseq" data-toggle="tab">Quality RNA-Seq</a></li>
<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>
<div id="myTabContent" class="tab-content">
<div class="tab-pane fade in active" id="qrnaseq">
<table class="table table-striped table-bordered dataTable analysis-result-table">
<thead>
<tr>
<th><center><input type="checkbox" id="chk_all_sample"></center></th>
{if $analyse_results|@count > 1 }
<th class = "string-sort">Samples ({$analyse_results|@count})</th>
{/if}
<th class = "numeric-sort">Total number of reads </th>
<th class = "numeric-sort">Splicing reads found </th>
<th class = "numeric-sort">Novel junctions </th>
<th class = "numeric-sort">Known junctions </th>
</tr>
</thead>
<tbody>
{assign var="analyse_results_sorted" value=$analyse_results|@ksort}
{assign var=options value=" "|explode:$analyse.params}
{assign var="i" value=0}
{foreach from=$analyse_results_sorted key=sample item=sample_results}
<tr>
<td><center>
<input type="checkbox" id="chk_sample_{$i}" value="sample">
<input type="hidden" id="orient_{$i}" value="{$sample_results['default'].reads_orientation}">
<input type="hidden" id="insert_sizes_{$i}" value="{$sample_results['default'].insert_sizes}">
<input type="hidden" id="frequence_{$i}" value="{$sample_results['default'].frequence}">
<input type="hidden" id="junctions_{$i}" value="{$sample_results['default'].junctions}">
<input type="hidden" id="events_{$i}" value="{$sample_results['default'].events}">
<input type="hidden" id="all_junctions_{$i}" value="{$sample_results['default'].all_junctions}">
<input type="hidden" id="known_junctions_{$i}" value="{$sample_results['default'].known_junctions}">
<input type="hidden" id="novel_junctions_{$i}" value="{$sample_results['default'].novel_junctions}">
<input type="hidden" id="step_sampling_{$i}" value="{$options[2]}">
<input type="hidden" id="min_sampling_{$i}" value="{$options[3]}">
<input type="hidden" id="max_sampling_{$i}" value="{$options[4]}">
<input type="hidden" id="count_{$i}" value="{$sample_results['default'].count}">
{foreach from=$sample_results['default'] key=rpkm_key item=rpkm_data}
{assign var="key" value=$rpkm_key}
{assign var=ar_key value="_S"|explode:$key}
{if $rpkm_key|regex_replace:"/^Q[\w]+/":"Q" == "Q"}
<input type="hidden" quartile="{$ar_key[0]}_{$i}" percent_sample="{$ar_key[1]}" value="{$rpkm_data}">
{/if}
{/foreach}
</center></td>
{if $analyse_results|@count > 1 }
<td id="sample_id_{$i}">{$sample|get_description:$descriptions}</td>
<input type="hidden" id="sample_{$i}" value="{$sample|get_description:$descriptions}">
{/if}
{assign var="found_junc" value=","|explode:$sample_results["default"].found_junc}
<td>{$sample_results["default"].total_reads|number_format:0:' ':' '}</td>
<td>{$found_junc[0]|number_format:0:' ':' '}</td>
<td>{$sample_results["default"].novel_junc|number_format:0:' ':' '}</td>
<td>{$sample_results["default"].known_junc|number_format:0:' ':' '}</td>
</tr>
{$i = $i +1}
{/foreach}
</tbody>
<tfoot>
<tr>
<th align="left" colspan="10">
With selection :
<button type='button' class='btn btn-small infer-view-btn single-selection-btn' ><i class=" icon-signal"></i> Read orientations</button>
<button type='button' class='btn btn-small inn_dist-view-btn multiple-selection-btn' ><i class=" icon-signal"></i> Insert sizes</button>
<button type='button' class='btn btn-small junc_ann-view-btn single-selection-btn' ><i class=" icon-signal"></i> Junction Annotation</button>
<button type='button' class='btn btn-small junc_sat-view-btn single-selection-btn' ><i class=" icon-signal"></i> Junction Saturation</button>
<button type='button' class='btn btn-small gbc-view-btn multiple-selection-btn' ><i class=" icon-signal"></i> Gene Coverage</button>
<button type='button' class='btn btn-small rpkm_sat-view-btn multiple-selection-btn' ><i class=" icon-signal"></i> RPKM Saturation</button>
</th>
</tr>
</tfoot>
</table>
</div>
<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}
</ul></p>
{else}
<div class="alert alert-info">
Results folder not synchronized yet...
</div>
{/if}
{/block}
</div>
</div>
<table class="table table-striped table-bordered dataTable analysis-result-table">
<thead>
<tr>
<th><center><input type="checkbox" id="chk_all_sample"></center></th>
<th class = "string-sort">Samples ({$analyse_results|@count})</th>
<th class = "numeric-sort">Type</th>
<th class = "numeric-sort">GBC total reads</th>
<th class = "numeric-sort">Splicing reads found</th>
<th class = "numeric-sort">Novel junctions</th>
<th class = "numeric-sort">Known junctions</th>
</tr>
</thead>
<tbody>
{assign var="analyse_results_sorted" value=$analyse_results|@ksort}
{assign var=options value=" "|explode:$analyse.params}
{assign var="i" value=0}
{foreach from=$analyse_results_sorted key=sample item=sample_results}
<tr>
<td>
<center>
<input type="checkbox" id="chk_sample_{$i}" class="rseqc-data-check" >
<input type="hidden" id="reads_orientation_{$i}" value="{$sample_results['inferexp'].reads_orientation}">
<input type="hidden" id="inferexp_read_type_{$i}" value="{$sample_results['inferexp'].reads_type}">
<input type="hidden" id="inferexp_read_orientation_{$i}" value="{$sample_results['inferexp'].reads_orientation}">
<input type="hidden" id="innerdist_frequences_{$i}" value="{$sample_results['innerdist'].frequences}">
<input type="hidden" id="innerdist_insert_sizes_{$i}" value="{$sample_results['innerdist'].insert_sizes}">
<input type="hidden" id="juncannot_splicing_junctions_{$i}" value="{$sample_results['juncannot'].splicing_junctions}">
<input type="hidden" id="juncannot_splicing_events_{$i}" value="{$sample_results['juncannot'].splicing_events}">
<input type="hidden" id="juncsat_all_junctions_{$i}" value="{$sample_results['juncsat'].all_junctions}">
<input type="hidden" id="juncsat_known_junctions_{$i}" value="{$sample_results['juncsat'].known_junctions}">
<input type="hidden" id="juncsat_novel_junctions_{$i}" value="{$sample_results['juncsat'].novel_junctions}">
<input type="hidden" id="gbc_count_{$i}" value="{$sample_results['gbc'].count}">
{foreach from=$sample_results['rpkm_saturation'] key=quartile item=data}
<input type="hidden" id="quartile_{$quartile}_{$i}" value='{$data}'/>
{/foreach}
</center>
</td>
<td id="sample_id_{$i}">{$sample|get_description:$descriptions}</td>
<input type="hidden" id="sample_{$i}" value="{$sample|get_description:$descriptions}">
<td>{$sample_results['inferexp'].reads_type}</td>
{assign var="novel_j" value=","|explode:$sample_results["juncsat"].novel_junctions}
{assign var="known_j" value=","|explode:$sample_results["juncsat"].known_junctions}
<td>{$sample_results["gbc"].total_reads|number_format:0:' ':' '}</td>
<td>{$sample_results["juncsat"].found_junc|number_format:0:' ':' '}</td>
<td>{$novel_j[19]|number_format:0:' ':' '}</td>
<td>{$known_j[19]|number_format:0:' ':' '}</td>
</tr>
{$i = $i +1}
{/foreach}
</tbody>
<tfoot>
<tr>
<th align="left" colspan="10">
With selection :
<button type='button' id="infer-view-btn" class='btn btn-small single-selection-btn' ><i class="icon-signal"></i> Read orientations</button>
<button type='button' id="inn_dist-view-btn" class='btn btn-small multiple-selection-btn' ><i class="icon-signal"></i> Inner distance</button>
<button type='button' id="junc_ann-view-btn" class='btn btn-small single-selection-btn' ><i class="icon-signal"></i> Junction Annotation</button>
<button type='button' id="junc_sat-view-btn" class='btn btn-small single-selection-btn' ><i class="icon-signal"></i> Junction Saturation</button>
<button type='button' id="gbc-view-btn" class='btn btn-small multiple-selection-btn' ><i class="icon-signal"></i> Gene Coverage</button>
<button type='button' id="rpkm_sat-view-btn" class='btn btn-small single-selection-btn' ><i class="icon-signal"></i> RPKM Saturation</button>
</th>
</tr>
</tfoot>
</table>
{/block}
\ No newline at end of file
{/block}
......@@ -139,4 +139,4 @@ class RnaSeqQualityCheck (NG6Workflow):
#Quality RNA Seq analysis
if self.args["annotation"] is not None:
rseqc = self.add_component("RSeQC", [tophat.accepted_hits, self.args["annotation"], is_paired_end], parent = tophat)
\ No newline at end of file
rseqc = self.add_component("RSeQC", [tophat.accepted_hits, self.args["annotation"]], parent = tophat)
\ 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