[% # FOREACH row IN vep_data; '<pre>'; row; '</pre>'; END %]
[% # PROCESS dumper.tt dump = params %]
[% # PROCESS dumper.tt dump = results.samples.match %]
[% # PROCESS dumper.tt dump = results.exon_ref %]
[% # 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.samples.no_match.size || 0 %]]</a> ::
<a href="#orphans">ophans [[% results.orphans.size || 0 %]]</a> ::
<a href="/vep">new dataset</a>
</p>
<h5>
[% total = results.row_count; duration = results.runtime; %]
Processed [% total || 0 %] accepted rows in [% duration | format('%.2f') %]
seconds ([% total / duration | format('%.1f') %]/sec)
</h5>
<h2>Sample results [[% results.samples.match.size %] samples]</h2>
<table>
<thead>
<tr>
<th>HMDS ref</th>
<th>Exon</th>
<th>Result</th>
<th>Consequence</th>
<th>Existing</th>
<th>SIFT</th>
<th>PolyPhen</th>
</tr>
</thead>
[% 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 = 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;
%]
<tr>
<td>[% result.hmds_ref %]</td>
<td>[% vep_data.exon.replace('%%', ' ') %]</td>
<td>[% result.result %]% of [% result.read %]</td>
<td>[% vep_data.consequence %]</td>
<td>[% vep_data.existing %]</td>
<td>[% vep_data.sift %]</td>
<td>[% vep_data.polyphen %]</td>
</tr>
[% END; END %]
</table>
<h2><a name="failures">Sample match failures [[% results.samples.no_match.size %] samples]</a></h2>
<table>
<thead>
<tr>
<th>HMDS ref</th>
<th>Exon</th>
<th>Consequence</th>
<th>Existing</th>
<th>Other</th>
</tr>
</thead>
[% 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;
%]
<tr>
<td>[% result.hmds_ref %]</td>
<td>[% vep_data.exon.replace('%%', ' ') %]</td>
<td>[% vep_data.consequence %]</td>
<td>[% vep_data.existing %]</td>
<td>
[% '? orphan' IF ( NOT vep_data.consequence AND
NOT vep_data.existing ) %]
</td>
</tr>
[% END; END %]
</table>
<h2><a name="results">VEP results [[% results.vep_data.size %]]</a></h2>
<table>
<thead>
<tr>
<th></th>
<th>ID</th>
<th>Chr.</th>
<th>Start</th>
<th>End</th>
<th>Allele</th>
<th>Consequence</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">[% loop.count %]</td>
[% FOREACH col IN row;
IF loop.first; # exon ID - prevent wrapping: %]
<td>[% col.replace('%%', ' ') %]</td>
[% ELSE %]<td>[% col | html %]</td>[% END %]
[% END %]
</tr>
[% END %]
</table>
<h2><a name="orphans">VEP orphans [[% results.orphans.size %]]</a></h2>
<table>
<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.orphans %]
<tr>
<td align="right">[% loop.count %]</td>
<td>[% row.exon.replace('%%', ' ') %]</td>
<td>[% row.chromosome %]</td>
<td>[% row.start_point %]</td>
<td>[% row.end_point %]</td>
<td>[% row.allele %]</td>
</tr>
[% END %]
</table>
</div>