Mercurial > repos > jankanis > blast2html
diff blast2html.html.jinja @ 53:4217bb9cf1d3
depend on python 3; fix internal links with multiple iterations
author | Jan Kanis <jan.code@jankanis.nl> |
---|---|
date | Mon, 26 May 2014 13:07:13 +0200 |
parents | 3bb5da68305e |
children | 19c48f2ec775 |
line wrap: on
line diff
--- a/blast2html.html.jinja Wed May 21 18:39:51 2014 +0200 +++ b/blast2html.html.jinja Mon May 26 13:07:13 2014 +0200 @@ -126,7 +126,7 @@ max-width: 50em; text-align: left; height: 2.8em; - overflow-y: hidden; + overflow: hidden; } div.legend { @@ -400,7 +400,7 @@ <h1>Queries</h1> {% for result in blast.BlastOutput_iterations.Iteration %} - <div class=indexentry><a href="#match{{result['Iteration_iter-num']}}"> + <div class=indexentry><a href="#match{{result|nodeid}}"> {% set hits = result|hits %} {{result['Iteration_query-ID']}}: {{result['Iteration_query-def']}} ({{result|len}} letters, {{hits|length}} hits) @@ -412,7 +412,7 @@ {% for result in blast.BlastOutput_iterations.Iteration %} - <section class=match id=match{{result['Iteration_iter-num']}}> + <section class=match id=match{{result|nodeid}}> <h1>Nucleotide Sequence ({{result|len}} letters)</h1> @@ -444,7 +444,7 @@ <div class=grey> <h3 class=centered>Distribution of {{result|length}} Blast Hits on the Query Sequence</h3> - <div class=defline id=defline{{result['Iteration_iter-num']}}> + <div class=defline id=defline{{result|nodeid}}> Mouse-over to show defline and scores, click to show alignments </div> @@ -482,9 +482,9 @@ {% for line in result|match_colors %} <a class=matchresult - href="{{line.link}}" - onmouseover='document.getElementById("defline{{result['Iteration_iter-num']}}").innerHTML="{{line.defline|js_string_escape}}"' - onmouseout='document.getElementById("defline{{result['Iteration_iter-num']}}").innerHTML="Mouse-over to show defline and scores, click to show alignments"' + href="#hit{{line.hit|nodeid}}" + onmouseover='document.getElementById("defline{{result|nodeid}}").innerHTML="{{line.defline|js_string_escape}}"' + onmouseout='document.getElementById("defline{{result|nodeid}}").innerHTML="Mouse-over to show defline and scores, click to show alignments"' title="{{line.defline}}"> <div class="matchrow graphicrow"> {% for hit in line.colors %} @@ -521,9 +521,9 @@ </tr> {% for hit in result|hit_info %} <tr> - <td><div><a href="#hit{{hit.link_id}}" + <td><div><a href="#hit{{hit.hit|nodeid}}" title="{{hit.title}}" - id="description{{hit.link_id}}"> + id="description{{hit.hit|nodeid}}"> {{hit.title}} </a></div></td> <td>{{hit.maxscore}}</td> @@ -546,10 +546,10 @@ <div class=grey><div class=white> {% for hit in hits %} - <div class=alignment id=hit{{hit.Hit_num}}> + <div class=alignment id=hit{{hit|nodeid}}> <div class=linkheader> - <div class=right><a href="#description{{hit.Hit_num}}">Descriptions</a></div> + <div class=right><a href="#description{{hit|nodeid}}">Descriptions</a></div> <a class=linkheader href="{{genelink(hit|hitid)}}">GenBank</a> <a class=linkheader href="{{genelink(hit|hitid, 'graph')}}">Graphics</a> </div> @@ -564,11 +564,11 @@ </div> {% if hit|othertitles|length %} - <a class=showmoretitles onclick="toggle_visibility('moretitles{{hit.Hit_num|js_string_escape}}'); return false;" href=''> + <a class=showmoretitles onclick="toggle_visibility('moretitles{{hit|nodeid|js_string_escape}}'); return false;" href=''> See {{hit|othertitles|length}} more title(s) </a> - <div class=moretitles id=moretitles{{hit.Hit_num}} style="display: none"> + <div class=moretitles id=moretitles{{hit|nodeid}} style="display: none"> {% for title in hit|othertitles %} <div class=title> <p class=hittitle>{{title.title}}</p> @@ -581,7 +581,7 @@ {% endif %} {% for hsp in hit.Hit_hsps.Hsp %} - <div class=hotspot> + <div class=hotspot id=hotspot{{hsp|nodeid}}> <p class=range> <span class=range>Range {{hsp.Hsp_num}}: {{hsp['Hsp_hit-from']}} to {{hsp['Hsp_hit-to']}}</span> <a class=range href="{{genelink(hit|hitid, 'genbank', hsp)}}">GenBank</a>