# HG changeset patch # User Jan Kanis # Date 1403190029 -7200 # Node ID 40ce2043006a884dcbb1c9ba2fd27c4374204dc6 # Parent 6ecbfebb9dd93d4a524581f36e8b9f92d31c0a21# Parent f1791df1478ccc6765bf063e51f345f7a41ec714 merge py2.6 branch diff -r 6ecbfebb9dd9 -r 40ce2043006a blast2html.html.jinja --- a/blast2html.html.jinja Wed Jun 18 14:33:12 2014 +0200 +++ b/blast2html.html.jinja Thu Jun 19 17:00:29 2014 +0200 @@ -1,3 +1,4 @@ +{# -*- coding: utf-8 -*- #} @@ -466,7 +467,7 @@
{% for s in result|queryscale %} -
+
{% if s.width > 3.0 %}
{{s.label}}
{% else %} @@ -489,7 +490,7 @@
{% for hit in line.colors %}
+ style="background-color: {{hit[1]}}; width: {{hit[0]|numfmt}}%">
{% endfor %}
@@ -596,9 +597,9 @@ {{hsp['Hsp_bit-score']|fmt('.1f')}} bits({{hsp.Hsp_score}}) {{hsp.Hsp_evalue|fmt('.1f')}} {{ hsp.Hsp_identity }}/{{ hsp|len }}({{ - (hsp.Hsp_identity/hsp|len) |fmt('.0%') }}) + ((hsp.Hsp_identity|float)/hsp|len) | fmt('.0%') }}) {{ hsp.Hsp_gaps }}/{{ hsp|len - }}({{ (hsp.Hsp_gaps / hsp|len) | fmt('.0%') }}) + }}({{ ((hsp.Hsp_gaps|float) / hsp|len) | fmt('.0%') }}) {{ hsp['Hsp_query-frame']|asframe }}/{{ hsp['Hsp_hit-frame']|asframe }} diff -r 6ecbfebb9dd9 -r 40ce2043006a blast2html.py --- a/blast2html.py Wed Jun 18 14:33:12 2014 +0200 +++ b/blast2html.py Thu Jun 19 17:00:29 2014 +0200 @@ -1,14 +1,18 @@ #!/usr/bin/env python3 # -*- coding: utf-8 -*- +# Actually this program works with both python 2 and 3, tested against python 2.6 + # Copyright The Hyve B.V. 2014 # License: GPL version 3 or (at your option) any higher version -from __future__ import unicode_literals +from __future__ import unicode_literals, division import sys import math import warnings +import six, codecs +from six.moves import builtins from os import path from itertools import repeat import argparse @@ -17,10 +21,10 @@ -_filters = {} +_filters = dict(float='float') def filter(func_or_name): "Decorator to register a function as filter in the current jinja environment" - if isinstance(func_or_name, str): + if isinstance(func_or_name, six.string_types): def inner(func): _filters[func_or_name] = func.__name__ return func @@ -46,6 +50,21 @@ return format(float(val), fmt) @filter +def numfmt(val): + """Format numbers in decimal notation, but without excessive trailing 0's. + Default python float formatting will use scientific notation for some values, + or append trailing zeros with the 'f' format type, and the number of digits differs + between python 2 and 3.""" + fpart, ipart = math.modf(val) + if fpart == 0: + return str(int(val)) + # round to 10 to get identical representations in python 2 and 3 + s = format(round(val, 10), '.10f').rstrip('0') + if s[-1] == '.': + s += '0' + return s + +@filter def firsttitle(hit): return hit.Hit_def.text.split('>')[0] @@ -100,10 +119,10 @@ hseq = hsp.Hsp_hseq.text if not qframe in (1, -1): - warnings.warn("Error in BlastXML input: Hsp node {} has a Hsp_query-frame of {}. (should be 1 or -1)".format(nodeid(hsp), qframe)) + warnings.warn("Error in BlastXML input: Hsp node {0} has a Hsp_query-frame of {1}. (should be 1 or -1)".format(nodeid(hsp), qframe)) qframe = -1 if qframe < 0 else 1 if not hframe in (1, -1): - warnings.warn("Error in BlastXML input: Hsp node {} has a Hsp_hit-frame of {}. (should be 1 or -1)".format(nodeid(hsp), hframe)) + warnings.warn("Error in BlastXML input: Hsp node {0} has a Hsp_hit-frame of {1}. (should be 1 or -1)".format(nodeid(hsp), hframe)) hframe = -1 if hframe < 0 else 1 def split(txt): @@ -111,16 +130,16 @@ for qs, mid, hs, offset in zip(split(qseq), split(midline), split(hseq), range(0, len(qseq), linewidth)): yield ( - "Query {:>7} {} {}\n".format(qfrom+offset*qframe, qs, qfrom+(offset+len(qs)-1)*qframe) + - " {:7} {}\n".format('', mid) + - "Subject{:>7} {} {}".format(hfrom+offset*hframe, hs, hfrom+(offset+len(hs)-1)*hframe) + "Query {0:>7} {1} {2}\n".format(qfrom+offset*qframe, qs, qfrom+(offset+len(qs)-1)*qframe) + + " {0:7} {1}\n".format('', mid) + + "Subject{0:>7} {1} {2}".format(hfrom+offset*hframe, hs, hfrom+(offset+len(hs)-1)*hframe) ) if qfrom+(len(qseq)-1)*qframe != qto: - warnings.warn("Error in BlastXML input: Hsp node {} qseq length mismatch: from {} to {} length {}".format( + warnings.warn("Error in BlastXML input: Hsp node {0} qseq length mismatch: from {1} to {2} length {3}".format( nodeid(hsp), qfrom, qto, len(qseq))) if hfrom+(len(hseq)-1)*hframe != hto: - warnings.warn("Error in BlastXML input: Hsp node {} hseq length mismatch: from {} to {} length {}".format( + warnings.warn("Error in BlastXML input: Hsp node {0} hseq length mismatch: from {1} to {2} length {3}".format( nodeid(hsp), hfrom, hto, len(hseq))) @@ -159,29 +178,30 @@ raise Exception("frame should be either +1 or -1") def genelink(hit, type='genbank', hsp=None): - if not isinstance(hit, str): + if not isinstance(hit, six.string_types): hit = hitid(hit) - link = "http://www.ncbi.nlm.nih.gov/nucleotide/{}?report={}&log$=nuclalign".format(hit, type) + link = "http://www.ncbi.nlm.nih.gov/nucleotide/{0}?report={1}&log$=nuclalign".format(hit, type) if hsp != None: - link += "&from={}&to={}".format(hsp['Hsp_hit-from'], hsp['Hsp_hit-to']) + link += "&from={0}&to={1}".format(hsp['Hsp_hit-from'], hsp['Hsp_hit-to']) return link # javascript escape filter based on Django's, from https://github.com/dsissitka/khan-website/blob/master/templatefilters.py#L112-139 # I've removed the html escapes, since html escaping is already being performed by the template engine. +# The r'\u0027' syntax doesn't work the way we need to in python 2.6 with unicode_literals _base_js_escapes = ( - ('\\', r'\u005C'), - ('\'', r'\u0027'), - ('"', r'\u0022'), - # ('>', r'\u003E'), - # ('<', r'\u003C'), - # ('&', r'\u0026'), - # ('=', r'\u003D'), - # ('-', r'\u002D'), - # (';', r'\u003B'), - # (u'\u2028', r'\u2028'), - # (u'\u2029', r'\u2029') + ('\\', '\\u005C'), + ('\'', '\\u0027'), + ('"', '\\u0022'), + # ('>', '\\u003E'), + # ('<', '\\u003C'), + # ('&', '\\u0026'), + # ('=', '\\u003D'), + # ('-', '\\u002D'), + # (';', '\\u003B'), + (u'\u2028', '\\u2028'), + (u'\u2029', '\\u2029') ) # Escape every ASCII character with a value less than 32. This is @@ -198,7 +218,7 @@ javascript snippets. """ - value = str(value) + value = six.text_type(value) for bad, good in _js_escapes: value = value.replace(bad, good) @@ -237,7 +257,10 @@ try: environment.filters[filtername] = getattr(self, funcname) except AttributeError: - environment.filters[filtername] = globals()[funcname] + try: + environment.filters[filtername] = globals()[funcname] + except KeyError: + environment.filters[filtername] = getattr(builtins, funcname) def render(self, output): template = self.environment.get_template(self.templatename) @@ -249,13 +272,14 @@ ('Database', self.blast.BlastOutput_db), ) - output.write(template.render(blast=self.blast, - iterations=self.blast.BlastOutput_iterations.Iteration, - colors=self.colors, - # match_colors=self.match_colors(), - # hit_info=self.hit_info(), - genelink=genelink, - params=params)) + result = template.render(blast=self.blast, + iterations=self.blast.BlastOutput_iterations.Iteration, + colors=self.colors, + genelink=genelink, + params=params) + if six.PY2: + result = result.encode('utf-8') + output.write(result) @filter def match_colors(self, result): @@ -320,21 +344,22 @@ return (float(hsp[path]) for hsp in hsps) yield dict(hit = hit, - title = firsttitle(hit), - maxscore = "{:.1f}".format(max(hsp_val('Hsp_bit-score'))), - totalscore = "{:.1f}".format(sum(hsp_val('Hsp_bit-score'))), - cover = "{:.0%}".format(cover_count / query_length), - e_value = "{:.4g}".format(min(hsp_val('Hsp_evalue'))), + title = firsttitle(hit), + maxscore = "{0:.1f}".format(max(hsp_val('Hsp_bit-score'))), + totalscore = "{0:.1f}".format(sum(hsp_val('Hsp_bit-score'))), + cover = "{0:.0%}".format(cover_count / query_length), + e_value = "{0:.4g}".format(min(hsp_val('Hsp_evalue'))), # FIXME: is this the correct formula vv? - ident = "{:.0%}".format(float(min(hsp.Hsp_identity / blastxml_len(hsp) for hsp in hsps))), + # float(...) because non-flooring division doesn't work with lxml elements in python 2.6 + ident = "{0:.0%}".format(float(min(float(hsp.Hsp_identity) / blastxml_len(hsp) for hsp in hsps))), accession = hit.Hit_accession) def main(): default_template = path.join(path.dirname(__file__), 'blast2html.html.jinja') - + parser = argparse.ArgumentParser(description="Convert a BLAST XML result into a nicely readable html page", - usage="{} [-i] INPUT [-o OUTPUT]".format(sys.argv[0])) + usage="{0} [-i] INPUT [-o OUTPUT]".format(sys.argv[0])) input_group = parser.add_mutually_exclusive_group(required=True) input_group.add_argument('positional_arg', metavar='INPUT', nargs='?', type=argparse.FileType(mode='r'), help='The input Blast XML file, same as -i/--input') diff -r 6ecbfebb9dd9 -r 40ce2043006a test-data/blast xml example1.html --- a/test-data/blast xml example1.html Wed Jun 18 14:33:12 2014 +0200 +++ b/test-data/blast xml example1.html Thu Jun 19 17:00:29 2014 +0200 @@ -468,7 +468,7 @@ title="Chain A, E. Coli 70s-fmetval-trnaval Post-translocation Complex (post4, 50s Subunit)">
+ style="background-color: black; width: 100%">
@@ -479,7 +479,7 @@ title="Chain A, E. Coli 70s-fmetval-trnaval-trnafmet Complex In Intermediate Post- Translocation State (post3b, 50s Subunit)">
+ style="background-color: black; width: 100%">
@@ -490,7 +490,7 @@ title="Chain A, E. Coli 70s-fmetval-trnaval-trnafmet Complex In Intermediate Post- Translocation State (post3a, 50s Subunit)">
+ style="background-color: black; width: 100%">
@@ -501,7 +501,7 @@ title="Chain A, E. Coli 70s-fmetval-trnaval-trnafmet Complex In Intermediate Post- Translocation State (post2b, 50s Subunit)">
+ style="background-color: black; width: 100%">
@@ -512,7 +512,7 @@ title="Chain A, E. Coli 70s-fmetval-trnaval-trnafmet Complex In Intermediate Post- Translocation State (post2a, 50s Subunit)">
+ style="background-color: black; width: 100%">
@@ -523,7 +523,7 @@ title="Chain A, E. Coli 70s-fmetval-trnaval-trnafmet Complex In Classic Post- Translocation State (post1, 50s Subunit)">
+ style="background-color: black; width: 100%">
@@ -534,7 +534,7 @@ title="Chain A, E. Coli 70s-fmetval-trnaval-trnafmet Complex In Hybrid Pre- Translocation State (pre5b, 50s Subunit)">
+ style="background-color: black; width: 100%">
@@ -545,7 +545,7 @@ title="Chain A, E. Coli 70s-fmetval-trnaval-trnafmet Complex In Hybrid Pre- Translocation State (pre5a, 50s Subunit)">
+ style="background-color: black; width: 100%">
@@ -556,7 +556,7 @@ title="Chain A, E. Coli 70s-fmetval-trnaval-trnafmet Complex In Hybrid Pre- Translocation State (pre4, 50s Subunit)">
+ style="background-color: black; width: 100%">
@@ -567,7 +567,7 @@ title="Chain A, E. Coli 70s-fmetval-trnaval-trnafmet Complex In Classic Pre- Translocation State (pre1a, 50s Subunit)">
+ style="background-color: black; width: 100%">
@@ -578,7 +578,7 @@ title="Chain A, E. Coli 70s-fmetval-trnaval-trnafmet Complex In Intermediate Pre- Translocation State (pre3, 50s Subunit)">
+ style="background-color: black; width: 100%">
@@ -589,7 +589,7 @@ title="Chain A, E. Coli 70s-fmetval-trnaval-trnafmet Complex In Intermediate Pre- Translocation State (pre2, 50s Subunit)">
+ style="background-color: black; width: 100%">
@@ -600,7 +600,7 @@ title="Chain A, E. Coli 70s-fmetval-trnaval-trnafmet Complex In Classic Pre- Translocation State (pre1b, 50s Subunit)">
+ style="background-color: black; width: 100%">
@@ -611,7 +611,7 @@ title="Chain A, Tetracycline Resistance Protein Tet(o) Bound To The Ribosome">
+ style="background-color: black; width: 100%">
@@ -622,7 +622,7 @@ title="Chain B, Structural Insights Into Cognate Vs. Near-Cognate Discrimination During Decoding. This Entry Contains The Large Subunit Of A Ribosome Programmed With A Near-Cognate Codon. ">
+ style="background-color: black; width: 100%">
@@ -633,7 +633,7 @@ title="Chain B, Ternary Complex-Bound E.Coli 70s Ribosome. This Entry Consists Of The 50s Subunit. ">
+ style="background-color: black; width: 100%">
@@ -644,7 +644,7 @@ title="Chain B, Structure Of The 50s Subunit Of E. Coli Ribosome In Pre-Accommodation State ">
+ style="background-color: black; width: 100%">
@@ -655,7 +655,7 @@ title="Chain 0, Structure Of The 50s Subunit Of A Secm-Stalled E. Coli Ribosome Complex Obtained By Fitting Atomic Models For Rna And Protein Components Into Cryo-Em Map Emd-1143">
+ style="background-color: black; width: 100%">
@@ -666,7 +666,7 @@ title="Chain 0, Structure Of The 50s Subunit Of A Pre-Translocational E. Coli Ribosome Obtained By Fitting Atomic Models For Rna And Protein Components Into Cryo-Em Map Emd-1056">
+ style="background-color: black; width: 100%">
@@ -677,7 +677,7 @@ title="Chain B, Crystal Structure Of Ribosome With Messenger Rna And The Anticodon Stem-Loop Of P-Site Trna. This File Contains The 50s Subunit Of One 70s Ribosome. The Entire Crystal Structure Contains Two 70s Ribosomes And Is Described In Remark 400.">
+ style="background-color: black; width: 100%">
@@ -688,7 +688,7 @@ title="Chain B, Crystal Structure Of The Bacterial Ribosome From Escherichia Coli At 3.5 A Resolution. This File Contains The 50s Subunit Of One 70s Ribosome. The Entire Crystal Structure Contains Two 70s Ribosomes And Is Described In Remark 400. ">
+ style="background-color: black; width: 100%">
@@ -699,7 +699,7 @@ title="Chain B, Crystal Structure Of The Bacterial Ribosome From Escherichia Coli At 3.5 A Resolution. This File Contains The 50s Subunit Of The Second 70s Ribosome. The Entire Crystal Structure Contains Two 70s Ribosomes And Is Described In Remark 400. ">
+ style="background-color: black; width: 100%">
@@ -710,7 +710,7 @@ title="Chain B, Crystal Structure Of The Bacterial Ribosome From Escherichia Coli In Complex With The Antibiotic Kasugamyin At 3.5a Resolution. This File Contains The 50s Subunit Of One 70s Ribosome. The Entire Crystal Structure Contains Two 70s Ribosomes And Is Described In Remark 400. ">
+ style="background-color: black; width: 100%">
@@ -721,7 +721,7 @@ title="Chain 0, Real Space Refined Coordinates Of The 50s Subunit Fitted Into The Low Resolution Cryo-Em Map Of The Ef-G.Gtp State Of E. Coli 70s Ribosome ">
+ style="background-color: black; width: 100%">
@@ -827,7 +827,7 @@
+ style="background-color: black; width: 75%">
@@ -840,7 +840,7 @@ title="Chain 5, Structure Of The H. Sapiens 60s Rrna">
+ style="background-color: black; width: 100%">
@@ -851,7 +851,7 @@ title="Chain 5, Structure Of The D. Melanogaster 60s Rrna">
+ style="background-color: black; width: 100%">
@@ -879,7 +879,7 @@
+ style="background-color: transparent; width: 25%"> @@ -892,7 +892,7 @@
+ style="background-color: black; width: 75%">
@@ -933,7 +933,7 @@
+ style="background-color: black; width: 75%">
@@ -948,7 +948,7 @@
+ style="background-color: black; width: 75%">
@@ -963,7 +963,7 @@
+ style="background-color: black; width: 75%">
@@ -980,7 +980,7 @@
+ style="background-color: transparent; width: 25%"> @@ -995,7 +995,7 @@
+ style="background-color: transparent; width: 25%"> @@ -1088,7 +1088,7 @@
+ style="background-color: transparent; width: 25%"> @@ -1103,7 +1103,7 @@
+ style="background-color: transparent; width: 25%"> @@ -1118,7 +1118,7 @@
+ style="background-color: transparent; width: 25%"> @@ -1133,7 +1133,7 @@
+ style="background-color: transparent; width: 25%"> @@ -1146,7 +1146,7 @@
+ style="background-color: black; width: 75%">
@@ -1189,7 +1189,7 @@
+ style="background-color: transparent; width: 25%"> @@ -1204,7 +1204,7 @@
+ style="background-color: transparent; width: 25%"> @@ -1219,7 +1219,7 @@
+ style="background-color: transparent; width: 25%"> @@ -1232,7 +1232,7 @@
+ style="background-color: black; width: 75%">
@@ -1247,7 +1247,7 @@
+ style="background-color: black; width: 75%">
@@ -1262,7 +1262,7 @@
+ style="background-color: black; width: 75%">
@@ -1277,7 +1277,7 @@
+ style="background-color: black; width: 75%">
@@ -1292,7 +1292,7 @@
+ style="background-color: black; width: 75%">
@@ -1307,7 +1307,7 @@
+ style="background-color: black; width: 75%">
@@ -1322,7 +1322,7 @@
+ style="background-color: black; width: 75%">
@@ -1337,7 +1337,7 @@
+ style="background-color: black; width: 75%">
@@ -1352,7 +1352,7 @@
+ style="background-color: black; width: 75%">
@@ -1367,7 +1367,7 @@
+ style="background-color: black; width: 75%">
@@ -1382,7 +1382,7 @@
+ style="background-color: black; width: 75%">
@@ -1412,7 +1412,7 @@
+ style="background-color: transparent; width: 25%"> @@ -1440,7 +1440,7 @@
+ style="background-color: transparent; width: 25%"> @@ -1453,7 +1453,7 @@
+ style="background-color: black; width: 75%">
@@ -1468,7 +1468,7 @@
+ style="background-color: black; width: 75%">
@@ -1483,7 +1483,7 @@
+ style="background-color: black; width: 75%">
@@ -1500,7 +1500,7 @@
+ style="background-color: transparent; width: 25%"> @@ -1515,7 +1515,7 @@
+ style="background-color: transparent; width: 25%"> @@ -1530,7 +1530,7 @@
+ style="background-color: transparent; width: 25%"> @@ -1545,7 +1545,7 @@
+ style="background-color: transparent; width: 25%"> @@ -1560,7 +1560,7 @@
+ style="background-color: transparent; width: 25%"> @@ -1575,7 +1575,7 @@
+ style="background-color: transparent; width: 25%"> @@ -1586,11 +1586,11 @@ title="Chain F, Crystal Structure Of The Catalytic Domain Of Rlub In Complex With A 21-nucleotide Rna Substrate">
-
-
+ style="background-color: transparent; width: 25%">
+
+
@@ -1601,11 +1601,11 @@ title="Chain E, Crystal Structure Of The Catalytic Domain Of Rlub In Complex With A 21-nucleotide Rna Substrate">
-
-
+ style="background-color: transparent; width: 25%">
+
+
@@ -1616,7 +1616,7 @@ title="Chain A, Thermus Thermophilus Ribosome">
+ style="background-color: transparent; width: 25%">
+ style="background-color: transparent; width: 25%">
+ style="background-color: transparent; width: 25%">
+ style="background-color: transparent; width: 25%">
+ style="background-color: transparent; width: 25%">
+ style="background-color: transparent; width: 25%">
+ style="background-color: transparent; width: 25%">
-
-
+ style="background-color: transparent; width: 25%">
+
+
@@ -1766,7 +1766,7 @@
+ style="background-color: transparent; width: 25%">
@@ -1777,7 +1777,7 @@ title="Chain A, Structure Of The Thermus Thermophilus 70s Ribosome Complexed With Mrna, Trna And Paromomycin (Part 2 Of 4). This File Contains The 50s Subunit From Molecule I. ">
+ style="background-color: transparent; width: 25%">
-
-
+ style="background-color: transparent; width: 25%">
+
+
@@ -1807,11 +1807,11 @@ title="Chain C, Crystal Structure Of I-Crei Complexed With Its Target Methylated At Position Plus 2 (In The B Strand) In The Presence Of Calcium">
-
-
+ style="background-color: transparent; width: 25%">
+
+
diff -r 6ecbfebb9dd9 -r 40ce2043006a test-data/blast xml example3.html --- a/test-data/blast xml example3.html Wed Jun 18 14:33:12 2014 +0200 +++ b/test-data/blast xml example3.html Thu Jun 19 17:00:29 2014 +0200 @@ -713,34 +713,34 @@
query:
-
+
2
-
+
4
-
+
6
-
+
8
-
+
10
-
+
12
-
+
14
-
+
16
-
+
18
-
+
20
@@ -755,7 +755,7 @@ title="DJ437711|GenBank|insert_MIR604|Corn_Event_MIR604,_Left_Border_region|-5751164067366620000">
+ style="background-color: black; width: 100%">
@@ -952,34 +952,34 @@
query:
-
+
2
-
+
4
-
+
6
-
+
8
-
+
10
-
+
12
-
+
14
-
+
16
-
+
18
-
+
20
@@ -994,7 +994,7 @@ title="AB209952.1|GenBank|insert_GTS-40-3-2|Glycine_max_transgenic_cp4epsps_gene_for_5-enol-pyruvylshikimate-3-phospate_synthase_class_2_precursor,_complete_cds|-9105899556052450000">
+ style="background-color: black; width: 100%">
@@ -1425,34 +1425,34 @@
query:
-
+
2
-
+
4
-
+
6
-
+
8
-
+
10
-
+
12
-
+
14
-
+
16
-
+
18
-
+
20
@@ -1467,9 +1467,9 @@ title="AJ308515.1|GenBank|insert_GTS-40-3-2|Synthetic_construct_for_NOS_3'UTR/plant_junction_region.|-9105899556052450000">
+ style="background-color: transparent; width: 15%">
+ style="background-color: black; width: 85%">
@@ -1614,34 +1614,34 @@
query:
-
+
2
-
+
4
-
+
6
-
+
8
-
+
10
-
+
12
-
+
14
-
+
16
-
+
18
-
+
20
@@ -1656,7 +1656,7 @@ title="DJ437711|GenBank|insert_MIR604|Corn_Event_MIR604,_Left_Border_region|-5751164067366620000">
+ style="background-color: black; width: 100%">
@@ -1853,34 +1853,34 @@
query:
-
+
2
-
+
4
-
+
6
-
+
8
-
+
10
-
+
12
-
+
14
-
+
16
-
+
18
-
+
20
@@ -1895,7 +1895,7 @@ title="AB209952.1|GenBank|insert_GTS-40-3-2|Glycine_max_transgenic_cp4epsps_gene_for_5-enol-pyruvylshikimate-3-phospate_synthase_class_2_precursor,_complete_cds|-9105899556052450000">
+ style="background-color: black; width: 100%">
@@ -2664,31 +2664,31 @@
query:
-
+
3
-
+
6
-
+
9
-
+
12
-
+
15
-
+
18
-
+
21
-
+
24
-
+
25
@@ -2703,7 +2703,7 @@ title="AY326434|GenBank|insert_MON810|Synthetic_construct_truncated_CRYIA(b)_(cryIA(b))_gene,_partial_CDS|-2635190737607180000">
+ style="background-color: black; width: 100%">
@@ -2848,31 +2848,31 @@
query:
-
+
3
-
+
6
-
+
9
-
+
12
-
+
15
-
+
18
-
+
21
-
+
24
-
+
25
@@ -2887,7 +2887,7 @@ title="EUG|RIKILT|plasmid_pV-ZMBK07|plasmid_pV-ZMBK07|-2635190737607180000">
+ style="background-color: black; width: 100%">
@@ -3188,34 +3188,34 @@
query:
-
+
8
-
+
16
-
+
24
-
+
32
-
+
40
-
+
48
-
+
56
-
+
64
-
+
72
-
+
 
74
@@ -3231,7 +3231,7 @@ title="AY326434|GenBank|insert_MON810|Synthetic_construct_truncated_CRYIA(b)_(cryIA(b))_gene,_partial_CDS|-2635190737607180000">
+ style="background-color: green; width: 100%">
@@ -3379,34 +3379,34 @@
query:
-
+
8
-
+
16
-
+
24
-
+
32
-
+
40
-
+
48
-
+
56
-
+
64
-
+
72
-
+
 
74
@@ -3422,7 +3422,7 @@ title="EUG|RIKILT|plasmid_pV-ZMBK07|plasmid_pV-ZMBK07|-2635190737607180000">
+ style="background-color: green; width: 100%">
diff -r 6ecbfebb9dd9 -r 40ce2043006a test-data/blast xml example4.html --- a/test-data/blast xml example4.html Wed Jun 18 14:33:12 2014 +0200 +++ b/test-data/blast xml example4.html Thu Jun 19 17:00:29 2014 +0200 @@ -465,34 +465,34 @@
query:
-
+
2
-
+
4
-
+
6
-
+
8
-
+
10
-
+
12
-
+
14
-
+
16
-
+
18
-
+
20
@@ -507,7 +507,7 @@ title="AB209952.1|GenBank|insert_GTS-40-3-2|Glycine_max_transgenic_cp4epsps_gene_for_5-enol-pyruvylshikimate-3-phospate_synthase_class_2_precursor,_complete_cds|-9105899556052450000">
+ style="background-color: black; width: 100%">
@@ -518,7 +518,7 @@ title="DJ437711|GenBank|insert_MIR604|Corn_Event_MIR604,_Left_Border_region|-5751164067366620000">
+ style="background-color: black; width: 100%">
@@ -747,34 +747,34 @@
query:
-
+
2
-
+
4
-
+
6
-
+
8
-
+
10
-
+
12
-
+
14
-
+
16
-
+
18
-
+
20
@@ -789,7 +789,7 @@ title="AB209952.1|GenBank|insert_GTS-40-3-2|Glycine_max_transgenic_cp4epsps_gene_for_5-enol-pyruvylshikimate-3-phospate_synthase_class_2_precursor,_complete_cds|-9105899556052450000">
+ style="background-color: black; width: 100%">
@@ -800,7 +800,7 @@ title="DJ437711|GenBank|insert_MIR604|Corn_Event_MIR604,_Left_Border_region|-5751164067366620000">
+ style="background-color: black; width: 100%">
@@ -811,9 +811,9 @@ title="AJ308515.1|GenBank|insert_GTS-40-3-2|Synthetic_construct_for_NOS_3'UTR/plant_junction_region.|-9105899556052450000">
+ style="background-color: transparent; width: 15%">
+ style="background-color: black; width: 85%">
@@ -1126,31 +1126,31 @@
query:
-
+
3
-
+
6
-
+
9
-
+
12
-
+
15
-
+
18
-
+
21
-
+
24
-
+
25
@@ -1165,9 +1165,9 @@ title="EUG|RIKILT|plasmid_pV-ZMBK07|plasmid_pV-ZMBK07|-2635190737607180000">
+ style="background-color: black; width: 88%">
+ style="background-color: transparent; width: 12%">
@@ -1178,9 +1178,9 @@ title="AY326434|GenBank|insert_MON810|Synthetic_construct_truncated_CRYIA(b)_(cryIA(b))_gene,_partial_CDS|-2635190737607180000">
+ style="background-color: black; width: 88%">
+ style="background-color: transparent; width: 12%">
@@ -1383,34 +1383,34 @@
query:
-
+
8
-
+
16
-
+
24
-
+
32
-
+
40
-
+
48
-
+
56
-
+
64
-
+
72
-
+
 
74
@@ -1426,7 +1426,7 @@ title="EUG|RIKILT|plasmid_pV-ZMBK07|plasmid_pV-ZMBK07|-2635190737607180000">
+ style="background-color: green; width: 100%">
@@ -1437,7 +1437,7 @@ title="AY326434|GenBank|insert_MON810|Synthetic_construct_truncated_CRYIA(b)_(cryIA(b))_gene,_partial_CDS|-2635190737607180000">
+ style="background-color: green; width: 100%">
diff -r 6ecbfebb9dd9 -r 40ce2043006a test-data/refresh_test_results.sh --- a/test-data/refresh_test_results.sh Wed Jun 18 14:33:12 2014 +0200 +++ b/test-data/refresh_test_results.sh Thu Jun 19 17:00:29 2014 +0200 @@ -2,7 +2,9 @@ # run this from the directory it exists in to update the test outputs +set -eu + for i in 1 2 3 4 do - ../blast2html.py -i "blast xml example$i.xml" -o "blast xml example$i.html" + "$@" ../blast2html.py -i "blast xml example$i.xml" -o "blast xml example$i.html" done