changeset 81:40ce2043006a

merge py2.6 branch
author Jan Kanis <jan.code@jankanis.nl>
date Thu, 19 Jun 2014 17:00:29 +0200
parents 6ecbfebb9dd9 (current diff) f1791df1478c (diff)
children 3338571b44cd
files
diffstat 6 files changed, 321 insertions(+), 293 deletions(-) [+]
line wrap: on
line diff
--- 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 -*- #}
 <!DOCTYPE html>
 <html>
   <head>
@@ -466,7 +467,7 @@
                   <div class=graphicrow>
                     <div>
                       {% for s in result|queryscale %}
-                      <div class=graphicitem style="width: {{s.width}}%">
+                      <div class=graphicitem style="width: {{s.width|numfmt}}%">
                         {% if s.width > 3.0 %}
                         <div>{{s.label}}</div>
                         {% else %}
@@ -489,7 +490,7 @@
                   <div class="matchrow graphicrow">
                     {% for hit in line.colors %}
                     <div class="matchitem graphicitem"
-                         style="background-color: {{hit[1]}}; width: {{hit[0]}}%"></div>
+                         style="background-color: {{hit[1]}}; width: {{hit[0]|numfmt}}%"></div>
                     {% endfor %}
                   </div>
                 </a>
@@ -596,9 +597,9 @@
                       <td>{{hsp['Hsp_bit-score']|fmt('.1f')}} bits({{hsp.Hsp_score}})</td>
                       <td>{{hsp.Hsp_evalue|fmt('.1f')}}</td>
                       <td>{{ hsp.Hsp_identity }}/{{ hsp|len }}({{
-                        (hsp.Hsp_identity/hsp|len) |fmt('.0%') }})</td>
+                        ((hsp.Hsp_identity|float)/hsp|len) | fmt('.0%') }})</td>
                       <td>{{ hsp.Hsp_gaps }}/{{ hsp|len
-                        }}({{ (hsp.Hsp_gaps / hsp|len) | fmt('.0%') }})</td>
+                        }}({{ ((hsp.Hsp_gaps|float) / hsp|len) | fmt('.0%') }})</td>
                       <td>{{ hsp['Hsp_query-frame']|asframe }}/{{ hsp['Hsp_hit-frame']|asframe }}</td>
                     </tr>
                   </table>
--- 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')
--- 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)">
                   <div class="matchrow graphicrow">
                     <div class="matchitem graphicitem"
-                         style="background-color: black; width: 100.0%"></div>
+                         style="background-color: black; width: 100%"></div>
                   </div>
                 </a>
 
@@ -479,7 +479,7 @@
                    title="Chain A, E. Coli 70s-fmetval-trnaval-trnafmet Complex In Intermediate Post- Translocation State (post3b, 50s Subunit)">
                   <div class="matchrow graphicrow">
                     <div class="matchitem graphicitem"
-                         style="background-color: black; width: 100.0%"></div>
+                         style="background-color: black; width: 100%"></div>
                   </div>
                 </a>
 
@@ -490,7 +490,7 @@
                    title="Chain A, E. Coli 70s-fmetval-trnaval-trnafmet Complex In Intermediate Post- Translocation State (post3a, 50s Subunit)">
                   <div class="matchrow graphicrow">
                     <div class="matchitem graphicitem"
-                         style="background-color: black; width: 100.0%"></div>
+                         style="background-color: black; width: 100%"></div>
                   </div>
                 </a>
 
@@ -501,7 +501,7 @@
                    title="Chain A, E. Coli 70s-fmetval-trnaval-trnafmet Complex In Intermediate Post- Translocation State (post2b, 50s Subunit)">
                   <div class="matchrow graphicrow">
                     <div class="matchitem graphicitem"
-                         style="background-color: black; width: 100.0%"></div>
+                         style="background-color: black; width: 100%"></div>
                   </div>
                 </a>
 
@@ -512,7 +512,7 @@
                    title="Chain A, E. Coli 70s-fmetval-trnaval-trnafmet Complex In Intermediate Post- Translocation State (post2a, 50s Subunit)">
                   <div class="matchrow graphicrow">
                     <div class="matchitem graphicitem"
-                         style="background-color: black; width: 100.0%"></div>
+                         style="background-color: black; width: 100%"></div>
                   </div>
                 </a>
 
@@ -523,7 +523,7 @@
                    title="Chain A, E. Coli 70s-fmetval-trnaval-trnafmet Complex In Classic Post- Translocation State (post1, 50s Subunit)">
                   <div class="matchrow graphicrow">
                     <div class="matchitem graphicitem"
-                         style="background-color: black; width: 100.0%"></div>
+                         style="background-color: black; width: 100%"></div>
                   </div>
                 </a>
 
@@ -534,7 +534,7 @@
                    title="Chain A, E. Coli 70s-fmetval-trnaval-trnafmet Complex In Hybrid Pre- Translocation State (pre5b, 50s Subunit)">
                   <div class="matchrow graphicrow">
                     <div class="matchitem graphicitem"
-                         style="background-color: black; width: 100.0%"></div>
+                         style="background-color: black; width: 100%"></div>
                   </div>
                 </a>
 
@@ -545,7 +545,7 @@
                    title="Chain A, E. Coli 70s-fmetval-trnaval-trnafmet Complex In Hybrid Pre- Translocation State (pre5a, 50s Subunit)">
                   <div class="matchrow graphicrow">
                     <div class="matchitem graphicitem"
-                         style="background-color: black; width: 100.0%"></div>
+                         style="background-color: black; width: 100%"></div>
                   </div>
                 </a>
 
@@ -556,7 +556,7 @@
                    title="Chain A, E. Coli 70s-fmetval-trnaval-trnafmet Complex In Hybrid Pre- Translocation State (pre4, 50s Subunit)">
                   <div class="matchrow graphicrow">
                     <div class="matchitem graphicitem"
-                         style="background-color: black; width: 100.0%"></div>
+                         style="background-color: black; width: 100%"></div>
                   </div>
                 </a>
 
@@ -567,7 +567,7 @@
                    title="Chain A, E. Coli 70s-fmetval-trnaval-trnafmet Complex In Classic Pre- Translocation State (pre1a, 50s Subunit)">
                   <div class="matchrow graphicrow">
                     <div class="matchitem graphicitem"
-                         style="background-color: black; width: 100.0%"></div>
+                         style="background-color: black; width: 100%"></div>
                   </div>
                 </a>
 
@@ -578,7 +578,7 @@
                    title="Chain A, E. Coli 70s-fmetval-trnaval-trnafmet Complex In Intermediate Pre- Translocation State (pre3, 50s Subunit)">
                   <div class="matchrow graphicrow">
                     <div class="matchitem graphicitem"
-                         style="background-color: black; width: 100.0%"></div>
+                         style="background-color: black; width: 100%"></div>
                   </div>
                 </a>
 
@@ -589,7 +589,7 @@
                    title="Chain A, E. Coli 70s-fmetval-trnaval-trnafmet Complex In Intermediate Pre- Translocation State (pre2, 50s Subunit)">
                   <div class="matchrow graphicrow">
                     <div class="matchitem graphicitem"
-                         style="background-color: black; width: 100.0%"></div>
+                         style="background-color: black; width: 100%"></div>
                   </div>
                 </a>
 
@@ -600,7 +600,7 @@
                    title="Chain A, E. Coli 70s-fmetval-trnaval-trnafmet Complex In Classic Pre- Translocation State (pre1b, 50s Subunit)">
                   <div class="matchrow graphicrow">
                     <div class="matchitem graphicitem"
-                         style="background-color: black; width: 100.0%"></div>
+                         style="background-color: black; width: 100%"></div>
                   </div>
                 </a>
 
@@ -611,7 +611,7 @@
                    title="Chain A, Tetracycline Resistance Protein Tet(o) Bound To The Ribosome">
                   <div class="matchrow graphicrow">
                     <div class="matchitem graphicitem"
-                         style="background-color: black; width: 100.0%"></div>
+                         style="background-color: black; width: 100%"></div>
                   </div>
                 </a>
 
@@ -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. ">
                   <div class="matchrow graphicrow">
                     <div class="matchitem graphicitem"
-                         style="background-color: black; width: 100.0%"></div>
+                         style="background-color: black; width: 100%"></div>
                   </div>
                 </a>
 
@@ -633,7 +633,7 @@
                    title="Chain B, Ternary Complex-Bound E.Coli 70s Ribosome. This Entry Consists Of The 50s Subunit. ">
                   <div class="matchrow graphicrow">
                     <div class="matchitem graphicitem"
-                         style="background-color: black; width: 100.0%"></div>
+                         style="background-color: black; width: 100%"></div>
                   </div>
                 </a>
 
@@ -644,7 +644,7 @@
                    title="Chain B, Structure Of The 50s Subunit Of E. Coli Ribosome In Pre-Accommodation State ">
                   <div class="matchrow graphicrow">
                     <div class="matchitem graphicitem"
-                         style="background-color: black; width: 100.0%"></div>
+                         style="background-color: black; width: 100%"></div>
                   </div>
                 </a>
 
@@ -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">
                   <div class="matchrow graphicrow">
                     <div class="matchitem graphicitem"
-                         style="background-color: black; width: 100.0%"></div>
+                         style="background-color: black; width: 100%"></div>
                   </div>
                 </a>
 
@@ -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">
                   <div class="matchrow graphicrow">
                     <div class="matchitem graphicitem"
-                         style="background-color: black; width: 100.0%"></div>
+                         style="background-color: black; width: 100%"></div>
                   </div>
                 </a>
 
@@ -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.">
                   <div class="matchrow graphicrow">
                     <div class="matchitem graphicitem"
-                         style="background-color: black; width: 100.0%"></div>
+                         style="background-color: black; width: 100%"></div>
                   </div>
                 </a>
 
@@ -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. ">
                   <div class="matchrow graphicrow">
                     <div class="matchitem graphicitem"
-                         style="background-color: black; width: 100.0%"></div>
+                         style="background-color: black; width: 100%"></div>
                   </div>
                 </a>
 
@@ -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. ">
                   <div class="matchrow graphicrow">
                     <div class="matchitem graphicitem"
-                         style="background-color: black; width: 100.0%"></div>
+                         style="background-color: black; width: 100%"></div>
                   </div>
                 </a>
 
@@ -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. ">
                   <div class="matchrow graphicrow">
                     <div class="matchitem graphicitem"
-                         style="background-color: black; width: 100.0%"></div>
+                         style="background-color: black; width: 100%"></div>
                   </div>
                 </a>
 
@@ -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 ">
                   <div class="matchrow graphicrow">
                     <div class="matchitem graphicitem"
-                         style="background-color: black; width: 100.0%"></div>
+                         style="background-color: black; width: 100%"></div>
                   </div>
                 </a>
 
@@ -827,7 +827,7 @@
                     <div class="matchitem graphicitem"
                          style="background-color: transparent; width: 18.75%"></div>
                     <div class="matchitem graphicitem"
-                         style="background-color: black; width: 75.0%"></div>
+                         style="background-color: black; width: 75%"></div>
                     <div class="matchitem graphicitem"
                          style="background-color: transparent; width: 6.25%"></div>
                   </div>
@@ -840,7 +840,7 @@
                    title="Chain 5, Structure Of The H. Sapiens 60s Rrna">
                   <div class="matchrow graphicrow">
                     <div class="matchitem graphicitem"
-                         style="background-color: black; width: 100.0%"></div>
+                         style="background-color: black; width: 100%"></div>
                   </div>
                 </a>
 
@@ -851,7 +851,7 @@
                    title="Chain 5, Structure Of The D. Melanogaster 60s Rrna">
                   <div class="matchrow graphicrow">
                     <div class="matchitem graphicitem"
-                         style="background-color: black; width: 100.0%"></div>
+                         style="background-color: black; width: 100%"></div>
                   </div>
                 </a>
 
@@ -879,7 +879,7 @@
                     <div class="matchitem graphicitem"
                          style="background-color: black; width: 56.25%"></div>
                     <div class="matchitem graphicitem"
-                         style="background-color: transparent; width: 25.0%"></div>
+                         style="background-color: transparent; width: 25%"></div>
                   </div>
                 </a>
 
@@ -892,7 +892,7 @@
                     <div class="matchitem graphicitem"
                          style="background-color: transparent; width: 18.75%"></div>
                     <div class="matchitem graphicitem"
-                         style="background-color: black; width: 75.0%"></div>
+                         style="background-color: black; width: 75%"></div>
                     <div class="matchitem graphicitem"
                          style="background-color: transparent; width: 6.25%"></div>
                   </div>
@@ -933,7 +933,7 @@
                     <div class="matchitem graphicitem"
                          style="background-color: transparent; width: 18.75%"></div>
                     <div class="matchitem graphicitem"
-                         style="background-color: black; width: 75.0%"></div>
+                         style="background-color: black; width: 75%"></div>
                     <div class="matchitem graphicitem"
                          style="background-color: transparent; width: 6.25%"></div>
                   </div>
@@ -948,7 +948,7 @@
                     <div class="matchitem graphicitem"
                          style="background-color: transparent; width: 18.75%"></div>
                     <div class="matchitem graphicitem"
-                         style="background-color: black; width: 75.0%"></div>
+                         style="background-color: black; width: 75%"></div>
                     <div class="matchitem graphicitem"
                          style="background-color: transparent; width: 6.25%"></div>
                   </div>
@@ -963,7 +963,7 @@
                     <div class="matchitem graphicitem"
                          style="background-color: transparent; width: 18.75%"></div>
                     <div class="matchitem graphicitem"
-                         style="background-color: black; width: 75.0%"></div>
+                         style="background-color: black; width: 75%"></div>
                     <div class="matchitem graphicitem"
                          style="background-color: transparent; width: 6.25%"></div>
                   </div>
@@ -980,7 +980,7 @@
                     <div class="matchitem graphicitem"
                          style="background-color: black; width: 56.25%"></div>
                     <div class="matchitem graphicitem"
-                         style="background-color: transparent; width: 25.0%"></div>
+                         style="background-color: transparent; width: 25%"></div>
                   </div>
                 </a>
 
@@ -995,7 +995,7 @@
                     <div class="matchitem graphicitem"
                          style="background-color: black; width: 56.25%"></div>
                     <div class="matchitem graphicitem"
-                         style="background-color: transparent; width: 25.0%"></div>
+                         style="background-color: transparent; width: 25%"></div>
                   </div>
                 </a>
 
@@ -1088,7 +1088,7 @@
                     <div class="matchitem graphicitem"
                          style="background-color: black; width: 56.25%"></div>
                     <div class="matchitem graphicitem"
-                         style="background-color: transparent; width: 25.0%"></div>
+                         style="background-color: transparent; width: 25%"></div>
                   </div>
                 </a>
 
@@ -1103,7 +1103,7 @@
                     <div class="matchitem graphicitem"
                          style="background-color: black; width: 56.25%"></div>
                     <div class="matchitem graphicitem"
-                         style="background-color: transparent; width: 25.0%"></div>
+                         style="background-color: transparent; width: 25%"></div>
                   </div>
                 </a>
 
@@ -1118,7 +1118,7 @@
                     <div class="matchitem graphicitem"
                          style="background-color: black; width: 56.25%"></div>
                     <div class="matchitem graphicitem"
-                         style="background-color: transparent; width: 25.0%"></div>
+                         style="background-color: transparent; width: 25%"></div>
                   </div>
                 </a>
 
@@ -1133,7 +1133,7 @@
                     <div class="matchitem graphicitem"
                          style="background-color: black; width: 56.25%"></div>
                     <div class="matchitem graphicitem"
-                         style="background-color: transparent; width: 25.0%"></div>
+                         style="background-color: transparent; width: 25%"></div>
                   </div>
                 </a>
 
@@ -1146,7 +1146,7 @@
                     <div class="matchitem graphicitem"
                          style="background-color: transparent; width: 18.75%"></div>
                     <div class="matchitem graphicitem"
-                         style="background-color: black; width: 75.0%"></div>
+                         style="background-color: black; width: 75%"></div>
                     <div class="matchitem graphicitem"
                          style="background-color: transparent; width: 6.25%"></div>
                   </div>
@@ -1189,7 +1189,7 @@
                     <div class="matchitem graphicitem"
                          style="background-color: black; width: 56.25%"></div>
                     <div class="matchitem graphicitem"
-                         style="background-color: transparent; width: 25.0%"></div>
+                         style="background-color: transparent; width: 25%"></div>
                   </div>
                 </a>
 
@@ -1204,7 +1204,7 @@
                     <div class="matchitem graphicitem"
                          style="background-color: black; width: 56.25%"></div>
                     <div class="matchitem graphicitem"
-                         style="background-color: transparent; width: 25.0%"></div>
+                         style="background-color: transparent; width: 25%"></div>
                   </div>
                 </a>
 
@@ -1219,7 +1219,7 @@
                     <div class="matchitem graphicitem"
                          style="background-color: black; width: 56.25%"></div>
                     <div class="matchitem graphicitem"
-                         style="background-color: transparent; width: 25.0%"></div>
+                         style="background-color: transparent; width: 25%"></div>
                   </div>
                 </a>
 
@@ -1232,7 +1232,7 @@
                     <div class="matchitem graphicitem"
                          style="background-color: transparent; width: 18.75%"></div>
                     <div class="matchitem graphicitem"
-                         style="background-color: black; width: 75.0%"></div>
+                         style="background-color: black; width: 75%"></div>
                     <div class="matchitem graphicitem"
                          style="background-color: transparent; width: 6.25%"></div>
                   </div>
@@ -1247,7 +1247,7 @@
                     <div class="matchitem graphicitem"
                          style="background-color: transparent; width: 18.75%"></div>
                     <div class="matchitem graphicitem"
-                         style="background-color: black; width: 75.0%"></div>
+                         style="background-color: black; width: 75%"></div>
                     <div class="matchitem graphicitem"
                          style="background-color: transparent; width: 6.25%"></div>
                   </div>
@@ -1262,7 +1262,7 @@
                     <div class="matchitem graphicitem"
                          style="background-color: transparent; width: 18.75%"></div>
                     <div class="matchitem graphicitem"
-                         style="background-color: black; width: 75.0%"></div>
+                         style="background-color: black; width: 75%"></div>
                     <div class="matchitem graphicitem"
                          style="background-color: transparent; width: 6.25%"></div>
                   </div>
@@ -1277,7 +1277,7 @@
                     <div class="matchitem graphicitem"
                          style="background-color: transparent; width: 18.75%"></div>
                     <div class="matchitem graphicitem"
-                         style="background-color: black; width: 75.0%"></div>
+                         style="background-color: black; width: 75%"></div>
                     <div class="matchitem graphicitem"
                          style="background-color: transparent; width: 6.25%"></div>
                   </div>
@@ -1292,7 +1292,7 @@
                     <div class="matchitem graphicitem"
                          style="background-color: transparent; width: 18.75%"></div>
                     <div class="matchitem graphicitem"
-                         style="background-color: black; width: 75.0%"></div>
+                         style="background-color: black; width: 75%"></div>
                     <div class="matchitem graphicitem"
                          style="background-color: transparent; width: 6.25%"></div>
                   </div>
@@ -1307,7 +1307,7 @@
                     <div class="matchitem graphicitem"
                          style="background-color: transparent; width: 18.75%"></div>
                     <div class="matchitem graphicitem"
-                         style="background-color: black; width: 75.0%"></div>
+                         style="background-color: black; width: 75%"></div>
                     <div class="matchitem graphicitem"
                          style="background-color: transparent; width: 6.25%"></div>
                   </div>
@@ -1322,7 +1322,7 @@
                     <div class="matchitem graphicitem"
                          style="background-color: transparent; width: 18.75%"></div>
                     <div class="matchitem graphicitem"
-                         style="background-color: black; width: 75.0%"></div>
+                         style="background-color: black; width: 75%"></div>
                     <div class="matchitem graphicitem"
                          style="background-color: transparent; width: 6.25%"></div>
                   </div>
@@ -1337,7 +1337,7 @@
                     <div class="matchitem graphicitem"
                          style="background-color: transparent; width: 18.75%"></div>
                     <div class="matchitem graphicitem"
-                         style="background-color: black; width: 75.0%"></div>
+                         style="background-color: black; width: 75%"></div>
                     <div class="matchitem graphicitem"
                          style="background-color: transparent; width: 6.25%"></div>
                   </div>
@@ -1352,7 +1352,7 @@
                     <div class="matchitem graphicitem"
                          style="background-color: transparent; width: 18.75%"></div>
                     <div class="matchitem graphicitem"
-                         style="background-color: black; width: 75.0%"></div>
+                         style="background-color: black; width: 75%"></div>
                     <div class="matchitem graphicitem"
                          style="background-color: transparent; width: 6.25%"></div>
                   </div>
@@ -1367,7 +1367,7 @@
                     <div class="matchitem graphicitem"
                          style="background-color: transparent; width: 18.75%"></div>
                     <div class="matchitem graphicitem"
-                         style="background-color: black; width: 75.0%"></div>
+                         style="background-color: black; width: 75%"></div>
                     <div class="matchitem graphicitem"
                          style="background-color: transparent; width: 6.25%"></div>
                   </div>
@@ -1382,7 +1382,7 @@
                     <div class="matchitem graphicitem"
                          style="background-color: transparent; width: 18.75%"></div>
                     <div class="matchitem graphicitem"
-                         style="background-color: black; width: 75.0%"></div>
+                         style="background-color: black; width: 75%"></div>
                     <div class="matchitem graphicitem"
                          style="background-color: transparent; width: 6.25%"></div>
                   </div>
@@ -1412,7 +1412,7 @@
                     <div class="matchitem graphicitem"
                          style="background-color: black; width: 56.25%"></div>
                     <div class="matchitem graphicitem"
-                         style="background-color: transparent; width: 25.0%"></div>
+                         style="background-color: transparent; width: 25%"></div>
                   </div>
                 </a>
 
@@ -1440,7 +1440,7 @@
                     <div class="matchitem graphicitem"
                          style="background-color: black; width: 56.25%"></div>
                     <div class="matchitem graphicitem"
-                         style="background-color: transparent; width: 25.0%"></div>
+                         style="background-color: transparent; width: 25%"></div>
                   </div>
                 </a>
 
@@ -1453,7 +1453,7 @@
                     <div class="matchitem graphicitem"
                          style="background-color: transparent; width: 18.75%"></div>
                     <div class="matchitem graphicitem"
-                         style="background-color: black; width: 75.0%"></div>
+                         style="background-color: black; width: 75%"></div>
                     <div class="matchitem graphicitem"
                          style="background-color: transparent; width: 6.25%"></div>
                   </div>
@@ -1468,7 +1468,7 @@
                     <div class="matchitem graphicitem"
                          style="background-color: transparent; width: 18.75%"></div>
                     <div class="matchitem graphicitem"
-                         style="background-color: black; width: 75.0%"></div>
+                         style="background-color: black; width: 75%"></div>
                     <div class="matchitem graphicitem"
                          style="background-color: transparent; width: 6.25%"></div>
                   </div>
@@ -1483,7 +1483,7 @@
                     <div class="matchitem graphicitem"
                          style="background-color: transparent; width: 18.75%"></div>
                     <div class="matchitem graphicitem"
-                         style="background-color: black; width: 75.0%"></div>
+                         style="background-color: black; width: 75%"></div>
                     <div class="matchitem graphicitem"
                          style="background-color: transparent; width: 6.25%"></div>
                   </div>
@@ -1500,7 +1500,7 @@
                     <div class="matchitem graphicitem"
                          style="background-color: black; width: 56.25%"></div>
                     <div class="matchitem graphicitem"
-                         style="background-color: transparent; width: 25.0%"></div>
+                         style="background-color: transparent; width: 25%"></div>
                   </div>
                 </a>
 
@@ -1515,7 +1515,7 @@
                     <div class="matchitem graphicitem"
                          style="background-color: black; width: 56.25%"></div>
                     <div class="matchitem graphicitem"
-                         style="background-color: transparent; width: 25.0%"></div>
+                         style="background-color: transparent; width: 25%"></div>
                   </div>
                 </a>
 
@@ -1530,7 +1530,7 @@
                     <div class="matchitem graphicitem"
                          style="background-color: black; width: 56.25%"></div>
                     <div class="matchitem graphicitem"
-                         style="background-color: transparent; width: 25.0%"></div>
+                         style="background-color: transparent; width: 25%"></div>
                   </div>
                 </a>
 
@@ -1545,7 +1545,7 @@
                     <div class="matchitem graphicitem"
                          style="background-color: black; width: 56.25%"></div>
                     <div class="matchitem graphicitem"
-                         style="background-color: transparent; width: 25.0%"></div>
+                         style="background-color: transparent; width: 25%"></div>
                   </div>
                 </a>
 
@@ -1560,7 +1560,7 @@
                     <div class="matchitem graphicitem"
                          style="background-color: black; width: 56.25%"></div>
                     <div class="matchitem graphicitem"
-                         style="background-color: transparent; width: 25.0%"></div>
+                         style="background-color: transparent; width: 25%"></div>
                   </div>
                 </a>
 
@@ -1575,7 +1575,7 @@
                     <div class="matchitem graphicitem"
                          style="background-color: black; width: 56.25%"></div>
                     <div class="matchitem graphicitem"
-                         style="background-color: transparent; width: 25.0%"></div>
+                         style="background-color: transparent; width: 25%"></div>
                   </div>
                 </a>
 
@@ -1586,11 +1586,11 @@
                    title="Chain F, Crystal Structure Of The Catalytic Domain Of Rlub In Complex With A 21-nucleotide Rna Substrate">
                   <div class="matchrow graphicrow">
                     <div class="matchitem graphicitem"
-                         style="background-color: transparent; width: 25.0%"></div>
-                    <div class="matchitem graphicitem"
-                         style="background-color: black; width: 50.0%"></div>
-                    <div class="matchitem graphicitem"
-                         style="background-color: transparent; width: 25.0%"></div>
+                         style="background-color: transparent; width: 25%"></div>
+                    <div class="matchitem graphicitem"
+                         style="background-color: black; width: 50%"></div>
+                    <div class="matchitem graphicitem"
+                         style="background-color: transparent; width: 25%"></div>
                   </div>
                 </a>
 
@@ -1601,11 +1601,11 @@
                    title="Chain E, Crystal Structure Of The Catalytic Domain Of Rlub In Complex With A 21-nucleotide Rna Substrate">
                   <div class="matchrow graphicrow">
                     <div class="matchitem graphicitem"
-                         style="background-color: transparent; width: 25.0%"></div>
-                    <div class="matchitem graphicitem"
-                         style="background-color: black; width: 50.0%"></div>
-                    <div class="matchitem graphicitem"
-                         style="background-color: transparent; width: 25.0%"></div>
+                         style="background-color: transparent; width: 25%"></div>
+                    <div class="matchitem graphicitem"
+                         style="background-color: black; width: 50%"></div>
+                    <div class="matchitem graphicitem"
+                         style="background-color: transparent; width: 25%"></div>
                   </div>
                 </a>
 
@@ -1616,7 +1616,7 @@
                    title="Chain A, Thermus Thermophilus Ribosome">
                   <div class="matchrow graphicrow">
                     <div class="matchitem graphicitem"
-                         style="background-color: transparent; width: 25.0%"></div>
+                         style="background-color: transparent; width: 25%"></div>
                     <div class="matchitem graphicitem"
                          style="background-color: black; width: 68.75%"></div>
                     <div class="matchitem graphicitem"
@@ -1631,7 +1631,7 @@
                    title="Chain A, Crystal Structure Of Blasticidin S Bound To Thermus Thermophilus 70s Ribosome. This File Contains The 50s Subunit And Blasticidin S Molecule From The First 70s Ribosome. ">
                   <div class="matchrow graphicrow">
                     <div class="matchitem graphicitem"
-                         style="background-color: transparent; width: 25.0%"></div>
+                         style="background-color: transparent; width: 25%"></div>
                     <div class="matchitem graphicitem"
                          style="background-color: black; width: 68.75%"></div>
                     <div class="matchitem graphicitem"
@@ -1646,7 +1646,7 @@
                    title="Chain A, Crystal Structure Of The 70s Ribosome Bound With The Q253p Mutant Of Release Factor Rf2. 50s Of The A Subunit ">
                   <div class="matchrow graphicrow">
                     <div class="matchitem graphicitem"
-                         style="background-color: transparent; width: 25.0%"></div>
+                         style="background-color: transparent; width: 25%"></div>
                     <div class="matchitem graphicitem"
                          style="background-color: black; width: 68.75%"></div>
                     <div class="matchitem graphicitem"
@@ -1661,7 +1661,7 @@
                    title="Chain A, Crystal Structure Of Thermus Thermophilus 70s Containing Trnas And Mrna Stop Codon With Pseudouridine">
                   <div class="matchrow graphicrow">
                     <div class="matchitem graphicitem"
-                         style="background-color: transparent; width: 25.0%"></div>
+                         style="background-color: transparent; width: 25%"></div>
                     <div class="matchitem graphicitem"
                          style="background-color: black; width: 68.75%"></div>
                     <div class="matchitem graphicitem"
@@ -1676,7 +1676,7 @@
                    title="Chain A, Crystal Structure Of Thermus Thermophilus 70s Containing Trnas And Mrna Stop Codon With Pseudouridine">
                   <div class="matchrow graphicrow">
                     <div class="matchitem graphicitem"
-                         style="background-color: transparent; width: 25.0%"></div>
+                         style="background-color: transparent; width: 25%"></div>
                     <div class="matchitem graphicitem"
                          style="background-color: black; width: 68.75%"></div>
                     <div class="matchitem graphicitem"
@@ -1717,7 +1717,7 @@
                    title="Chain A, Crystal Structure Of The Bacterial Ribosome Ram Mutation G347u. This Entry Contains The 50s Ribosomal Subunit Of The Second 70s Molecule In The Asymmetric Unit">
                   <div class="matchrow graphicrow">
                     <div class="matchitem graphicitem"
-                         style="background-color: transparent; width: 25.0%"></div>
+                         style="background-color: transparent; width: 25%"></div>
                     <div class="matchitem graphicitem"
                          style="background-color: black; width: 68.75%"></div>
                     <div class="matchitem graphicitem"
@@ -1732,7 +1732,7 @@
                    title="Chain A, Crystal Structure Of The Bacterial Ribosome Ram Mutation G347u. This Entry Contains The 50s Ribosomal Subunit Of The First 70s Molecule In The Asymmetric Unit">
                   <div class="matchrow graphicrow">
                     <div class="matchitem graphicitem"
-                         style="background-color: transparent; width: 25.0%"></div>
+                         style="background-color: transparent; width: 25%"></div>
                     <div class="matchitem graphicitem"
                          style="background-color: black; width: 68.75%"></div>
                     <div class="matchitem graphicitem"
@@ -1747,11 +1747,11 @@
                    title="Chain d, The Cryo-Em Structure Of A 3d Dna-Origami Object">
                   <div class="matchrow graphicrow">
                     <div class="matchitem graphicitem"
-                         style="background-color: transparent; width: 25.0%"></div>
-                    <div class="matchitem graphicitem"
-                         style="background-color: black; width: 50.0%"></div>
-                    <div class="matchitem graphicitem"
-                         style="background-color: transparent; width: 25.0%"></div>
+                         style="background-color: transparent; width: 25%"></div>
+                    <div class="matchitem graphicitem"
+                         style="background-color: black; width: 50%"></div>
+                    <div class="matchitem graphicitem"
+                         style="background-color: transparent; width: 25%"></div>
                   </div>
                 </a>
 
@@ -1766,7 +1766,7 @@
                     <div class="matchitem graphicitem"
                          style="background-color: black; width: 56.25%"></div>
                     <div class="matchitem graphicitem"
-                         style="background-color: transparent; width: 25.0%"></div>
+                         style="background-color: transparent; width: 25%"></div>
                   </div>
                 </a>
 
@@ -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. ">
                   <div class="matchrow graphicrow">
                     <div class="matchitem graphicitem"
-                         style="background-color: transparent; width: 25.0%"></div>
+                         style="background-color: transparent; width: 25%"></div>
                     <div class="matchitem graphicitem"
                          style="background-color: black; width: 68.75%"></div>
                     <div class="matchitem graphicitem"
@@ -1792,11 +1792,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 Magnesium">
                   <div class="matchrow graphicrow">
                     <div class="matchitem graphicitem"
-                         style="background-color: transparent; width: 25.0%"></div>
-                    <div class="matchitem graphicitem"
-                         style="background-color: black; width: 50.0%"></div>
-                    <div class="matchitem graphicitem"
-                         style="background-color: transparent; width: 25.0%"></div>
+                         style="background-color: transparent; width: 25%"></div>
+                    <div class="matchitem graphicitem"
+                         style="background-color: black; width: 50%"></div>
+                    <div class="matchitem graphicitem"
+                         style="background-color: transparent; width: 25%"></div>
                   </div>
                 </a>
 
@@ -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">
                   <div class="matchrow graphicrow">
                     <div class="matchitem graphicitem"
-                         style="background-color: transparent; width: 25.0%"></div>
-                    <div class="matchitem graphicitem"
-                         style="background-color: black; width: 50.0%"></div>
-                    <div class="matchitem graphicitem"
-                         style="background-color: transparent; width: 25.0%"></div>
+                         style="background-color: transparent; width: 25%"></div>
+                    <div class="matchitem graphicitem"
+                         style="background-color: black; width: 50%"></div>
+                    <div class="matchitem graphicitem"
+                         style="background-color: transparent; width: 25%"></div>
                   </div>
                 </a>
 
--- 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 @@
                   <div>query:</div>
                   <div class=graphicrow>
                     <div>
-                      <div class=graphicitem style="width: 10.0%">
+                      <div class=graphicitem style="width: 10%">
                         <div>2</div>
                       </div>
-                      <div class=graphicitem style="width: 10.0%">
+                      <div class=graphicitem style="width: 10%">
                         <div>4</div>
                       </div>
-                      <div class=graphicitem style="width: 10.0%">
+                      <div class=graphicitem style="width: 10%">
                         <div>6</div>
                       </div>
-                      <div class=graphicitem style="width: 10.0%">
+                      <div class=graphicitem style="width: 10%">
                         <div>8</div>
                       </div>
-                      <div class=graphicitem style="width: 10.0%">
+                      <div class=graphicitem style="width: 10%">
                         <div>10</div>
                       </div>
-                      <div class=graphicitem style="width: 10.0%">
+                      <div class=graphicitem style="width: 10%">
                         <div>12</div>
                       </div>
-                      <div class=graphicitem style="width: 10.0%">
+                      <div class=graphicitem style="width: 10%">
                         <div>14</div>
                       </div>
-                      <div class=graphicitem style="width: 10.0%">
+                      <div class=graphicitem style="width: 10%">
                         <div>16</div>
                       </div>
-                      <div class=graphicitem style="width: 10.0%">
+                      <div class=graphicitem style="width: 10%">
                         <div>18</div>
                       </div>
-                      <div class=graphicitem style="width: 10.0%">
+                      <div class=graphicitem style="width: 10%">
                         <div>20</div>
                       </div>
                     </div>
@@ -755,7 +755,7 @@
                    title="DJ437711|GenBank|insert_MIR604|Corn_Event_MIR604,_Left_Border_region|-5751164067366620000">
                   <div class="matchrow graphicrow">
                     <div class="matchitem graphicitem"
-                         style="background-color: black; width: 100.0%"></div>
+                         style="background-color: black; width: 100%"></div>
                   </div>
                 </a>
 
@@ -952,34 +952,34 @@
                   <div>query:</div>
                   <div class=graphicrow>
                     <div>
-                      <div class=graphicitem style="width: 10.0%">
+                      <div class=graphicitem style="width: 10%">
                         <div>2</div>
                       </div>
-                      <div class=graphicitem style="width: 10.0%">
+                      <div class=graphicitem style="width: 10%">
                         <div>4</div>
                       </div>
-                      <div class=graphicitem style="width: 10.0%">
+                      <div class=graphicitem style="width: 10%">
                         <div>6</div>
                       </div>
-                      <div class=graphicitem style="width: 10.0%">
+                      <div class=graphicitem style="width: 10%">
                         <div>8</div>
                       </div>
-                      <div class=graphicitem style="width: 10.0%">
+                      <div class=graphicitem style="width: 10%">
                         <div>10</div>
                       </div>
-                      <div class=graphicitem style="width: 10.0%">
+                      <div class=graphicitem style="width: 10%">
                         <div>12</div>
                       </div>
-                      <div class=graphicitem style="width: 10.0%">
+                      <div class=graphicitem style="width: 10%">
                         <div>14</div>
                       </div>
-                      <div class=graphicitem style="width: 10.0%">
+                      <div class=graphicitem style="width: 10%">
                         <div>16</div>
                       </div>
-                      <div class=graphicitem style="width: 10.0%">
+                      <div class=graphicitem style="width: 10%">
                         <div>18</div>
                       </div>
-                      <div class=graphicitem style="width: 10.0%">
+                      <div class=graphicitem style="width: 10%">
                         <div>20</div>
                       </div>
                     </div>
@@ -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">
                   <div class="matchrow graphicrow">
                     <div class="matchitem graphicitem"
-                         style="background-color: black; width: 100.0%"></div>
+                         style="background-color: black; width: 100%"></div>
                   </div>
                 </a>
 
@@ -1425,34 +1425,34 @@
                   <div>query:</div>
                   <div class=graphicrow>
                     <div>
-                      <div class=graphicitem style="width: 10.0%">
+                      <div class=graphicitem style="width: 10%">
                         <div>2</div>
                       </div>
-                      <div class=graphicitem style="width: 10.0%">
+                      <div class=graphicitem style="width: 10%">
                         <div>4</div>
                       </div>
-                      <div class=graphicitem style="width: 10.0%">
+                      <div class=graphicitem style="width: 10%">
                         <div>6</div>
                       </div>
-                      <div class=graphicitem style="width: 10.0%">
+                      <div class=graphicitem style="width: 10%">
                         <div>8</div>
                       </div>
-                      <div class=graphicitem style="width: 10.0%">
+                      <div class=graphicitem style="width: 10%">
                         <div>10</div>
                       </div>
-                      <div class=graphicitem style="width: 10.0%">
+                      <div class=graphicitem style="width: 10%">
                         <div>12</div>
                       </div>
-                      <div class=graphicitem style="width: 10.0%">
+                      <div class=graphicitem style="width: 10%">
                         <div>14</div>
                       </div>
-                      <div class=graphicitem style="width: 10.0%">
+                      <div class=graphicitem style="width: 10%">
                         <div>16</div>
                       </div>
-                      <div class=graphicitem style="width: 10.0%">
+                      <div class=graphicitem style="width: 10%">
                         <div>18</div>
                       </div>
-                      <div class=graphicitem style="width: 10.0%">
+                      <div class=graphicitem style="width: 10%">
                         <div>20</div>
                       </div>
                     </div>
@@ -1467,9 +1467,9 @@
                    title="AJ308515.1|GenBank|insert_GTS-40-3-2|Synthetic_construct_for_NOS_3&#39;UTR/plant_junction_region.|-9105899556052450000">
                   <div class="matchrow graphicrow">
                     <div class="matchitem graphicitem"
-                         style="background-color: transparent; width: 15.0%"></div>
+                         style="background-color: transparent; width: 15%"></div>
                     <div class="matchitem graphicitem"
-                         style="background-color: black; width: 85.0%"></div>
+                         style="background-color: black; width: 85%"></div>
                   </div>
                 </a>
 
@@ -1614,34 +1614,34 @@
                   <div>query:</div>
                   <div class=graphicrow>
                     <div>
-                      <div class=graphicitem style="width: 10.0%">
+                      <div class=graphicitem style="width: 10%">
                         <div>2</div>
                       </div>
-                      <div class=graphicitem style="width: 10.0%">
+                      <div class=graphicitem style="width: 10%">
                         <div>4</div>
                       </div>
-                      <div class=graphicitem style="width: 10.0%">
+                      <div class=graphicitem style="width: 10%">
                         <div>6</div>
                       </div>
-                      <div class=graphicitem style="width: 10.0%">
+                      <div class=graphicitem style="width: 10%">
                         <div>8</div>
                       </div>
-                      <div class=graphicitem style="width: 10.0%">
+                      <div class=graphicitem style="width: 10%">
                         <div>10</div>
                       </div>
-                      <div class=graphicitem style="width: 10.0%">
+                      <div class=graphicitem style="width: 10%">
                         <div>12</div>
                       </div>
-                      <div class=graphicitem style="width: 10.0%">
+                      <div class=graphicitem style="width: 10%">
                         <div>14</div>
                       </div>
-                      <div class=graphicitem style="width: 10.0%">
+                      <div class=graphicitem style="width: 10%">
                         <div>16</div>
                       </div>
-                      <div class=graphicitem style="width: 10.0%">
+                      <div class=graphicitem style="width: 10%">
                         <div>18</div>
                       </div>
-                      <div class=graphicitem style="width: 10.0%">
+                      <div class=graphicitem style="width: 10%">
                         <div>20</div>
                       </div>
                     </div>
@@ -1656,7 +1656,7 @@
                    title="DJ437711|GenBank|insert_MIR604|Corn_Event_MIR604,_Left_Border_region|-5751164067366620000">
                   <div class="matchrow graphicrow">
                     <div class="matchitem graphicitem"
-                         style="background-color: black; width: 100.0%"></div>
+                         style="background-color: black; width: 100%"></div>
                   </div>
                 </a>
 
@@ -1853,34 +1853,34 @@
                   <div>query:</div>
                   <div class=graphicrow>
                     <div>
-                      <div class=graphicitem style="width: 10.0%">
+                      <div class=graphicitem style="width: 10%">
                         <div>2</div>
                       </div>
-                      <div class=graphicitem style="width: 10.0%">
+                      <div class=graphicitem style="width: 10%">
                         <div>4</div>
                       </div>
-                      <div class=graphicitem style="width: 10.0%">
+                      <div class=graphicitem style="width: 10%">
                         <div>6</div>
                       </div>
-                      <div class=graphicitem style="width: 10.0%">
+                      <div class=graphicitem style="width: 10%">
                         <div>8</div>
                       </div>
-                      <div class=graphicitem style="width: 10.0%">
+                      <div class=graphicitem style="width: 10%">
                         <div>10</div>
                       </div>
-                      <div class=graphicitem style="width: 10.0%">
+                      <div class=graphicitem style="width: 10%">
                         <div>12</div>
                       </div>
-                      <div class=graphicitem style="width: 10.0%">
+                      <div class=graphicitem style="width: 10%">
                         <div>14</div>
                       </div>
-                      <div class=graphicitem style="width: 10.0%">
+                      <div class=graphicitem style="width: 10%">
                         <div>16</div>
                       </div>
-                      <div class=graphicitem style="width: 10.0%">
+                      <div class=graphicitem style="width: 10%">
                         <div>18</div>
                       </div>
-                      <div class=graphicitem style="width: 10.0%">
+                      <div class=graphicitem style="width: 10%">
                         <div>20</div>
                       </div>
                     </div>
@@ -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">
                   <div class="matchrow graphicrow">
                     <div class="matchitem graphicitem"
-                         style="background-color: black; width: 100.0%"></div>
+                         style="background-color: black; width: 100%"></div>
                   </div>
                 </a>
 
@@ -2664,31 +2664,31 @@
                   <div>query:</div>
                   <div class=graphicrow>
                     <div>
-                      <div class=graphicitem style="width: 12.0%">
+                      <div class=graphicitem style="width: 12%">
                         <div>3</div>
                       </div>
-                      <div class=graphicitem style="width: 12.0%">
+                      <div class=graphicitem style="width: 12%">
                         <div>6</div>
                       </div>
-                      <div class=graphicitem style="width: 12.0%">
+                      <div class=graphicitem style="width: 12%">
                         <div>9</div>
                       </div>
-                      <div class=graphicitem style="width: 12.0%">
+                      <div class=graphicitem style="width: 12%">
                         <div>12</div>
                       </div>
-                      <div class=graphicitem style="width: 12.0%">
+                      <div class=graphicitem style="width: 12%">
                         <div>15</div>
                       </div>
-                      <div class=graphicitem style="width: 12.0%">
+                      <div class=graphicitem style="width: 12%">
                         <div>18</div>
                       </div>
-                      <div class=graphicitem style="width: 12.0%">
+                      <div class=graphicitem style="width: 12%">
                         <div>21</div>
                       </div>
-                      <div class=graphicitem style="width: 12.0%">
+                      <div class=graphicitem style="width: 12%">
                         <div>24</div>
                       </div>
-                      <div class=graphicitem style="width: 4.0%">
+                      <div class=graphicitem style="width: 4%">
                         <div>25</div>
                       </div>
                     </div>
@@ -2703,7 +2703,7 @@
                    title="AY326434|GenBank|insert_MON810|Synthetic_construct_truncated_CRYIA(b)_(cryIA(b))_gene,_partial_CDS|-2635190737607180000">
                   <div class="matchrow graphicrow">
                     <div class="matchitem graphicitem"
-                         style="background-color: black; width: 100.0%"></div>
+                         style="background-color: black; width: 100%"></div>
                   </div>
                 </a>
 
@@ -2848,31 +2848,31 @@
                   <div>query:</div>
                   <div class=graphicrow>
                     <div>
-                      <div class=graphicitem style="width: 12.0%">
+                      <div class=graphicitem style="width: 12%">
                         <div>3</div>
                       </div>
-                      <div class=graphicitem style="width: 12.0%">
+                      <div class=graphicitem style="width: 12%">
                         <div>6</div>
                       </div>
-                      <div class=graphicitem style="width: 12.0%">
+                      <div class=graphicitem style="width: 12%">
                         <div>9</div>
                       </div>
-                      <div class=graphicitem style="width: 12.0%">
+                      <div class=graphicitem style="width: 12%">
                         <div>12</div>
                       </div>
-                      <div class=graphicitem style="width: 12.0%">
+                      <div class=graphicitem style="width: 12%">
                         <div>15</div>
                       </div>
-                      <div class=graphicitem style="width: 12.0%">
+                      <div class=graphicitem style="width: 12%">
                         <div>18</div>
                       </div>
-                      <div class=graphicitem style="width: 12.0%">
+                      <div class=graphicitem style="width: 12%">
                         <div>21</div>
                       </div>
-                      <div class=graphicitem style="width: 12.0%">
+                      <div class=graphicitem style="width: 12%">
                         <div>24</div>
                       </div>
-                      <div class=graphicitem style="width: 4.0%">
+                      <div class=graphicitem style="width: 4%">
                         <div>25</div>
                       </div>
                     </div>
@@ -2887,7 +2887,7 @@
                    title="EUG|RIKILT|plasmid_pV-ZMBK07|plasmid_pV-ZMBK07|-2635190737607180000">
                   <div class="matchrow graphicrow">
                     <div class="matchitem graphicitem"
-                         style="background-color: black; width: 100.0%"></div>
+                         style="background-color: black; width: 100%"></div>
                   </div>
                 </a>
 
@@ -3188,34 +3188,34 @@
                   <div>query:</div>
                   <div class=graphicrow>
                     <div>
-                      <div class=graphicitem style="width: 10.81081081081081%">
+                      <div class=graphicitem style="width: 10.8108108108%">
                         <div>8</div>
                       </div>
-                      <div class=graphicitem style="width: 10.81081081081081%">
+                      <div class=graphicitem style="width: 10.8108108108%">
                         <div>16</div>
                       </div>
-                      <div class=graphicitem style="width: 10.81081081081081%">
+                      <div class=graphicitem style="width: 10.8108108108%">
                         <div>24</div>
                       </div>
-                      <div class=graphicitem style="width: 10.81081081081081%">
+                      <div class=graphicitem style="width: 10.8108108108%">
                         <div>32</div>
                       </div>
-                      <div class=graphicitem style="width: 10.81081081081081%">
+                      <div class=graphicitem style="width: 10.8108108108%">
                         <div>40</div>
                       </div>
-                      <div class=graphicitem style="width: 10.81081081081081%">
+                      <div class=graphicitem style="width: 10.8108108108%">
                         <div>48</div>
                       </div>
-                      <div class=graphicitem style="width: 10.81081081081081%">
+                      <div class=graphicitem style="width: 10.8108108108%">
                         <div>56</div>
                       </div>
-                      <div class=graphicitem style="width: 10.81081081081081%">
+                      <div class=graphicitem style="width: 10.8108108108%">
                         <div>64</div>
                       </div>
-                      <div class=graphicitem style="width: 10.81081081081081%">
+                      <div class=graphicitem style="width: 10.8108108108%">
                         <div>72</div>
                       </div>
-                      <div class=graphicitem style="width: 2.7027027027027026%">
+                      <div class=graphicitem style="width: 2.7027027027%">
                         <div>&nbsp;</div>
                         <div class=lastlabel>74</div>
                       </div>
@@ -3231,7 +3231,7 @@
                    title="AY326434|GenBank|insert_MON810|Synthetic_construct_truncated_CRYIA(b)_(cryIA(b))_gene,_partial_CDS|-2635190737607180000">
                   <div class="matchrow graphicrow">
                     <div class="matchitem graphicitem"
-                         style="background-color: green; width: 100.0%"></div>
+                         style="background-color: green; width: 100%"></div>
                   </div>
                 </a>
 
@@ -3379,34 +3379,34 @@
                   <div>query:</div>
                   <div class=graphicrow>
                     <div>
-                      <div class=graphicitem style="width: 10.81081081081081%">
+                      <div class=graphicitem style="width: 10.8108108108%">
                         <div>8</div>
                       </div>
-                      <div class=graphicitem style="width: 10.81081081081081%">
+                      <div class=graphicitem style="width: 10.8108108108%">
                         <div>16</div>
                       </div>
-                      <div class=graphicitem style="width: 10.81081081081081%">
+                      <div class=graphicitem style="width: 10.8108108108%">
                         <div>24</div>
                       </div>
-                      <div class=graphicitem style="width: 10.81081081081081%">
+                      <div class=graphicitem style="width: 10.8108108108%">
                         <div>32</div>
                       </div>
-                      <div class=graphicitem style="width: 10.81081081081081%">
+                      <div class=graphicitem style="width: 10.8108108108%">
                         <div>40</div>
                       </div>
-                      <div class=graphicitem style="width: 10.81081081081081%">
+                      <div class=graphicitem style="width: 10.8108108108%">
                         <div>48</div>
                       </div>
-                      <div class=graphicitem style="width: 10.81081081081081%">
+                      <div class=graphicitem style="width: 10.8108108108%">
                         <div>56</div>
                       </div>
-                      <div class=graphicitem style="width: 10.81081081081081%">
+                      <div class=graphicitem style="width: 10.8108108108%">
                         <div>64</div>
                       </div>
-                      <div class=graphicitem style="width: 10.81081081081081%">
+                      <div class=graphicitem style="width: 10.8108108108%">
                         <div>72</div>
                       </div>
-                      <div class=graphicitem style="width: 2.7027027027027026%">
+                      <div class=graphicitem style="width: 2.7027027027%">
                         <div>&nbsp;</div>
                         <div class=lastlabel>74</div>
                       </div>
@@ -3422,7 +3422,7 @@
                    title="EUG|RIKILT|plasmid_pV-ZMBK07|plasmid_pV-ZMBK07|-2635190737607180000">
                   <div class="matchrow graphicrow">
                     <div class="matchitem graphicitem"
-                         style="background-color: green; width: 100.0%"></div>
+                         style="background-color: green; width: 100%"></div>
                   </div>
                 </a>
 
--- 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 @@
                   <div>query:</div>
                   <div class=graphicrow>
                     <div>
-                      <div class=graphicitem style="width: 10.0%">
+                      <div class=graphicitem style="width: 10%">
                         <div>2</div>
                       </div>
-                      <div class=graphicitem style="width: 10.0%">
+                      <div class=graphicitem style="width: 10%">
                         <div>4</div>
                       </div>
-                      <div class=graphicitem style="width: 10.0%">
+                      <div class=graphicitem style="width: 10%">
                         <div>6</div>
                       </div>
-                      <div class=graphicitem style="width: 10.0%">
+                      <div class=graphicitem style="width: 10%">
                         <div>8</div>
                       </div>
-                      <div class=graphicitem style="width: 10.0%">
+                      <div class=graphicitem style="width: 10%">
                         <div>10</div>
                       </div>
-                      <div class=graphicitem style="width: 10.0%">
+                      <div class=graphicitem style="width: 10%">
                         <div>12</div>
                       </div>
-                      <div class=graphicitem style="width: 10.0%">
+                      <div class=graphicitem style="width: 10%">
                         <div>14</div>
                       </div>
-                      <div class=graphicitem style="width: 10.0%">
+                      <div class=graphicitem style="width: 10%">
                         <div>16</div>
                       </div>
-                      <div class=graphicitem style="width: 10.0%">
+                      <div class=graphicitem style="width: 10%">
                         <div>18</div>
                       </div>
-                      <div class=graphicitem style="width: 10.0%">
+                      <div class=graphicitem style="width: 10%">
                         <div>20</div>
                       </div>
                     </div>
@@ -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">
                   <div class="matchrow graphicrow">
                     <div class="matchitem graphicitem"
-                         style="background-color: black; width: 100.0%"></div>
+                         style="background-color: black; width: 100%"></div>
                   </div>
                 </a>
 
@@ -518,7 +518,7 @@
                    title="DJ437711|GenBank|insert_MIR604|Corn_Event_MIR604,_Left_Border_region|-5751164067366620000">
                   <div class="matchrow graphicrow">
                     <div class="matchitem graphicitem"
-                         style="background-color: black; width: 100.0%"></div>
+                         style="background-color: black; width: 100%"></div>
                   </div>
                 </a>
 
@@ -747,34 +747,34 @@
                   <div>query:</div>
                   <div class=graphicrow>
                     <div>
-                      <div class=graphicitem style="width: 10.0%">
+                      <div class=graphicitem style="width: 10%">
                         <div>2</div>
                       </div>
-                      <div class=graphicitem style="width: 10.0%">
+                      <div class=graphicitem style="width: 10%">
                         <div>4</div>
                       </div>
-                      <div class=graphicitem style="width: 10.0%">
+                      <div class=graphicitem style="width: 10%">
                         <div>6</div>
                       </div>
-                      <div class=graphicitem style="width: 10.0%">
+                      <div class=graphicitem style="width: 10%">
                         <div>8</div>
                       </div>
-                      <div class=graphicitem style="width: 10.0%">
+                      <div class=graphicitem style="width: 10%">
                         <div>10</div>
                       </div>
-                      <div class=graphicitem style="width: 10.0%">
+                      <div class=graphicitem style="width: 10%">
                         <div>12</div>
                       </div>
-                      <div class=graphicitem style="width: 10.0%">
+                      <div class=graphicitem style="width: 10%">
                         <div>14</div>
                       </div>
-                      <div class=graphicitem style="width: 10.0%">
+                      <div class=graphicitem style="width: 10%">
                         <div>16</div>
                       </div>
-                      <div class=graphicitem style="width: 10.0%">
+                      <div class=graphicitem style="width: 10%">
                         <div>18</div>
                       </div>
-                      <div class=graphicitem style="width: 10.0%">
+                      <div class=graphicitem style="width: 10%">
                         <div>20</div>
                       </div>
                     </div>
@@ -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">
                   <div class="matchrow graphicrow">
                     <div class="matchitem graphicitem"
-                         style="background-color: black; width: 100.0%"></div>
+                         style="background-color: black; width: 100%"></div>
                   </div>
                 </a>
 
@@ -800,7 +800,7 @@
                    title="DJ437711|GenBank|insert_MIR604|Corn_Event_MIR604,_Left_Border_region|-5751164067366620000">
                   <div class="matchrow graphicrow">
                     <div class="matchitem graphicitem"
-                         style="background-color: black; width: 100.0%"></div>
+                         style="background-color: black; width: 100%"></div>
                   </div>
                 </a>
 
@@ -811,9 +811,9 @@
                    title="AJ308515.1|GenBank|insert_GTS-40-3-2|Synthetic_construct_for_NOS_3&#39;UTR/plant_junction_region.|-9105899556052450000">
                   <div class="matchrow graphicrow">
                     <div class="matchitem graphicitem"
-                         style="background-color: transparent; width: 15.0%"></div>
+                         style="background-color: transparent; width: 15%"></div>
                     <div class="matchitem graphicitem"
-                         style="background-color: black; width: 85.0%"></div>
+                         style="background-color: black; width: 85%"></div>
                   </div>
                 </a>
 
@@ -1126,31 +1126,31 @@
                   <div>query:</div>
                   <div class=graphicrow>
                     <div>
-                      <div class=graphicitem style="width: 12.0%">
+                      <div class=graphicitem style="width: 12%">
                         <div>3</div>
                       </div>
-                      <div class=graphicitem style="width: 12.0%">
+                      <div class=graphicitem style="width: 12%">
                         <div>6</div>
                       </div>
-                      <div class=graphicitem style="width: 12.0%">
+                      <div class=graphicitem style="width: 12%">
                         <div>9</div>
                       </div>
-                      <div class=graphicitem style="width: 12.0%">
+                      <div class=graphicitem style="width: 12%">
                         <div>12</div>
                       </div>
-                      <div class=graphicitem style="width: 12.0%">
+                      <div class=graphicitem style="width: 12%">
                         <div>15</div>
                       </div>
-                      <div class=graphicitem style="width: 12.0%">
+                      <div class=graphicitem style="width: 12%">
                         <div>18</div>
                       </div>
-                      <div class=graphicitem style="width: 12.0%">
+                      <div class=graphicitem style="width: 12%">
                         <div>21</div>
                       </div>
-                      <div class=graphicitem style="width: 12.0%">
+                      <div class=graphicitem style="width: 12%">
                         <div>24</div>
                       </div>
-                      <div class=graphicitem style="width: 4.0%">
+                      <div class=graphicitem style="width: 4%">
                         <div>25</div>
                       </div>
                     </div>
@@ -1165,9 +1165,9 @@
                    title="EUG|RIKILT|plasmid_pV-ZMBK07|plasmid_pV-ZMBK07|-2635190737607180000">
                   <div class="matchrow graphicrow">
                     <div class="matchitem graphicitem"
-                         style="background-color: black; width: 88.0%"></div>
+                         style="background-color: black; width: 88%"></div>
                     <div class="matchitem graphicitem"
-                         style="background-color: transparent; width: 12.0%"></div>
+                         style="background-color: transparent; width: 12%"></div>
                   </div>
                 </a>
 
@@ -1178,9 +1178,9 @@
                    title="AY326434|GenBank|insert_MON810|Synthetic_construct_truncated_CRYIA(b)_(cryIA(b))_gene,_partial_CDS|-2635190737607180000">
                   <div class="matchrow graphicrow">
                     <div class="matchitem graphicitem"
-                         style="background-color: black; width: 88.0%"></div>
+                         style="background-color: black; width: 88%"></div>
                     <div class="matchitem graphicitem"
-                         style="background-color: transparent; width: 12.0%"></div>
+                         style="background-color: transparent; width: 12%"></div>
                   </div>
                 </a>
 
@@ -1383,34 +1383,34 @@
                   <div>query:</div>
                   <div class=graphicrow>
                     <div>
-                      <div class=graphicitem style="width: 10.81081081081081%">
+                      <div class=graphicitem style="width: 10.8108108108%">
                         <div>8</div>
                       </div>
-                      <div class=graphicitem style="width: 10.81081081081081%">
+                      <div class=graphicitem style="width: 10.8108108108%">
                         <div>16</div>
                       </div>
-                      <div class=graphicitem style="width: 10.81081081081081%">
+                      <div class=graphicitem style="width: 10.8108108108%">
                         <div>24</div>
                       </div>
-                      <div class=graphicitem style="width: 10.81081081081081%">
+                      <div class=graphicitem style="width: 10.8108108108%">
                         <div>32</div>
                       </div>
-                      <div class=graphicitem style="width: 10.81081081081081%">
+                      <div class=graphicitem style="width: 10.8108108108%">
                         <div>40</div>
                       </div>
-                      <div class=graphicitem style="width: 10.81081081081081%">
+                      <div class=graphicitem style="width: 10.8108108108%">
                         <div>48</div>
                       </div>
-                      <div class=graphicitem style="width: 10.81081081081081%">
+                      <div class=graphicitem style="width: 10.8108108108%">
                         <div>56</div>
                       </div>
-                      <div class=graphicitem style="width: 10.81081081081081%">
+                      <div class=graphicitem style="width: 10.8108108108%">
                         <div>64</div>
                       </div>
-                      <div class=graphicitem style="width: 10.81081081081081%">
+                      <div class=graphicitem style="width: 10.8108108108%">
                         <div>72</div>
                       </div>
-                      <div class=graphicitem style="width: 2.7027027027027026%">
+                      <div class=graphicitem style="width: 2.7027027027%">
                         <div>&nbsp;</div>
                         <div class=lastlabel>74</div>
                       </div>
@@ -1426,7 +1426,7 @@
                    title="EUG|RIKILT|plasmid_pV-ZMBK07|plasmid_pV-ZMBK07|-2635190737607180000">
                   <div class="matchrow graphicrow">
                     <div class="matchitem graphicitem"
-                         style="background-color: green; width: 100.0%"></div>
+                         style="background-color: green; width: 100%"></div>
                   </div>
                 </a>
 
@@ -1437,7 +1437,7 @@
                    title="AY326434|GenBank|insert_MON810|Synthetic_construct_truncated_CRYIA(b)_(cryIA(b))_gene,_partial_CDS|-2635190737607180000">
                   <div class="matchrow graphicrow">
                     <div class="matchitem graphicitem"
-                         style="background-color: green; width: 100.0%"></div>
+                         style="background-color: green; width: 100%"></div>
                   </div>
                 </a>
 
--- 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