changeset 108:b3b5ee557170 draft

update test
author Jan Kanis <jan.code@jankanis.nl>
date Mon, 07 Jul 2014 11:42:43 +0200
parents a22c909c9b57
children ed71448ee154
files blast2html.py blast2html.xml test-data/blast xml example3.html test-data/blast xml example4.html test-data/refresh_test_results.sh
diffstat 5 files changed, 73 insertions(+), 68 deletions(-) [+]
line wrap: on
line diff
--- a/blast2html.py	Mon Jul 07 11:29:10 2014 +0200
+++ b/blast2html.py	Mon Jul 07 11:42:43 2014 +0200
@@ -409,7 +409,7 @@
     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="{0} [-i] INPUT [-o OUTPUT]".format(sys.argv[0]))
+                                     usage="{0} [-i] INPUT [-o OUTPUT] [--genelink-template URL_TEMPLATE]".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')
@@ -426,7 +426,8 @@
                         help='The template file to use. Defaults to blast_html.html.jinja')
     
     dblink_group = parser.add_mutually_exclusive_group()
-    dblink_group.add_argument('--genelink-template', default='http://www.ncbi.nlm.nih.gov/nucleotide/{accession}?report=genbank&log$=nuclalign',
+    dblink_group.add_argument('--genelink-template', metavar='URL_TEMPLATE',
+                              default='http://www.ncbi.nlm.nih.gov/nucleotide/{accession}?report=genbank&log$=nuclalign',
                               help="""A link template to link hits to a gene bank webpage. The template string is a 
                               Python format string. It can contain the following replacement elements: {id[N]}, {fullid}, 
                               {defline[N]}, {fulldefline}, {accession}, where N is a number. id[N] and defline[N] will be 
@@ -451,14 +452,15 @@
 
     if six.PY2:
         # The argparse.FileType wrapper doesn't support an encoding
-        # argument or such, so for python 2 we need to wrap or reopen
-        # the output. The input files are already read as utf-8 by the
+        # argument, so for python 2 we need to wrap or reopen the
+        # output. The input files are already read as utf-8 by the
         # respective libraries.
 
         # One option is using codecs, but the codecs' writelines()
         # method doesn't support streaming but collects all output and
-        # writes at once. On the other hand the io module is slower
-        # (though not significantly).
+        # writes at once (see Python issues #5445 and #21910). On the
+        # other hand the io module is slower (though not
+        # significantly).
 
         # args.output = codecs.getwriter('utf-8')(args.output)
         args.output = io.open(args.output.name, 'w')
--- a/blast2html.xml	Mon Jul 07 11:29:10 2014 +0200
+++ b/blast2html.xml	Mon Jul 07 11:42:43 2014 +0200
@@ -25,19 +25,19 @@
     <tests>
         <test>
             <param name="input" value="blast xml example1.xml"/>
-            <output name="out_file1" file="blast xml example1.html"/>
+            <output name="output" file="blast xml example1.html"/>
         </test>
         <test>
             <param name="input" value="blast xml example2.xml"/>
-            <output name="out_file1" file="blast xml example2.html"/>
+            <output name="output" file="blast xml example2.html"/>
         </test>
         <test>
             <param name="input" value="blast xml example3.xml"/>
-            <output name="out_file1" file="blast xml example3.html"/>
+            <output name="output" file="blast xml example3.html"/>
         </test>
         <test>
             <param name="input" value="blast xml example4.xml"/>
-            <output name="out_file1" file="blast xml example4.html"/>
+            <output name="output" file="blast xml example4.html"/>
         </test>
     </tests>
     
--- a/test-data/blast xml example3.html	Mon Jul 07 11:29:10 2014 +0200
+++ b/test-data/blast xml example3.html	Mon Jul 07 11:42:43 2014 +0200
@@ -794,7 +794,7 @@
                   <td>100%</td>
                   <td>7.011e-08</td>
                   <td>100%</td>
-                  <td><a href="http://example.com/example-genebank?id=Subject_3">Subject_3</a></td>
+                  <td><a href="http://www.ncbi.nlm.nih.gov/nucleotide/Subject_3?report=genbank&amp;log$=nuclalign">Subject_3</a></td>
                 </tr>
               </table>
 
@@ -811,13 +811,13 @@
 
                 <div class=linkheader>
                   <div class=right><a href="#description3-1">Descriptions</a></div>
-                  <a class="linkheader" href="http://example.com/example-genebank?id=Subject_3">Gene Bank</a>
+                  <a class="linkheader" href="http://www.ncbi.nlm.nih.gov/nucleotide/Subject_3?report=genbank&amp;log$=nuclalign">Gene Bank</a>
                 </div>
 
                 <div class=title>
                   <p class=hittitle>DJ437711|GenBank|insert_MIR604|Corn_Event_MIR604,_Left_Border_region|-5751164067366620000</p>
                   <p class=titleinfo>
-                    <span class=b>Sequence ID:</span> <a href="http://example.com/example-genebank?id=Subject_3">Subject_3</a>
+                    <span class=b>Sequence ID:</span> <a href="http://www.ncbi.nlm.nih.gov/nucleotide/Subject_3?report=genbank&amp;log$=nuclalign">Subject_3</a>
                     <span class=b>Length:</span> 323
                     <span class=b>Number of Matches:</span> 1
                   </p>
@@ -1030,7 +1030,7 @@
                   <td>100%</td>
                   <td>7.011e-08</td>
                   <td>100%</td>
-                  <td><a href="http://example.com/example-genebank?id=Subject_6">Subject_6</a></td>
+                  <td><a href="http://www.ncbi.nlm.nih.gov/nucleotide/Subject_6?report=genbank&amp;log$=nuclalign">Subject_6</a></td>
                 </tr>
               </table>
 
@@ -1047,13 +1047,13 @@
 
                 <div class=linkheader>
                   <div class=right><a href="#description6-1">Descriptions</a></div>
-                  <a class="linkheader" href="http://example.com/example-genebank?id=Subject_6">Gene Bank</a>
+                  <a class="linkheader" href="http://www.ncbi.nlm.nih.gov/nucleotide/Subject_6?report=genbank&amp;log$=nuclalign">Gene Bank</a>
                 </div>
 
                 <div class=title>
                   <p class=hittitle>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</p>
                   <p class=titleinfo>
-                    <span class=b>Sequence ID:</span> <a href="http://example.com/example-genebank?id=Subject_6">Subject_6</a>
+                    <span class=b>Sequence ID:</span> <a href="http://www.ncbi.nlm.nih.gov/nucleotide/Subject_6?report=genbank&amp;log$=nuclalign">Subject_6</a>
                     <span class=b>Length:</span> 2457
                     <span class=b>Number of Matches:</span> 1
                   </p>
@@ -1502,7 +1502,7 @@
                   <td>85%</td>
                   <td>2.981e-06</td>
                   <td>100%</td>
-                  <td><a href="http://example.com/example-genebank?id=Subject_2">Subject_2</a></td>
+                  <td><a href="http://www.ncbi.nlm.nih.gov/nucleotide/Subject_2?report=genbank&amp;log$=nuclalign">Subject_2</a></td>
                 </tr>
               </table>
 
@@ -1519,13 +1519,13 @@
 
                 <div class=linkheader>
                   <div class=right><a href="#description18-1">Descriptions</a></div>
-                  <a class="linkheader" href="http://example.com/example-genebank?id=Subject_2">Gene Bank</a>
+                  <a class="linkheader" href="http://www.ncbi.nlm.nih.gov/nucleotide/Subject_2?report=genbank&amp;log$=nuclalign">Gene Bank</a>
                 </div>
 
                 <div class=title>
                   <p class=hittitle>AJ308515.1|GenBank|insert_GTS-40-3-2|Synthetic_construct_for_NOS_3&#39;UTR/plant_junction_region.|-9105899556052450000</p>
                   <p class=titleinfo>
-                    <span class=b>Sequence ID:</span> <a href="http://example.com/example-genebank?id=Subject_2">Subject_2</a>
+                    <span class=b>Sequence ID:</span> <a href="http://www.ncbi.nlm.nih.gov/nucleotide/Subject_2?report=genbank&amp;log$=nuclalign">Subject_2</a>
                     <span class=b>Length:</span> 1045
                     <span class=b>Number of Matches:</span> 1
                   </p>
@@ -1686,7 +1686,7 @@
                   <td>100%</td>
                   <td>7.011e-08</td>
                   <td>100%</td>
-                  <td><a href="http://example.com/example-genebank?id=Subject_3">Subject_3</a></td>
+                  <td><a href="http://www.ncbi.nlm.nih.gov/nucleotide/Subject_3?report=genbank&amp;log$=nuclalign">Subject_3</a></td>
                 </tr>
               </table>
 
@@ -1703,13 +1703,13 @@
 
                 <div class=linkheader>
                   <div class=right><a href="#description19-1">Descriptions</a></div>
-                  <a class="linkheader" href="http://example.com/example-genebank?id=Subject_3">Gene Bank</a>
+                  <a class="linkheader" href="http://www.ncbi.nlm.nih.gov/nucleotide/Subject_3?report=genbank&amp;log$=nuclalign">Gene Bank</a>
                 </div>
 
                 <div class=title>
                   <p class=hittitle>DJ437711|GenBank|insert_MIR604|Corn_Event_MIR604,_Left_Border_region|-5751164067366620000</p>
                   <p class=titleinfo>
-                    <span class=b>Sequence ID:</span> <a href="http://example.com/example-genebank?id=Subject_3">Subject_3</a>
+                    <span class=b>Sequence ID:</span> <a href="http://www.ncbi.nlm.nih.gov/nucleotide/Subject_3?report=genbank&amp;log$=nuclalign">Subject_3</a>
                     <span class=b>Length:</span> 323
                     <span class=b>Number of Matches:</span> 1
                   </p>
@@ -1922,7 +1922,7 @@
                   <td>100%</td>
                   <td>7.011e-08</td>
                   <td>100%</td>
-                  <td><a href="http://example.com/example-genebank?id=Subject_6">Subject_6</a></td>
+                  <td><a href="http://www.ncbi.nlm.nih.gov/nucleotide/Subject_6?report=genbank&amp;log$=nuclalign">Subject_6</a></td>
                 </tr>
               </table>
 
@@ -1939,13 +1939,13 @@
 
                 <div class=linkheader>
                   <div class=right><a href="#description22-1">Descriptions</a></div>
-                  <a class="linkheader" href="http://example.com/example-genebank?id=Subject_6">Gene Bank</a>
+                  <a class="linkheader" href="http://www.ncbi.nlm.nih.gov/nucleotide/Subject_6?report=genbank&amp;log$=nuclalign">Gene Bank</a>
                 </div>
 
                 <div class=title>
                   <p class=hittitle>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</p>
                   <p class=titleinfo>
-                    <span class=b>Sequence ID:</span> <a href="http://example.com/example-genebank?id=Subject_6">Subject_6</a>
+                    <span class=b>Sequence ID:</span> <a href="http://www.ncbi.nlm.nih.gov/nucleotide/Subject_6?report=genbank&amp;log$=nuclalign">Subject_6</a>
                     <span class=b>Length:</span> 2457
                     <span class=b>Number of Matches:</span> 1
                   </p>
@@ -2727,7 +2727,7 @@
                   <td>100%</td>
                   <td>9.338e-08</td>
                   <td>92%</td>
-                  <td><a href="http://example.com/example-genebank?id=Subject_7">Subject_7</a></td>
+                  <td><a href="http://www.ncbi.nlm.nih.gov/nucleotide/Subject_7?report=genbank&amp;log$=nuclalign">Subject_7</a></td>
                 </tr>
               </table>
 
@@ -2744,13 +2744,13 @@
 
                 <div class=linkheader>
                   <div class=right><a href="#description47-1">Descriptions</a></div>
-                  <a class="linkheader" href="http://example.com/example-genebank?id=Subject_7">Gene Bank</a>
+                  <a class="linkheader" href="http://www.ncbi.nlm.nih.gov/nucleotide/Subject_7?report=genbank&amp;log$=nuclalign">Gene Bank</a>
                 </div>
 
                 <div class=title>
                   <p class=hittitle>AY326434|GenBank|insert_MON810|Synthetic_construct_truncated_CRYIA(b)_(cryIA(b))_gene,_partial_CDS|-2635190737607180000</p>
                   <p class=titleinfo>
-                    <span class=b>Sequence ID:</span> <a href="http://example.com/example-genebank?id=Subject_7">Subject_7</a>
+                    <span class=b>Sequence ID:</span> <a href="http://www.ncbi.nlm.nih.gov/nucleotide/Subject_7?report=genbank&amp;log$=nuclalign">Subject_7</a>
                     <span class=b>Length:</span> 4180
                     <span class=b>Number of Matches:</span> 1
                   </p>
@@ -2908,7 +2908,7 @@
                   <td>100%</td>
                   <td>9.338e-08</td>
                   <td>92%</td>
-                  <td><a href="http://example.com/example-genebank?id=Subject_8">Subject_8</a></td>
+                  <td><a href="http://www.ncbi.nlm.nih.gov/nucleotide/Subject_8?report=genbank&amp;log$=nuclalign">Subject_8</a></td>
                 </tr>
               </table>
 
@@ -2925,13 +2925,13 @@
 
                 <div class=linkheader>
                   <div class=right><a href="#description48-1">Descriptions</a></div>
-                  <a class="linkheader" href="http://example.com/example-genebank?id=Subject_8">Gene Bank</a>
+                  <a class="linkheader" href="http://www.ncbi.nlm.nih.gov/nucleotide/Subject_8?report=genbank&amp;log$=nuclalign">Gene Bank</a>
                 </div>
 
                 <div class=title>
                   <p class=hittitle>EUG|RIKILT|plasmid_pV-ZMBK07|plasmid_pV-ZMBK07|-2635190737607180000</p>
                   <p class=titleinfo>
-                    <span class=b>Sequence ID:</span> <a href="http://example.com/example-genebank?id=Subject_8">Subject_8</a>
+                    <span class=b>Sequence ID:</span> <a href="http://www.ncbi.nlm.nih.gov/nucleotide/Subject_8?report=genbank&amp;log$=nuclalign">Subject_8</a>
                     <span class=b>Length:</span> 4983
                     <span class=b>Number of Matches:</span> 1
                   </p>
@@ -3249,7 +3249,7 @@
                   <td>100%</td>
                   <td>6.629e-23</td>
                   <td>86%</td>
-                  <td><a href="http://example.com/example-genebank?id=Subject_7">Subject_7</a></td>
+                  <td><a href="http://www.ncbi.nlm.nih.gov/nucleotide/Subject_7?report=genbank&amp;log$=nuclalign">Subject_7</a></td>
                 </tr>
               </table>
 
@@ -3266,13 +3266,13 @@
 
                 <div class=linkheader>
                   <div class=right><a href="#description55-1">Descriptions</a></div>
-                  <a class="linkheader" href="http://example.com/example-genebank?id=Subject_7">Gene Bank</a>
+                  <a class="linkheader" href="http://www.ncbi.nlm.nih.gov/nucleotide/Subject_7?report=genbank&amp;log$=nuclalign">Gene Bank</a>
                 </div>
 
                 <div class=title>
                   <p class=hittitle>AY326434|GenBank|insert_MON810|Synthetic_construct_truncated_CRYIA(b)_(cryIA(b))_gene,_partial_CDS|-2635190737607180000</p>
                   <p class=titleinfo>
-                    <span class=b>Sequence ID:</span> <a href="http://example.com/example-genebank?id=Subject_7">Subject_7</a>
+                    <span class=b>Sequence ID:</span> <a href="http://www.ncbi.nlm.nih.gov/nucleotide/Subject_7?report=genbank&amp;log$=nuclalign">Subject_7</a>
                     <span class=b>Length:</span> 4180
                     <span class=b>Number of Matches:</span> 1
                   </p>
@@ -3437,7 +3437,7 @@
                   <td>100%</td>
                   <td>6.629e-23</td>
                   <td>86%</td>
-                  <td><a href="http://example.com/example-genebank?id=Subject_8">Subject_8</a></td>
+                  <td><a href="http://www.ncbi.nlm.nih.gov/nucleotide/Subject_8?report=genbank&amp;log$=nuclalign">Subject_8</a></td>
                 </tr>
               </table>
 
@@ -3454,13 +3454,13 @@
 
                 <div class=linkheader>
                   <div class=right><a href="#description56-1">Descriptions</a></div>
-                  <a class="linkheader" href="http://example.com/example-genebank?id=Subject_8">Gene Bank</a>
+                  <a class="linkheader" href="http://www.ncbi.nlm.nih.gov/nucleotide/Subject_8?report=genbank&amp;log$=nuclalign">Gene Bank</a>
                 </div>
 
                 <div class=title>
                   <p class=hittitle>EUG|RIKILT|plasmid_pV-ZMBK07|plasmid_pV-ZMBK07|-2635190737607180000</p>
                   <p class=titleinfo>
-                    <span class=b>Sequence ID:</span> <a href="http://example.com/example-genebank?id=Subject_8">Subject_8</a>
+                    <span class=b>Sequence ID:</span> <a href="http://www.ncbi.nlm.nih.gov/nucleotide/Subject_8?report=genbank&amp;log$=nuclalign">Subject_8</a>
                     <span class=b>Length:</span> 4983
                     <span class=b>Number of Matches:</span> 1
                   </p>
--- a/test-data/blast xml example4.html	Mon Jul 07 11:29:10 2014 +0200
+++ b/test-data/blast xml example4.html	Mon Jul 07 11:42:43 2014 +0200
@@ -557,7 +557,7 @@
                   <td>100%</td>
                   <td>1.513e-07</td>
                   <td>100%</td>
-                  <td><a href="http://example.com/example-genebank/AB209952.1/">5</a></td>
+                  <td><a href="http://www.ncbi.nlm.nih.gov/nucleotide/5?report=genbank&amp;log$=nuclalign">5</a></td>
                 </tr>
                 <tr>
                   <td><div><a href="#hit1-2"
@@ -570,7 +570,7 @@
                   <td>100%</td>
                   <td>1.513e-07</td>
                   <td>100%</td>
-                  <td><a href="http://example.com/example-genebank/DJ437711/">2</a></td>
+                  <td><a href="http://www.ncbi.nlm.nih.gov/nucleotide/2?report=genbank&amp;log$=nuclalign">2</a></td>
                 </tr>
               </table>
 
@@ -587,13 +587,13 @@
 
                 <div class=linkheader>
                   <div class=right><a href="#description1-1">Descriptions</a></div>
-                  <a class="linkheader" href="http://example.com/example-genebank/AB209952.1/">Gene Bank</a>
+                  <a class="linkheader" href="http://www.ncbi.nlm.nih.gov/nucleotide/5?report=genbank&amp;log$=nuclalign">Gene Bank</a>
                 </div>
 
                 <div class=title>
                   <p class=hittitle>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</p>
                   <p class=titleinfo>
-                    <span class=b>Sequence ID:</span> <a href="http://example.com/example-genebank/AB209952.1/">gnl|BL_ORD_ID|5</a>
+                    <span class=b>Sequence ID:</span> <a href="http://www.ncbi.nlm.nih.gov/nucleotide/5?report=genbank&amp;log$=nuclalign">gnl|BL_ORD_ID|5</a>
                     <span class=b>Length:</span> 2457
                     <span class=b>Number of Matches:</span> 1
                   </p>
@@ -629,13 +629,13 @@
 
                 <div class=linkheader>
                   <div class=right><a href="#description1-2">Descriptions</a></div>
-                  <a class="linkheader" href="http://example.com/example-genebank/DJ437711/">Gene Bank</a>
+                  <a class="linkheader" href="http://www.ncbi.nlm.nih.gov/nucleotide/2?report=genbank&amp;log$=nuclalign">Gene Bank</a>
                 </div>
 
                 <div class=title>
                   <p class=hittitle>DJ437711|GenBank|insert_MIR604|Corn_Event_MIR604,_Left_Border_region|-5751164067366620000</p>
                   <p class=titleinfo>
-                    <span class=b>Sequence ID:</span> <a href="http://example.com/example-genebank/DJ437711/">gnl|BL_ORD_ID|2</a>
+                    <span class=b>Sequence ID:</span> <a href="http://www.ncbi.nlm.nih.gov/nucleotide/2?report=genbank&amp;log$=nuclalign">gnl|BL_ORD_ID|2</a>
                     <span class=b>Length:</span> 323
                     <span class=b>Number of Matches:</span> 1
                   </p>
@@ -846,7 +846,7 @@
                   <td>100%</td>
                   <td>1.513e-07</td>
                   <td>100%</td>
-                  <td><a href="http://example.com/example-genebank/AB209952.1/">5</a></td>
+                  <td><a href="http://www.ncbi.nlm.nih.gov/nucleotide/5?report=genbank&amp;log$=nuclalign">5</a></td>
                 </tr>
                 <tr>
                   <td><div><a href="#hit3-2"
@@ -859,7 +859,7 @@
                   <td>100%</td>
                   <td>1.513e-07</td>
                   <td>100%</td>
-                  <td><a href="http://example.com/example-genebank/DJ437711/">2</a></td>
+                  <td><a href="http://www.ncbi.nlm.nih.gov/nucleotide/2?report=genbank&amp;log$=nuclalign">2</a></td>
                 </tr>
                 <tr>
                   <td><div><a href="#hit3-3"
@@ -872,7 +872,7 @@
                   <td>85%</td>
                   <td>9.334e-06</td>
                   <td>100%</td>
-                  <td><a href="http://example.com/example-genebank/AJ308515.1/">1</a></td>
+                  <td><a href="http://www.ncbi.nlm.nih.gov/nucleotide/1?report=genbank&amp;log$=nuclalign">1</a></td>
                 </tr>
               </table>
 
@@ -889,13 +889,13 @@
 
                 <div class=linkheader>
                   <div class=right><a href="#description3-1">Descriptions</a></div>
-                  <a class="linkheader" href="http://example.com/example-genebank/AB209952.1/">Gene Bank</a>
+                  <a class="linkheader" href="http://www.ncbi.nlm.nih.gov/nucleotide/5?report=genbank&amp;log$=nuclalign">Gene Bank</a>
                 </div>
 
                 <div class=title>
                   <p class=hittitle>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</p>
                   <p class=titleinfo>
-                    <span class=b>Sequence ID:</span> <a href="http://example.com/example-genebank/AB209952.1/">gnl|BL_ORD_ID|5</a>
+                    <span class=b>Sequence ID:</span> <a href="http://www.ncbi.nlm.nih.gov/nucleotide/5?report=genbank&amp;log$=nuclalign">gnl|BL_ORD_ID|5</a>
                     <span class=b>Length:</span> 2457
                     <span class=b>Number of Matches:</span> 1
                   </p>
@@ -931,13 +931,13 @@
 
                 <div class=linkheader>
                   <div class=right><a href="#description3-2">Descriptions</a></div>
-                  <a class="linkheader" href="http://example.com/example-genebank/DJ437711/">Gene Bank</a>
+                  <a class="linkheader" href="http://www.ncbi.nlm.nih.gov/nucleotide/2?report=genbank&amp;log$=nuclalign">Gene Bank</a>
                 </div>
 
                 <div class=title>
                   <p class=hittitle>DJ437711|GenBank|insert_MIR604|Corn_Event_MIR604,_Left_Border_region|-5751164067366620000</p>
                   <p class=titleinfo>
-                    <span class=b>Sequence ID:</span> <a href="http://example.com/example-genebank/DJ437711/">gnl|BL_ORD_ID|2</a>
+                    <span class=b>Sequence ID:</span> <a href="http://www.ncbi.nlm.nih.gov/nucleotide/2?report=genbank&amp;log$=nuclalign">gnl|BL_ORD_ID|2</a>
                     <span class=b>Length:</span> 323
                     <span class=b>Number of Matches:</span> 1
                   </p>
@@ -973,13 +973,13 @@
 
                 <div class=linkheader>
                   <div class=right><a href="#description3-3">Descriptions</a></div>
-                  <a class="linkheader" href="http://example.com/example-genebank/AJ308515.1/">Gene Bank</a>
+                  <a class="linkheader" href="http://www.ncbi.nlm.nih.gov/nucleotide/1?report=genbank&amp;log$=nuclalign">Gene Bank</a>
                 </div>
 
                 <div class=title>
                   <p class=hittitle>AJ308515.1|GenBank|insert_GTS-40-3-2|Synthetic_construct_for_NOS_3&#39;UTR/plant_junction_region.|-9105899556052450000</p>
                   <p class=titleinfo>
-                    <span class=b>Sequence ID:</span> <a href="http://example.com/example-genebank/AJ308515.1/">gnl|BL_ORD_ID|1</a>
+                    <span class=b>Sequence ID:</span> <a href="http://www.ncbi.nlm.nih.gov/nucleotide/1?report=genbank&amp;log$=nuclalign">gnl|BL_ORD_ID|1</a>
                     <span class=b>Length:</span> 1045
                     <span class=b>Number of Matches:</span> 1
                   </p>
@@ -1204,7 +1204,7 @@
                   <td>88%</td>
                   <td>3.148e-06</td>
                   <td>95%</td>
-                  <td><a href="http://example.com/example-genebank/EUG/">7</a></td>
+                  <td><a href="http://www.ncbi.nlm.nih.gov/nucleotide/7?report=genbank&amp;log$=nuclalign">7</a></td>
                 </tr>
                 <tr>
                   <td><div><a href="#hit6-2"
@@ -1217,7 +1217,7 @@
                   <td>88%</td>
                   <td>3.148e-06</td>
                   <td>95%</td>
-                  <td><a href="http://example.com/example-genebank/AY326434/">6</a></td>
+                  <td><a href="http://www.ncbi.nlm.nih.gov/nucleotide/6?report=genbank&amp;log$=nuclalign">6</a></td>
                 </tr>
               </table>
 
@@ -1234,13 +1234,13 @@
 
                 <div class=linkheader>
                   <div class=right><a href="#description6-1">Descriptions</a></div>
-                  <a class="linkheader" href="http://example.com/example-genebank/EUG/">Gene Bank</a>
+                  <a class="linkheader" href="http://www.ncbi.nlm.nih.gov/nucleotide/7?report=genbank&amp;log$=nuclalign">Gene Bank</a>
                 </div>
 
                 <div class=title>
                   <p class=hittitle>EUG|RIKILT|plasmid_pV-ZMBK07|plasmid_pV-ZMBK07|-2635190737607180000</p>
                   <p class=titleinfo>
-                    <span class=b>Sequence ID:</span> <a href="http://example.com/example-genebank/EUG/">gnl|BL_ORD_ID|7</a>
+                    <span class=b>Sequence ID:</span> <a href="http://www.ncbi.nlm.nih.gov/nucleotide/7?report=genbank&amp;log$=nuclalign">gnl|BL_ORD_ID|7</a>
                     <span class=b>Length:</span> 4983
                     <span class=b>Number of Matches:</span> 1
                   </p>
@@ -1276,13 +1276,13 @@
 
                 <div class=linkheader>
                   <div class=right><a href="#description6-2">Descriptions</a></div>
-                  <a class="linkheader" href="http://example.com/example-genebank/AY326434/">Gene Bank</a>
+                  <a class="linkheader" href="http://www.ncbi.nlm.nih.gov/nucleotide/6?report=genbank&amp;log$=nuclalign">Gene Bank</a>
                 </div>
 
                 <div class=title>
                   <p class=hittitle>AY326434|GenBank|insert_MON810|Synthetic_construct_truncated_CRYIA(b)_(cryIA(b))_gene,_partial_CDS|-2635190737607180000</p>
                   <p class=titleinfo>
-                    <span class=b>Sequence ID:</span> <a href="http://example.com/example-genebank/AY326434/">gnl|BL_ORD_ID|6</a>
+                    <span class=b>Sequence ID:</span> <a href="http://www.ncbi.nlm.nih.gov/nucleotide/6?report=genbank&amp;log$=nuclalign">gnl|BL_ORD_ID|6</a>
                     <span class=b>Length:</span> 4180
                     <span class=b>Number of Matches:</span> 1
                   </p>
@@ -1455,7 +1455,7 @@
                   <td>100%</td>
                   <td>3.564e-15</td>
                   <td>86%</td>
-                  <td><a href="http://example.com/example-genebank/EUG/">7</a></td>
+                  <td><a href="http://www.ncbi.nlm.nih.gov/nucleotide/7?report=genbank&amp;log$=nuclalign">7</a></td>
                 </tr>
                 <tr>
                   <td><div><a href="#hit7-2"
@@ -1468,7 +1468,7 @@
                   <td>100%</td>
                   <td>3.564e-15</td>
                   <td>86%</td>
-                  <td><a href="http://example.com/example-genebank/AY326434/">6</a></td>
+                  <td><a href="http://www.ncbi.nlm.nih.gov/nucleotide/6?report=genbank&amp;log$=nuclalign">6</a></td>
                 </tr>
               </table>
 
@@ -1485,13 +1485,13 @@
 
                 <div class=linkheader>
                   <div class=right><a href="#description7-1">Descriptions</a></div>
-                  <a class="linkheader" href="http://example.com/example-genebank/EUG/">Gene Bank</a>
+                  <a class="linkheader" href="http://www.ncbi.nlm.nih.gov/nucleotide/7?report=genbank&amp;log$=nuclalign">Gene Bank</a>
                 </div>
 
                 <div class=title>
                   <p class=hittitle>EUG|RIKILT|plasmid_pV-ZMBK07|plasmid_pV-ZMBK07|-2635190737607180000</p>
                   <p class=titleinfo>
-                    <span class=b>Sequence ID:</span> <a href="http://example.com/example-genebank/EUG/">gnl|BL_ORD_ID|7</a>
+                    <span class=b>Sequence ID:</span> <a href="http://www.ncbi.nlm.nih.gov/nucleotide/7?report=genbank&amp;log$=nuclalign">gnl|BL_ORD_ID|7</a>
                     <span class=b>Length:</span> 4983
                     <span class=b>Number of Matches:</span> 1
                   </p>
@@ -1530,13 +1530,13 @@
 
                 <div class=linkheader>
                   <div class=right><a href="#description7-2">Descriptions</a></div>
-                  <a class="linkheader" href="http://example.com/example-genebank/AY326434/">Gene Bank</a>
+                  <a class="linkheader" href="http://www.ncbi.nlm.nih.gov/nucleotide/6?report=genbank&amp;log$=nuclalign">Gene Bank</a>
                 </div>
 
                 <div class=title>
                   <p class=hittitle>AY326434|GenBank|insert_MON810|Synthetic_construct_truncated_CRYIA(b)_(cryIA(b))_gene,_partial_CDS|-2635190737607180000</p>
                   <p class=titleinfo>
-                    <span class=b>Sequence ID:</span> <a href="http://example.com/example-genebank/AY326434/">gnl|BL_ORD_ID|6</a>
+                    <span class=b>Sequence ID:</span> <a href="http://www.ncbi.nlm.nih.gov/nucleotide/6?report=genbank&amp;log$=nuclalign">gnl|BL_ORD_ID|6</a>
                     <span class=b>Length:</span> 4180
                     <span class=b>Number of Matches:</span> 1
                   </p>
--- a/test-data/refresh_test_results.sh	Mon Jul 07 11:29:10 2014 +0200
+++ b/test-data/refresh_test_results.sh	Mon Jul 07 11:42:43 2014 +0200
@@ -4,8 +4,11 @@
 
 set -eu
 
-"$@" ../blast2html.py -i "blast xml example1.xml" -o "blast xml example1.html"
-"$@" ../blast2html.py -i "blast xml example2.xml" -o "blast xml example2.html"
-"$@" ../blast2html.py -i "blast xml example3.xml" -o "blast xml example3.html" --genelink-template 'http://example.com/example-genebank?id={fullid}'
-"$@" ../blast2html.py -i "blast xml example4.xml" -o "blast xml example4.html" --db-config-dir .
+for i in 1 2 3 4
+do
+    "$@" ../blast2html.py -i "blast xml example$i.xml" -o "blast xml example$i.html"
+done
 
+"$@" ../blast2html.py -i "blast xml example3.xml" -o "blast xml example3b.html" --genelink-template 'http://example.com/example-genebank?id={fullid}'
+"$@" ../blast2html.py -i "blast xml example4.xml" -o "blast xml example4b.html" --db-config-dir .
+