Mercurial > repos > jankanis > blast2html
comparison 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 |
comparison
equal
deleted
inserted
replaced
52:d6c7b5de2833 | 53:4217bb9cf1d3 |
---|---|
124 padding-left: .2em; | 124 padding-left: .2em; |
125 padding-right: .2em; | 125 padding-right: .2em; |
126 max-width: 50em; | 126 max-width: 50em; |
127 text-align: left; | 127 text-align: left; |
128 height: 2.8em; | 128 height: 2.8em; |
129 overflow-y: hidden; | 129 overflow: hidden; |
130 } | 130 } |
131 | 131 |
132 div.legend { | 132 div.legend { |
133 max-width: 40em; | 133 max-width: 40em; |
134 } | 134 } |
398 {% if blast.BlastOutput_iterations.findall('Iteration') | length > 1 %} | 398 {% if blast.BlastOutput_iterations.findall('Iteration') | length > 1 %} |
399 <section class=index> | 399 <section class=index> |
400 <h1>Queries</h1> | 400 <h1>Queries</h1> |
401 | 401 |
402 {% for result in blast.BlastOutput_iterations.Iteration %} | 402 {% for result in blast.BlastOutput_iterations.Iteration %} |
403 <div class=indexentry><a href="#match{{result['Iteration_iter-num']}}"> | 403 <div class=indexentry><a href="#match{{result|nodeid}}"> |
404 {% set hits = result|hits %} | 404 {% set hits = result|hits %} |
405 {{result['Iteration_query-ID']}}: {{result['Iteration_query-def']}} | 405 {{result['Iteration_query-ID']}}: {{result['Iteration_query-def']}} |
406 ({{result|len}} letters, {{hits|length}} hits) | 406 ({{result|len}} letters, {{hits|length}} hits) |
407 </a></div> | 407 </a></div> |
408 {% endfor %} | 408 {% endfor %} |
410 </section> | 410 </section> |
411 {% endif %} | 411 {% endif %} |
412 | 412 |
413 {% for result in blast.BlastOutput_iterations.Iteration %} | 413 {% for result in blast.BlastOutput_iterations.Iteration %} |
414 | 414 |
415 <section class=match id=match{{result['Iteration_iter-num']}}> | 415 <section class=match id=match{{result|nodeid}}> |
416 | 416 |
417 <h1>Nucleotide Sequence ({{result|len}} letters)</h1> | 417 <h1>Nucleotide Sequence ({{result|len}} letters)</h1> |
418 | 418 |
419 <section class=header> | 419 <section class=header> |
420 | 420 |
442 <h2>Graphic Summary</h2> | 442 <h2>Graphic Summary</h2> |
443 | 443 |
444 <div class=grey> | 444 <div class=grey> |
445 <h3 class=centered>Distribution of {{result|length}} Blast Hits on the Query Sequence</h3> | 445 <h3 class=centered>Distribution of {{result|length}} Blast Hits on the Query Sequence</h3> |
446 | 446 |
447 <div class=defline id=defline{{result['Iteration_iter-num']}}> | 447 <div class=defline id=defline{{result|nodeid}}> |
448 Mouse-over to show defline and scores, click to show alignments | 448 Mouse-over to show defline and scores, click to show alignments |
449 </div> | 449 </div> |
450 | 450 |
451 <div class=graphic> | 451 <div class=graphic> |
452 <h4 class=darkHeader>Color key for alignment scores</h4> | 452 <h4 class=darkHeader>Color key for alignment scores</h4> |
480 <div style="clear: left"></div> | 480 <div style="clear: left"></div> |
481 </div> | 481 </div> |
482 | 482 |
483 {% for line in result|match_colors %} | 483 {% for line in result|match_colors %} |
484 <a class=matchresult | 484 <a class=matchresult |
485 href="{{line.link}}" | 485 href="#hit{{line.hit|nodeid}}" |
486 onmouseover='document.getElementById("defline{{result['Iteration_iter-num']}}").innerHTML="{{line.defline|js_string_escape}}"' | 486 onmouseover='document.getElementById("defline{{result|nodeid}}").innerHTML="{{line.defline|js_string_escape}}"' |
487 onmouseout='document.getElementById("defline{{result['Iteration_iter-num']}}").innerHTML="Mouse-over to show defline and scores, click to show alignments"' | 487 onmouseout='document.getElementById("defline{{result|nodeid}}").innerHTML="Mouse-over to show defline and scores, click to show alignments"' |
488 title="{{line.defline}}"> | 488 title="{{line.defline}}"> |
489 <div class="matchrow graphicrow"> | 489 <div class="matchrow graphicrow"> |
490 {% for hit in line.colors %} | 490 {% for hit in line.colors %} |
491 <div class="matchitem graphicitem" | 491 <div class="matchitem graphicitem" |
492 style="background-color: {{hit[1]}}; width: {{hit[0]}}%"></div> | 492 style="background-color: {{hit[1]}}; width: {{hit[0]}}%"></div> |
519 <th>Ident</th> | 519 <th>Ident</th> |
520 <th>Accession</th> | 520 <th>Accession</th> |
521 </tr> | 521 </tr> |
522 {% for hit in result|hit_info %} | 522 {% for hit in result|hit_info %} |
523 <tr> | 523 <tr> |
524 <td><div><a href="#hit{{hit.link_id}}" | 524 <td><div><a href="#hit{{hit.hit|nodeid}}" |
525 title="{{hit.title}}" | 525 title="{{hit.title}}" |
526 id="description{{hit.link_id}}"> | 526 id="description{{hit.hit|nodeid}}"> |
527 {{hit.title}} | 527 {{hit.title}} |
528 </a></div></td> | 528 </a></div></td> |
529 <td>{{hit.maxscore}}</td> | 529 <td>{{hit.maxscore}}</td> |
530 <td>{{hit.totalscore}}</td> | 530 <td>{{hit.totalscore}}</td> |
531 <td>{{hit.cover}}</td> | 531 <td>{{hit.cover}}</td> |
544 <section class=alignments> | 544 <section class=alignments> |
545 <h2>Alignments</h2> | 545 <h2>Alignments</h2> |
546 | 546 |
547 <div class=grey><div class=white> | 547 <div class=grey><div class=white> |
548 {% for hit in hits %} | 548 {% for hit in hits %} |
549 <div class=alignment id=hit{{hit.Hit_num}}> | 549 <div class=alignment id=hit{{hit|nodeid}}> |
550 | 550 |
551 <div class=linkheader> | 551 <div class=linkheader> |
552 <div class=right><a href="#description{{hit.Hit_num}}">Descriptions</a></div> | 552 <div class=right><a href="#description{{hit|nodeid}}">Descriptions</a></div> |
553 <a class=linkheader href="{{genelink(hit|hitid)}}">GenBank</a> | 553 <a class=linkheader href="{{genelink(hit|hitid)}}">GenBank</a> |
554 <a class=linkheader href="{{genelink(hit|hitid, 'graph')}}">Graphics</a> | 554 <a class=linkheader href="{{genelink(hit|hitid, 'graph')}}">Graphics</a> |
555 </div> | 555 </div> |
556 | 556 |
557 <div class=title> | 557 <div class=title> |
562 <span class=b>Number of Matches:</span> {{hit.Hit_hsps.Hsp|length}} | 562 <span class=b>Number of Matches:</span> {{hit.Hit_hsps.Hsp|length}} |
563 </p> | 563 </p> |
564 </div> | 564 </div> |
565 | 565 |
566 {% if hit|othertitles|length %} | 566 {% if hit|othertitles|length %} |
567 <a class=showmoretitles onclick="toggle_visibility('moretitles{{hit.Hit_num|js_string_escape}}'); return false;" href=''> | 567 <a class=showmoretitles onclick="toggle_visibility('moretitles{{hit|nodeid|js_string_escape}}'); return false;" href=''> |
568 See {{hit|othertitles|length}} more title(s) | 568 See {{hit|othertitles|length}} more title(s) |
569 </a> | 569 </a> |
570 | 570 |
571 <div class=moretitles id=moretitles{{hit.Hit_num}} style="display: none"> | 571 <div class=moretitles id=moretitles{{hit|nodeid}} style="display: none"> |
572 {% for title in hit|othertitles %} | 572 {% for title in hit|othertitles %} |
573 <div class=title> | 573 <div class=title> |
574 <p class=hittitle>{{title.title}}</p> | 574 <p class=hittitle>{{title.title}}</p> |
575 <p class=titleinfo> | 575 <p class=titleinfo> |
576 <span class=b>Sequence ID:</span> <a href="{{genelink(title.hitid)}}">{{title.id}}</a> | 576 <span class=b>Sequence ID:</span> <a href="{{genelink(title.hitid)}}">{{title.id}}</a> |
579 {% endfor %} | 579 {% endfor %} |
580 </div> | 580 </div> |
581 {% endif %} | 581 {% endif %} |
582 | 582 |
583 {% for hsp in hit.Hit_hsps.Hsp %} | 583 {% for hsp in hit.Hit_hsps.Hsp %} |
584 <div class=hotspot> | 584 <div class=hotspot id=hotspot{{hsp|nodeid}}> |
585 <p class=range> | 585 <p class=range> |
586 <span class=range>Range {{hsp.Hsp_num}}: {{hsp['Hsp_hit-from']}} to {{hsp['Hsp_hit-to']}}</span> | 586 <span class=range>Range {{hsp.Hsp_num}}: {{hsp['Hsp_hit-from']}} to {{hsp['Hsp_hit-to']}}</span> |
587 <a class=range href="{{genelink(hit|hitid, 'genbank', hsp)}}">GenBank</a> | 587 <a class=range href="{{genelink(hit|hitid, 'genbank', hsp)}}">GenBank</a> |
588 <a class=range href="{{genelink(hit|hitid, 'graph', hsp)}}">Graphics</a> | 588 <a class=range href="{{genelink(hit|hitid, 'graph', hsp)}}">Graphics</a> |
589 </p> | 589 </p> |