[% # FOREACH row IN vep_data; '<pre>'; row; '</pre>'; END %]
[% # PROCESS dumper.tt dump = params %]
[% # PROCESS dumper.tt dump = results.samples %]
[% # PROCESS dumper.tt dump = results.errors %]
[% # PROCESS dumper.tt dump = results.counts %]
[% # PROCESS dumper.tt dump = results.exon_ref %]
[% # PROCESS dumper.tt dump = results.vep_data %]
[% # PROCESS dumper.tt dump = natural_sort([1,3,'d','a']) %]
<div class="container">
<p>
<a href="#results">vep results [[% results.vep_data.size || 0 %]]</a> ::
<a href="#failures">sample match failures [[% results.counts.no_match || 0 %]]</a> ::
<a href="#non-cds">non-CDS [[% results.non_cds.size || 0 %]]</a> ::
<a href="/vep">new dataset</a>
</p>
<h5>
[% total = results.counts.accepted; duration = results.runtime; %]
Processed [% total || 0 %] accepted rows in [% duration | format('%.2f') %]
seconds ([% total / duration | format('%.1f') %]/sec)
</h5>
[% IF results.errors.size %]
<div class="alert alert-error">VEP returned the following info:
<ul>
[% FOREACH e IN results.errors %]
<li>[% e %]</li>
[% END %]
</ul>
</div>
[% END %]
[% data_src = params.data_src; matches = results.counts.matches || 0 %]
<h2>Sample results for data src "[% data_src %]" [[% matches %]]</h2>
[% BLOCK vep_count;
'VEP entry count - reflecting variants in nucleotide position in CDS '
_ '& amino acid position in protein, or in sift/polyphen scores'; END;
%]
<table class="table table-hover table-condensed">
<thead>
<tr>
<td></td>
<th>HMDS ref</th>
<th>Exon / Allele</th>
<th><span class="acronym" title="[% INCLUDE vep_count %]">VEP</span></th>
<th>Result</th>
<th>Consequence</th>
[% IF params.sift %]<th>SIFT</th>[% END %]
[% IF params.polyphen %]<th>PolyPhen</th>[% END %]
<th>Existing variation</th>
</tr>
</thead>
[% i = 0 %]
[% FOREACH lab_number IN nsort_labno(results.samples.match.keys);
# PROCESS dumper.tt dump = pair;
location_data = results.samples.match.item(lab_number);
# PROCESS dumper.tt dump = location_data;
FOREACH pair IN location_data; # PROCESS dumper.tt dump = pair;
location = pair.key; # PROCESS dumper.tt dump = location;
result = pair.value; # PROCESS dumper.tt dump = result;
vep_data = results.exon_ref.item(location); # PROCESS dumper.tt dump = vep_data;
FOREACH entry IN result; # PROCESS dumper.tt dump = entry;
%]
<tr>
<td align="right">[% i = i + 1; i; # loop-within-loop %]</td>
<td>[% entry.lab_no %]</td>
<td><a href="#[% vep_data.exon_id.replace(' ', '_') %]">
[% vep_data.exon_id %]</a>
</td>
<td>[% entry.vep_row_count %]</td>
<td>[% entry.result %]% of [% entry.read %]</td>
<td>[% vep_data.consequence %]</td>
[% IF params.sift; class = vep_data.sift.match('deleterious')
? 'highlight' : 'normal' %]
<td class="[% class %]">[% vep_data.sift %]</td>
[% END %]
[% IF params.polyphen; class = vep_data.polyphen.match('damaging')
? 'highlight' : 'normal' %]
<td class="[% class %]">[% vep_data.polyphen %]</td>
[% END %]
<td>
[% IF vep_data.existing.length > 30 %]
<span class="acronym" title="[% vep_data.existing | html %]">
[% vep_data.existing | truncate(30) | html %]
</span>
[% ELSE; vep_data.existing; END %]
</td>
</tr>
[% END; END; END %]
</table>
<h2><a name="failures">
Sample match failures [[% results.counts.no_match || 0 %]]</a>
</h2>
<table class="table table-hover table-condensed">
<thead>
<tr>
<td></td>
<th>HMDS ref</th>
<th>Exon / Allele</th>
<th><span class="acronym" title="[% INCLUDE vep_count %]">VEP</span></th>
<th>Consequence</th>
<th>Existing</th>
<th>Other</th>
</tr>
</thead>
[% i = 0 %]
[% FOREACH lab_number IN nsort_labno(results.samples.no_match.keys);
# PROCESS dumper.tt dump = pair;
location_data = results.samples.no_match.item(lab_number);
# PROCESS dumper.tt dump = location_data;
FOREACH pair IN location_data; # PROCESS dumper.tt dump = entry;
location = pair.key; # PROCESS dumper.tt dump = location;
result = pair.value; # PROCESS dumper.tt dump = result;
vep_data = results.exon_ref.item(location); # PROCESS dumper.tt dump = vep;
FOREACH entry IN result; # PROCESS dumper.tt dump = entry;
%]
<tr>
<td align="right">[% i = i + 1; i; # loop-within-loop %]</td>
<td>[% entry.lab_no %]</td>
<td><a href="#[% vep_data.exon_id.replace(' ', '_') %]">
[% vep_data.exon_id %]</a>
</td>
<td>[% entry.vep_row_count %]</td>
<td>[% vep_data.consequence %]</td>
<td>[% vep_data.existing %]</td>
<td>
[% 'non-CDS' IF ( NOT vep_data.consequence AND
NOT vep_data.existing ) %]
</td>
</tr>
[% END; END; END %]
</table>
<h2><a name="results">VEP results [[% results.vep_data.size %]]</a></h2>
<table class="table table-hover table-condensed">
<thead>
<tr>
<th></th>
<th>ID</th>
<th>Chr.</th>
<th>Start</th>
<th>End</th>
<th>Allele</th>
<th>Consequence</th>
<th>CDS</th>
<th>Protein</th>
<th>AA</th>
<th>Existing variation</th>
[%# sift & poly order dependant on VEP::_prediction_and_score() %]
[% IF params.sift %]<th>SIFT</th>[% END %]
[% IF params.polyphen %]<th>PolyPhen</th>[% END %]
<th>Extra</th>
</tr>
</thead>
[% FOREACH row IN results.vep_data %]
<tr>
<td align="right"><a name="[% row.0.replace(' ', '_') %]">
[% loop.count %]</a>
</td>
[% FOREACH col IN row %]
<td>[% col | html %]</td>
[% END %]
</tr>
[% END %]
</table>
<h2><a name="non-cds">Non-CDS VEP results [[% results.non_cds.size %]]</a></h2>
<table class="table table-hover table-condensed">
<thead>
<tr>
<th></th>
<th>ID</th>
<th>Chr.</th>
<th>Start</th>
<th>End</th>
<th>Allele</th>
</tr>
</thead>
[% FOREACH row IN results.non_cds %]
<tr>
<td align="right"><a name="[% row.exon_id.replace(' ', '_') %]">
[% loop.count %]</a>
</td>
<td>[% row.exon_id %]</td>
<td>[% row.chromosome %]</td>
<td>[% row.start_point %]</td>
<td>[% row.end_point %]</td>
<td>[% row.allele %]</td>
</tr>
[% END %]
</table>
</div>