changeset 5:bc88856eddab draft default tip

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/antismash commit dc45770442ff516d6f3733e4bdb284be3163de67
author bgruening
date Tue, 05 Jul 2022 10:37:38 +0000
parents e78e25d3b4bd
children
files antismash.xml harmonize2antismash.py macros.xml test-data/harmonize.json test-data/index.4.html test-data/index.5.html test-data/sideload.json
diffstat 7 files changed, 1109 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/antismash.xml	Tue May 31 14:04:07 2022 +0000
+++ b/antismash.xml	Tue Jul 05 10:37:38 2022 +0000
@@ -23,6 +23,13 @@
             ln -s $genefinding_gff3 annotation.gff3 &&
         #end if
 
+        #if $sideload.file
+            #if $sideload.format == 'harmonize'
+                python '$__tool_directory__/harmonize2antismash.py' '$sideload.file' sideload.json &&
+            #else
+                ln -s '$sideload.file' sideload.json &&
+            #end if
+        #end if
 
         ## create html folder
         mkdir -p '$htmloutputfolder' &&
@@ -62,6 +69,10 @@
             --rre-cutoff $advanced_options.rre_cutoff
             --rre-minlength $advanced_options.rre_minlength
 
+            #if $sideload.file
+                --sideload 'sideload.json'
+            #end if
+
             input_tempfile.$file_extension &&
 
         ## copy all content to html folder
@@ -149,6 +160,14 @@
             <param argument="--rre-minlength" type="integer" min="0" max="100" value="50" label="RRE minlength" help="Minimum amino acid length of RRE domains. Default: 50" />
         </section>
 
+        <section name="sideload" title="Sideloading" help="Sideloading allows you to load external datasets into AntiSMASH">
+            <param argument="--sideload" name="file" type="data" format="json" optional="true" label="sideload json file" help="Sideload json file to add to your report" />
+            <param name="format" type="select" label="Sideload Format">
+                <option value="harmonize">hAMRonize summarize JSON</option>
+                <option value="native">AntiSMASH JSON</option>
+            </param>
+        </section>
+        
         <param name="outputs" type="select" multiple="true" label="Outputs">
             <option value="html" selected="True">HTML file</option>
             <option value="all">All results</option>
@@ -236,6 +255,23 @@
         </output>
     </test>
  
+        <test expect_num_outputs="1">
+            <param name="infile" value="sequence.fasta"/>
+            <section name="sideload">
+                <param name="format" value="native"/>
+                <param name="file" value="sideload.json"/>
+            </section>
+            <output name="html" file="index.4.html"/>
+        </test>
+
+        <test expect_num_outputs="1">
+            <param name="infile" value="sequence.fasta"/>
+            <section name="sideload">
+                <param name="format" value="harmonize"/>
+                <param name="file" value="harmonize.json"/>
+            </section>
+            <output name="html" file="index.5.html"/>
+        </test>
     </tests>
     <help>
 <![CDATA[
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/harmonize2antismash.py	Tue Jul 05 10:37:38 2022 +0000
@@ -0,0 +1,50 @@
+#!/usr/bin/env python
+import json
+import sys
+
+
+output = {
+    "tool": {
+        "name": "hAMRonize",
+        "version": "?",
+        "description": "Tool for combining results",
+        "configuration": {
+            "verbose": "true", "multisetting": ["first", "second"]
+        },
+    },
+    "records": [],
+}
+
+with open(sys.argv[1], "r") as handle:
+    records = json.load(handle)
+
+    for i in records:
+        start = i["input_gene_start"]
+        end = i["input_gene_stop"]
+        label = i["gene_name"]
+        seqid = i["input_sequence_id"]
+
+        score = i["sequence_identity"]
+        if start <= end:
+            fstart = start - 1
+            fend = end
+        else:
+            fstart = end - 1
+            fend = start
+
+        record = {
+            "name": seqid,
+            "subregions": [
+                {
+                    "start": fstart,
+                    "end": fend,
+                    "label": label,
+                    "details": {"score": str(score)},
+                }
+            ],
+        }
+        output["records"].append(record)
+
+
+with open(sys.argv[2], "w") as handle:
+    json.dump(output, handle, indent=2)
--- a/macros.xml	Tue May 31 14:04:07 2022 +0000
+++ b/macros.xml	Tue Jul 05 10:37:38 2022 +0000
@@ -1,6 +1,6 @@
 <macros>
     <token name="@TOOL_VERSION@">6.1.1</token>
-    <token name="@VERSION_SUFFIX@">0</token>
+    <token name="@VERSION_SUFFIX@">1</token>
     <xml name="requirements">
         <requirements>
             <requirement type="package" version="@TOOL_VERSION@">antismash</requirement>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/harmonize.json	Tue Jul 05 10:37:38 2022 +0000
@@ -0,0 +1,64 @@
+[
+  {
+    "input_file_name": "ARBH01000003.1",
+    "gene_symbol": "mecA_6",
+    "gene_name": "mecA",
+    "reference_database_id": "resfinder",
+    "reference_database_version": 1,
+    "reference_accession": "BX571856",
+    "analysis_software_name": "abricate",
+    "analysis_software_version": 0.5,
+    "sequence_identity": 100,
+    "input_sequence_id": "ARBH01000003.1",
+    "input_protein_start": null,
+    "input_protein_stop": null,
+    "input_gene_start": 2,
+    "input_gene_stop": 3500,
+    "reference_protein_start": null,
+    "reference_protein_stop": null,
+    "reference_gene_start": null,
+    "reference_gene_stop": null,
+    "strand_orientation": "-",
+    "coverage_depth": null,
+    "coverage_percentage": 100,
+    "coverage_ratio": null,
+    "reference_gene_length": null,
+    "reference_protein_length": null,
+    "input_gene_length": null,
+    "input_protein_length": null,
+    "drug_class": "Amoxicillin;Amoxicillin+Clavulanic_acid;Ampicillin;Ampicillin+Clavulanic_acid;Cefepime;Cefixime;Cefotaxime;Cefoxitin;Ceftazidime;Ertapenem;Imipenem;Meropenem;Piperacillin;Piperacillin+Tazobactam",
+    "antimicrobial_agent": null,
+    "resistance_mechanism": null
+  },
+  {
+    "input_file_name": "ARBH01000003.1",
+    "gene_symbol": "mecA",
+    "gene_name": "mecA",
+    "reference_database_id": "resfinder",
+    "reference_database_version": 1,
+    "reference_accession": "BX571856",
+    "analysis_software_name": "staramr",
+    "analysis_software_version": 0.5,
+    "sequence_identity": 100,
+    "input_sequence_id": "ARBH01000003.1",
+    "input_protein_start": null,
+    "input_protein_stop": null,
+    "input_gene_start": 2,
+    "input_gene_stop": 3500,
+    "reference_protein_start": null,
+    "reference_protein_stop": null,
+    "reference_gene_start": null,
+    "reference_gene_stop": null,
+    "strand_orientation": null,
+    "coverage_depth": null,
+    "coverage_percentage": 100,
+    "coverage_ratio": 1,
+    "reference_gene_length": null,
+    "reference_protein_length": null,
+    "input_gene_length": null,
+    "input_protein_length": null,
+    "drug_class": "unknown[mecA_6_BX571856]",
+    "antimicrobial_agent": null,
+    "resistance_mechanism": null
+  }
+]
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/index.4.html	Tue Jul 05 10:37:38 2022 +0000
@@ -0,0 +1,459 @@
+
+<!doctype html>
+<html lang="en">
+<head>
+  <meta charset="utf-8" />
+  <title>input_tempfile - 1 region(s) - antiSMASH results</title>
+  <style>img {width: 20px; height: 20px;}</style>
+  <link rel="stylesheet" type="text/css" href="css/bacteria.css">
+  <meta property="og:title" content="input_tempfile - 1 record(s) - 1 region(s)" />
+  <meta property="og:description" content="">
+  <meta property="og:image" content="https://antismash.secondarymetabolites.org/images/bacteria_logo.png" />
+  <meta property="og:image:alt" content="antiSMASH logo" />
+  <meta property="og:image:width" content="600" />
+  <meta property="og:image:height" content="600" />
+  <meta property="og:url" content="https://antismash.secondarymetabolites.org/upload/input_tempfile/index.html" />
+  <meta property="og:type" content="website" />
+  <meta name="twitter:card" content="summary" />
+  <meta name="twitter:site" content="@antismash_dev" />
+</head>
+
+<body>
+  <div id="header">
+      <nav>
+    <div class="main-link">
+     <div>
+        <a href="https://antismash.secondarymetabolites.org/">
+          <img src="images/bacteria_antismash_logo.svg" alt="antiSMASH logo" style="width:40px;height:unset;">
+        </a>
+       </div>
+       <div>
+        <a href="https://antismash.secondarymetabolites.org/">
+          antiSMASH version 6.1.1
+        </a>
+      </div>
+    </div>
+    <div class="custom-description"></div>
+    <div class="ancillary-links">
+      <div class="ancillary-link dropdown-menu" id="download-dropdown"><a href="#" id="download-dropdown-link"><img src="images/download.svg" alt="download"> &nbsp; Download</a>
+        <ul class="dropdown-options">
+        
+        <li><a href="input_tempfile.zip">Download all results</a></li>
+        
+          <li><a href="input_tempfile.gbk">Download GenBank summary file</a></li>
+        
+        </ul>
+      </div>
+      <div class="ancillary-link"><a href="https://antismash.secondarymetabolites.org/#!/about"><img src="images/about.svg" alt="about"> &nbsp; About</a></div>
+      <div class="ancillary-link"><a href="https://docs.antismash.secondarymetabolites.org/"><img src="images/help.svg" alt="help"> &nbsp; Help</a></div>
+      <div class="ancillary-link"><a href="https://antismash.secondarymetabolites.org/#!/contact"><img src="images/contact.svg" alt="contact"> &nbsp; Contact</a></div>
+    </div>
+  </nav>
+    <div id="buttons">
+      <span id="region-type">Select genomic region:</span>
+      <div id="regionbuttons">
+        <div class="arrow-left" id="prev-region"></div>
+        <div class="regbutton" style="min-width: inherit;"><a href="#">Overview</a></div>
+        <div style="display: flex; flex-wrap: wrap">
+        
+          
+            <div class="regbutton hybrid r1c1">
+              <a href="#r1c1">1.1</a>
+            </div>
+          
+        
+        </div>
+        <div id="last-regbutton"><div class="arrow-right" id="next-region"></div></div>
+      </div>
+    </div>
+  </div>
+
+  <!-- overview page -->
+  
+  <div class="page" id="overview">
+   
+   
+     <h3>Identified secondary metabolite regions using strictness &#39;relaxed&#39;<span id="truncated"></span></h3>
+   
+   <div class="overview-layout">
+    <div id="record-tables">
+     <div id="single-record-tables">
+     <div class="record-overview-header">
+        <strong>ARBH01000003.1</strong>
+        <div class="download-container">
+          <div class="download-icon-inverse download-svg" data-tag="record-minimap-1" data-filename="ARBH01000003.1_overview.svg">
+          </div>
+        </div>
+      </div>
+      <div class="record-overview-details">
+        <svg id="record-minimap-1" class="record-overview-svg" height="1" width="1"></svg>
+        <table class="region-table">
+ <thead>
+  <tr>
+   <th>Region</th>
+   <th>Type</th>
+   <th>From</th>
+   <th>To</th>
+   <th colspan="2">Most similar known cluster</th>
+   <th>Similarity</th>
+  </tr>
+ </thead>
+ <tbody>
+ <tr class="linked-row odd" data-anchor="#r1c1">
+     <td class="regbutton hybrid r1c1">
+      <a href="#r1c1">Region&nbsp1</a>
+     </td>
+     <td>
+       
+       <a class="external-link" href="https://docs.antismash.secondarymetabolites.org/glossary/#t1pks" target="_blank">T1PKS</a>,<a class="external-link" href="https://docs.antismash.secondarymetabolites.org/glossary/#bht" target="_blank">bht</a>
+     </td>
+     <td class="digits">1</td>
+     <td class="digits table-split-left">3,500</td>
+     
+      <td colspan="3"></td>
+     
+   </tr>
+ 
+ </tbody>
+</table>
+      </div>
+     </div>
+     
+     
+    </div>
+    
+   </div>
+  </div>
+  
+
+
+
+
+
+
+<div class="page" id='r1c1' style="display: none;">
+ <div class="region-grid">
+  <div class = "content">
+    <div class ="description-container">
+      <div class="heading"> ARBH01000003.1 - Region 1 - T1PKS,bht <div class="help-container"> <div class="help-icon" data-id="region_svg-help-5"></div> <span class="help-tooltip" id="region_svg-help-5">Shows the layout of the region, marking coding sequences and areas of interest. Clicking a gene will select it and show any relevant details. Clicking an area feature (e.g. a candidate cluster) will select all coding sequences within that area. Double clicking an area feature will zoom to that area. Multiple genes and area features can be selected by clicking them while holding the Ctrl key.<br>More detailed help is available <a class='external-link' href='https://docs.antismash.secondarymetabolites.org/understanding_output/#the-antismash-5-region-concept' target='_blank'>here</a>.</span></div></div>
+      <div class="region-download">
+        <a href = ARBH01000003.1.region001.gbk>Download region GenBank file</a>
+      </div>
+      <div class="region-download">
+        <div class="link-like download-svg" data-tag="r1c1-svg" data-filename="ARBH01000003.1_r1c1.svg">Download region SVG</div>
+      </div>
+      <div class = 'description-text'>
+        Location: 1 - 3,500 nt. (total: 3,500 nt)
+        
+        <a class="cluster-rules-header" id="r1c1-rules-header" href="#r1c1">Show pHMM detection rules used</a>
+        
+        
+          <div class="contig-edge-warning">Region on contig edge.</div>
+        
+      </div>
+      
+      <div class="cluster-rules" id="r1c1-rules">T1PKS: cds(PKS_AT and (PKS_KS or ene_KS or mod_KS or hyb_KS or itr_KS or tra_KS))</div>
+      
+      <div class="region-svg-container">
+       <div id='r1c1-svg'>
+       </div>
+      </div>
+    </div>
+    <div class="legend">
+      <h4>Legend:</h4>
+      <div class="legend-items">
+        <div class="button-like legend-selector" data-id="legend-type-biosynthetic">
+      <div class="legend-field legend-type-biosynthetic"></div>
+      <div class="legend-label">core biosynthetic genes</div>
+    </div>
+        <div class="button-like legend-selector" data-id="legend-type-biosynthetic-additional">
+      <div class="legend-field legend-type-biosynthetic-additional"></div>
+      <div class="legend-label">additional biosynthetic genes</div>
+    </div>
+        <div class="button-like legend-selector" data-id="legend-type-transport">
+      <div class="legend-field legend-type-transport"></div>
+      <div class="legend-label">transport-related genes</div>
+    </div>
+        <div class="button-like legend-selector" data-id="legend-type-regulatory">
+      <div class="legend-field legend-type-regulatory"></div>
+      <div class="legend-label">regulatory genes</div>
+    </div>
+        <div class="button-like legend-selector" data-id="legend-type-other">
+      <div class="legend-field legend-type-other"></div>
+      <div class="legend-label">other genes</div>
+    </div>
+        <div style="margin-right: 2em;"></div>
+        <div class="button-like legend-selector" data-id="legend-resistance">
+        <div class="legend-symbol">
+            <svg viewbox="0 0 8 8">
+                <rect x=0 y=2 height=4 width=8 class="svgene-resistance"></rect>
+            </svg>
+        </div>
+        <div class="legend-label">resistance</div>
+    </div>
+        
+            <div class="button-like legend-selector" data-id="legend-tta-codon">
+        <div class="legend-symbol">
+                <svg viewbox="0 0 6 6">
+                    <polyline class="svgene-tta-codon" points="3,0 0,6 6,6 3,0"></rect>
+                </svg>
+            </div>
+        <div class="legend-label">TTA codons</div>
+    </div>
+        
+        
+      </div>
+    </div>
+    <div class="zoom-buttons">
+      <div class="button-like zoom-button zoom-reset"><img src="images/expand-arrows-alt-solid.svg" alt="reset zoom">reset view</div>
+      <div class="button-like zoom-button zoom-in"><img src="images/search-solid.svg" alt="zoom">zoom to selection</div>
+    </div>
+  </div>
+
+  <div class="focus-panel">
+    <div class="heading">
+      <span>Gene details</span>
+      <div class="help-container"> <div class="help-icon" data-id="focus-panel-help-6"></div> <span class="help-tooltip" id="focus-panel-help-6">Shows details of the most recently selected gene, including names, products, location, and other annotations.</span></div>
+    </div>
+    <div class="focus-panel-content focus-panel-content-r1c1">
+        <div style="text-align: center; margin-top: 30%;">
+            Select a gene to view the details available for it
+        </div>
+    </div>
+  </div>
+
+  
+  <div class="body-details">
+    <div class="body-details-headers">
+    
+     
+      <div class="body-details-header r1c1-Example-tool" data-name="r1c1-Example-tool">
+        Example tool
+      </div>
+     
+    
+     
+      <div class="body-details-header r1c1-nrps_pks" data-name="r1c1-nrps_pks">
+        NRPS/PKS domains
+      </div>
+     
+    
+     
+      <div class="body-details-header r1c1-knownclusterblast" data-name="r1c1-knownclusterblast">
+        KnownClusterBlast
+      </div>
+     
+      <div class="body-details-header r1c1-subclusterblast" data-name="r1c1-subclusterblast">
+        SubClusterBlast
+      </div>
+     
+    
+     
+    
+    </div>
+    
+     
+    <div class="body-details-section r1c1-Example-tool">
+      <div class="more-details">
+    <div class="heading">
+      <span>External annotation</span>
+      <div class="help-container"> <div class="help-icon" data-id="general_details-help-1"></div> <span class="help-tooltip" id="general_details-help-1">This annotation was made externally by 'Example tool' and not by antiSMASH</span></div>
+    </div>
+    <div class="prediction-text" style="padding-left:2em;padding-top:2em;">
+      <table><thead></thead>
+       <tbody>
+        <tr><td>Name</td><td>&nbsp;</td><td><strong>Example tool</strong></td></tr>
+        
+          <tr><td>Version</td><td>&nbsp;</td><td>1.2.3</td></tr>
+        
+        
+          <tr><td>Description</td><td>&nbsp;</td><td>Example of external result sideloading in antiSMASH</td></tr>
+        
+       </tbody>
+      </table>
+
+      
+      Configuration:
+      <div class="collapser collapser-target-sideloader-tool collapser-level-none"> </div><div class="collapser-content">
+      <table>
+       <thead>
+        <tr><th>Setting</th><th></th><th>Value</th></tr>
+       </thead>
+       <tbody>
+        <tr><td>multisetting</td><td>&nbsp;</td><td>first, second</td></tr><tr><td>verbose</td><td>&nbsp;</td><td>true</td></tr>
+       </tbody>
+      </table>
+      </div>
+      
+    </div>
+    <div class="prediction-text" style="padding-left:2em;padding-top:2em;">
+      <table>
+       <thead></thead>
+       <tbody>
+        <tr><td>Type</td><td>&nbsp;</td><td>Subregion</td></tr>
+        <tr><td>Location</td><td>&nbsp;</td><td>3 - 3,501</td></tr>
+        <tr><td>Label</td><td>&nbsp;</td><td>dhpg biosynthesis</td></tr>
+       </tbody>
+      </table>
+      
+      Additional area details:
+      <div class="collapser collapser-target-sideloader-detail collapser-level-all expanded"> </div><div class="collapser-content" style="display:block;">
+      <table>
+       <thead>
+        <tr><th>Name</th><th></th><th>Value</th></tr>
+       </thead>
+       <tbody>
+        <tr><td>score</td><td>&nbsp;</td><td>6.5</td></tr>
+       </tbody>
+      </table>
+      </div>
+      
+    </div><div class="prediction-text" style="padding-left:2em;padding-top:2em;">
+      <table>
+       <thead></thead>
+       <tbody>
+        <tr><td>Type</td><td>&nbsp;</td><td>Protocluster</td></tr>
+        <tr><td>Location</td><td>&nbsp;</td><td>3 - 3,501</td></tr>
+        <tr><td>Label</td><td>&nbsp;</td><td>bht</td></tr>
+       </tbody>
+      </table>
+      
+      Additional area details:
+      <div class="collapser collapser-target-sideloader-detail collapser-level-all expanded"> </div><div class="collapser-content" style="display:block;">
+      <table>
+       <thead>
+        <tr><th>Name</th><th></th><th>Value</th></tr>
+       </thead>
+       <tbody>
+        <tr><td>score</td><td>&nbsp;</td><td>6.5</td></tr><tr><td>some_option_name</td><td>&nbsp;</td><td>no</td></tr>
+       </tbody>
+      </table>
+      </div>
+      
+    </div>
+</div>
+    </div>
+     
+    
+     
+    <div class="body-details-section r1c1-nrps_pks">
+      <div class="details">
+    <div class="heading">
+      <span>Detailed domain annotation</span>
+      <div class="help-container"> <div class="help-icon" data-id="nrps-domain-help-2"></div> <span class="help-tooltip" id="nrps-domain-help-2">Shows <a href='https://docs.antismash.secondarymetabolites.org/glossary/#nrps' target='_blank'>NRPS</a>- and <a href='https://docs.antismash.secondarymetabolites.org/glossary/#pks' target='_blank'>PKS</a>-related domains for each feature that contains them. Click on each domain for more information about the domain's location, consensus monomer prediction, and other details.<br>A glossary is available <a href='https://docs.antismash.secondarymetabolites.org/modules/nrps_pks_domains/' target='_blank'>here</a>.</span></div>
+      <div class="download-container">
+        <div class="download-icon download-svg" data-tag="r1c1-details-svg" data-filename="ARBH01000003.1_r1c1_nrps_pks.svg">
+        </div>
+      </div>
+    </div>
+    <div class="nrps-pks-domain-buttons">
+      <div class="domains-selected-only switch-container"><span class="switch-desc">Selected features only</span> <label class="switch">  <input class="domains-selected-only" type="checkbox">  <span class="slider"></span> </label></div>
+      <div class="show-module-domains switch-container"><span class="switch-desc">Show module domains</span> <label class="switch">  <input class="show-module-domains" type="checkbox">  <span class="slider"></span> </label></div>
+    </div>
+    <div class="details-svg" id="r1c1-details-svg"></div>
+</div>
+    </div>
+     
+    
+     
+    <div class="body-details-section r1c1-knownclusterblast">
+      <div class = "knownclusterblast">
+    <div class="heading">
+      <span>Similar known gene clusters</span>
+      <div class="help-container"> <div class="help-icon" data-id="cb-known-help-3"></div> <span class="help-tooltip" id="cb-known-help-3">Shows clusters from the MiBIG database that are similar to the current region. Genes marked with the same colour are interrelated. White genes have no relationship.<br>Click on reference genes to show details of similarities to genes within the current region.<br>Click on an accession to open that entry in the MiBIG database.</span></div>
+    </div>
+  
+  <div>
+    <p>No matches found.</p>
+  </div>
+  
+</div>
+    </div>
+     
+    <div class="body-details-section r1c1-subclusterblast">
+      <div class = "subclusterblast">
+    <div class="heading">
+      <span>Similar subclusters</span>
+      <div class="help-container"> <div class="help-icon" data-id="cb-sub-help-4"></div> <span class="help-tooltip" id="cb-sub-help-4">Shows sub-cluster units that are similar to the current region. Genes marked with the same colour are interrelated. White genes have no relationship.<br>Click on reference genes to show details of similarities to genes within the current region.</span></div>
+    </div>
+  
+  <div>
+    <p>No matches found.</p>
+  </div>
+  
+</div>
+    </div>
+     
+    
+     
+    
+  </div>
+
+  <div class="sidepanel">
+    <div class="sidepanel-details-headers">
+    
+     
+    
+     
+    
+     
+    
+     
+    
+    </div>
+    
+     
+    
+     
+    
+     
+    
+     
+    
+  </div>
+
+ </div>
+
+</div>
+
+
+  <footer class="footer">
+    <div class="container">
+      <div>
+        <img src="images/bacteria_antismash_logo.svg" style="height:90px;width:unset;">
+      </div>
+      <div class="cite-me">
+        If you have found antiSMASH useful, please <a href="https://antismash.secondarymetabolites.org/#!/about">cite us</a>.
+      </div>
+      <div>
+        <img src="images/bacteria_antismash_icon.svg" style="height:100px;width:unset;">
+      </div>
+    </div>
+  </footer>
+
+  <script src="js/jquery.js"></script>
+  <script src="js/antismash.js"></script>
+  <script src="regions.js"></script>
+  <script>
+    $(document).ready(function() {
+        viewer["start"](all_regions, details_data, resultsData, recordData);
+    })
+  </script>
+
+<svg xmlns="http://www.w3.org/2000/svg" version="1.1" xmlns:xlink="http://www.w3.org/1999/xlink">
+ <defs>
+  <filter id="inset-shadow">
+   <feOffset dx="-2" dy="-2"></feOffset>
+   <feGaussianBlur result="offset-blur" stdDeviation="2"></feGaussianBlur>
+   <feComposite operator="out" in="SourceGraphic" in2="offset-blur" result="inverse"></feComposite>
+   <feFlood flood-color="black" result="color" flood-opacity="1"></feFlood>
+   <feComposite operator="in" in="color" in2="inverse" result="shadow"></feComposite>
+   <feComponentTransfer in="shadow" result="shadow">
+    <feFuncA type="linear" slope=".95"></feFuncA>
+   </feComponentTransfer>
+   <feComposite operator="over" in="shadow" in2="SourceGraphic"></feComposite>
+  </filter>
+ </defs>
+</svg>
+</body>
+</html>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/index.5.html	Tue Jul 05 10:37:38 2022 +0000
@@ -0,0 +1,459 @@
+
+<!doctype html>
+<html lang="en">
+<head>
+  <meta charset="utf-8" />
+  <title>input_tempfile - 1 region(s) - antiSMASH results</title>
+  <style>img {width: 20px; height: 20px;}</style>
+  <link rel="stylesheet" type="text/css" href="css/bacteria.css">
+  <meta property="og:title" content="input_tempfile - 1 record(s) - 1 region(s)" />
+  <meta property="og:description" content="">
+  <meta property="og:image" content="https://antismash.secondarymetabolites.org/images/bacteria_logo.png" />
+  <meta property="og:image:alt" content="antiSMASH logo" />
+  <meta property="og:image:width" content="600" />
+  <meta property="og:image:height" content="600" />
+  <meta property="og:url" content="https://antismash.secondarymetabolites.org/upload/input_tempfile/index.html" />
+  <meta property="og:type" content="website" />
+  <meta name="twitter:card" content="summary" />
+  <meta name="twitter:site" content="@antismash_dev" />
+</head>
+
+<body>
+  <div id="header">
+      <nav>
+    <div class="main-link">
+     <div>
+        <a href="https://antismash.secondarymetabolites.org/">
+          <img src="images/bacteria_antismash_logo.svg" alt="antiSMASH logo" style="width:40px;height:unset;">
+        </a>
+       </div>
+       <div>
+        <a href="https://antismash.secondarymetabolites.org/">
+          antiSMASH version 6.1.1
+        </a>
+      </div>
+    </div>
+    <div class="custom-description"></div>
+    <div class="ancillary-links">
+      <div class="ancillary-link dropdown-menu" id="download-dropdown"><a href="#" id="download-dropdown-link"><img src="images/download.svg" alt="download"> &nbsp; Download</a>
+        <ul class="dropdown-options">
+        
+        <li><a href="input_tempfile.zip">Download all results</a></li>
+        
+          <li><a href="input_tempfile.gbk">Download GenBank summary file</a></li>
+        
+        </ul>
+      </div>
+      <div class="ancillary-link"><a href="https://antismash.secondarymetabolites.org/#!/about"><img src="images/about.svg" alt="about"> &nbsp; About</a></div>
+      <div class="ancillary-link"><a href="https://docs.antismash.secondarymetabolites.org/"><img src="images/help.svg" alt="help"> &nbsp; Help</a></div>
+      <div class="ancillary-link"><a href="https://antismash.secondarymetabolites.org/#!/contact"><img src="images/contact.svg" alt="contact"> &nbsp; Contact</a></div>
+    </div>
+  </nav>
+    <div id="buttons">
+      <span id="region-type">Select genomic region:</span>
+      <div id="regionbuttons">
+        <div class="arrow-left" id="prev-region"></div>
+        <div class="regbutton" style="min-width: inherit;"><a href="#">Overview</a></div>
+        <div style="display: flex; flex-wrap: wrap">
+        
+          
+            <div class="regbutton PKS T1PKS r1c1">
+              <a href="#r1c1">1.1</a>
+            </div>
+          
+        
+        </div>
+        <div id="last-regbutton"><div class="arrow-right" id="next-region"></div></div>
+      </div>
+    </div>
+  </div>
+
+  <!-- overview page -->
+  
+  <div class="page" id="overview">
+   
+   
+     <h3>Identified secondary metabolite regions using strictness &#39;relaxed&#39;<span id="truncated"></span></h3>
+   
+   <div class="overview-layout">
+    <div id="record-tables">
+     <div id="single-record-tables">
+     <div class="record-overview-header">
+        <strong>ARBH01000003.1</strong>
+        <div class="download-container">
+          <div class="download-icon-inverse download-svg" data-tag="record-minimap-1" data-filename="ARBH01000003.1_overview.svg">
+          </div>
+        </div>
+      </div>
+      <div class="record-overview-details">
+        <svg id="record-minimap-1" class="record-overview-svg" height="1" width="1"></svg>
+        <table class="region-table">
+ <thead>
+  <tr>
+   <th>Region</th>
+   <th>Type</th>
+   <th>From</th>
+   <th>To</th>
+   <th colspan="2">Most similar known cluster</th>
+   <th>Similarity</th>
+  </tr>
+ </thead>
+ <tbody>
+ <tr class="linked-row odd" data-anchor="#r1c1">
+     <td class="regbutton PKS T1PKS r1c1">
+      <a href="#r1c1">Region&nbsp1</a>
+     </td>
+     <td>
+       
+       <a class="external-link" href="https://docs.antismash.secondarymetabolites.org/glossary/#t1pks" target="_blank">T1PKS</a>
+     </td>
+     <td class="digits">1</td>
+     <td class="digits table-split-left">3,500</td>
+     
+      <td colspan="3"></td>
+     
+   </tr>
+ 
+ </tbody>
+</table>
+      </div>
+     </div>
+     
+     
+    </div>
+    
+   </div>
+  </div>
+  
+
+
+
+
+
+
+<div class="page" id='r1c1' style="display: none;">
+ <div class="region-grid">
+  <div class = "content">
+    <div class ="description-container">
+      <div class="heading"> ARBH01000003.1 - Region 1 - T1PKS <div class="help-container"> <div class="help-icon" data-id="region_svg-help-5"></div> <span class="help-tooltip" id="region_svg-help-5">Shows the layout of the region, marking coding sequences and areas of interest. Clicking a gene will select it and show any relevant details. Clicking an area feature (e.g. a candidate cluster) will select all coding sequences within that area. Double clicking an area feature will zoom to that area. Multiple genes and area features can be selected by clicking them while holding the Ctrl key.<br>More detailed help is available <a class='external-link' href='https://docs.antismash.secondarymetabolites.org/understanding_output/#the-antismash-5-region-concept' target='_blank'>here</a>.</span></div></div>
+      <div class="region-download">
+        <a href = ARBH01000003.1.region001.gbk>Download region GenBank file</a>
+      </div>
+      <div class="region-download">
+        <div class="link-like download-svg" data-tag="r1c1-svg" data-filename="ARBH01000003.1_r1c1.svg">Download region SVG</div>
+      </div>
+      <div class = 'description-text'>
+        Location: 1 - 3,500 nt. (total: 3,500 nt)
+        
+        <a class="cluster-rules-header" id="r1c1-rules-header" href="#r1c1">Show pHMM detection rules used</a>
+        
+        
+          <div class="contig-edge-warning">Region on contig edge.</div>
+        
+      </div>
+      
+      <div class="cluster-rules" id="r1c1-rules">T1PKS: cds(PKS_AT and (PKS_KS or ene_KS or mod_KS or hyb_KS or itr_KS or tra_KS))</div>
+      
+      <div class="region-svg-container">
+       <div id='r1c1-svg'>
+       </div>
+      </div>
+    </div>
+    <div class="legend">
+      <h4>Legend:</h4>
+      <div class="legend-items">
+        <div class="button-like legend-selector" data-id="legend-type-biosynthetic">
+      <div class="legend-field legend-type-biosynthetic"></div>
+      <div class="legend-label">core biosynthetic genes</div>
+    </div>
+        <div class="button-like legend-selector" data-id="legend-type-biosynthetic-additional">
+      <div class="legend-field legend-type-biosynthetic-additional"></div>
+      <div class="legend-label">additional biosynthetic genes</div>
+    </div>
+        <div class="button-like legend-selector" data-id="legend-type-transport">
+      <div class="legend-field legend-type-transport"></div>
+      <div class="legend-label">transport-related genes</div>
+    </div>
+        <div class="button-like legend-selector" data-id="legend-type-regulatory">
+      <div class="legend-field legend-type-regulatory"></div>
+      <div class="legend-label">regulatory genes</div>
+    </div>
+        <div class="button-like legend-selector" data-id="legend-type-other">
+      <div class="legend-field legend-type-other"></div>
+      <div class="legend-label">other genes</div>
+    </div>
+        <div style="margin-right: 2em;"></div>
+        <div class="button-like legend-selector" data-id="legend-resistance">
+        <div class="legend-symbol">
+            <svg viewbox="0 0 8 8">
+                <rect x=0 y=2 height=4 width=8 class="svgene-resistance"></rect>
+            </svg>
+        </div>
+        <div class="legend-label">resistance</div>
+    </div>
+        
+            <div class="button-like legend-selector" data-id="legend-tta-codon">
+        <div class="legend-symbol">
+                <svg viewbox="0 0 6 6">
+                    <polyline class="svgene-tta-codon" points="3,0 0,6 6,6 3,0"></rect>
+                </svg>
+            </div>
+        <div class="legend-label">TTA codons</div>
+    </div>
+        
+        
+      </div>
+    </div>
+    <div class="zoom-buttons">
+      <div class="button-like zoom-button zoom-reset"><img src="images/expand-arrows-alt-solid.svg" alt="reset zoom">reset view</div>
+      <div class="button-like zoom-button zoom-in"><img src="images/search-solid.svg" alt="zoom">zoom to selection</div>
+    </div>
+  </div>
+
+  <div class="focus-panel">
+    <div class="heading">
+      <span>Gene details</span>
+      <div class="help-container"> <div class="help-icon" data-id="focus-panel-help-6"></div> <span class="help-tooltip" id="focus-panel-help-6">Shows details of the most recently selected gene, including names, products, location, and other annotations.</span></div>
+    </div>
+    <div class="focus-panel-content focus-panel-content-r1c1">
+        <div style="text-align: center; margin-top: 30%;">
+            Select a gene to view the details available for it
+        </div>
+    </div>
+  </div>
+
+  
+  <div class="body-details">
+    <div class="body-details-headers">
+    
+     
+      <div class="body-details-header r1c1-hAMRonize" data-name="r1c1-hAMRonize">
+        hAMRonize
+      </div>
+     
+    
+     
+      <div class="body-details-header r1c1-nrps_pks" data-name="r1c1-nrps_pks">
+        NRPS/PKS domains
+      </div>
+     
+    
+     
+      <div class="body-details-header r1c1-knownclusterblast" data-name="r1c1-knownclusterblast">
+        KnownClusterBlast
+      </div>
+     
+      <div class="body-details-header r1c1-subclusterblast" data-name="r1c1-subclusterblast">
+        SubClusterBlast
+      </div>
+     
+    
+     
+    
+    </div>
+    
+     
+    <div class="body-details-section r1c1-hAMRonize">
+      <div class="more-details">
+    <div class="heading">
+      <span>External annotation</span>
+      <div class="help-container"> <div class="help-icon" data-id="general_details-help-1"></div> <span class="help-tooltip" id="general_details-help-1">This annotation was made externally by 'hAMRonize' and not by antiSMASH</span></div>
+    </div>
+    <div class="prediction-text" style="padding-left:2em;padding-top:2em;">
+      <table><thead></thead>
+       <tbody>
+        <tr><td>Name</td><td>&nbsp;</td><td><strong>hAMRonize</strong></td></tr>
+        
+          <tr><td>Version</td><td>&nbsp;</td><td>?</td></tr>
+        
+        
+          <tr><td>Description</td><td>&nbsp;</td><td>Tool for combining results</td></tr>
+        
+       </tbody>
+      </table>
+
+      
+      Configuration:
+      <div class="collapser collapser-target-sideloader-tool collapser-level-none"> </div><div class="collapser-content">
+      <table>
+       <thead>
+        <tr><th>Setting</th><th></th><th>Value</th></tr>
+       </thead>
+       <tbody>
+        <tr><td>multisetting</td><td>&nbsp;</td><td>first, second</td></tr><tr><td>verbose</td><td>&nbsp;</td><td>true</td></tr>
+       </tbody>
+      </table>
+      </div>
+      
+    </div>
+    <div class="prediction-text" style="padding-left:2em;padding-top:2em;">
+      <table>
+       <thead></thead>
+       <tbody>
+        <tr><td>Type</td><td>&nbsp;</td><td>Subregion</td></tr>
+        <tr><td>Location</td><td>&nbsp;</td><td>2 - 3,501</td></tr>
+        <tr><td>Label</td><td>&nbsp;</td><td>mecA</td></tr>
+       </tbody>
+      </table>
+      
+      Additional area details:
+      <div class="collapser collapser-target-sideloader-detail collapser-level-all expanded"> </div><div class="collapser-content" style="display:block;">
+      <table>
+       <thead>
+        <tr><th>Name</th><th></th><th>Value</th></tr>
+       </thead>
+       <tbody>
+        <tr><td>score</td><td>&nbsp;</td><td>100</td></tr>
+       </tbody>
+      </table>
+      </div>
+      
+    </div><div class="prediction-text" style="padding-left:2em;padding-top:2em;">
+      <table>
+       <thead></thead>
+       <tbody>
+        <tr><td>Type</td><td>&nbsp;</td><td>Subregion</td></tr>
+        <tr><td>Location</td><td>&nbsp;</td><td>2 - 3,501</td></tr>
+        <tr><td>Label</td><td>&nbsp;</td><td>mecA</td></tr>
+       </tbody>
+      </table>
+      
+      Additional area details:
+      <div class="collapser collapser-target-sideloader-detail collapser-level-all expanded"> </div><div class="collapser-content" style="display:block;">
+      <table>
+       <thead>
+        <tr><th>Name</th><th></th><th>Value</th></tr>
+       </thead>
+       <tbody>
+        <tr><td>score</td><td>&nbsp;</td><td>100</td></tr>
+       </tbody>
+      </table>
+      </div>
+      
+    </div>
+</div>
+    </div>
+     
+    
+     
+    <div class="body-details-section r1c1-nrps_pks">
+      <div class="details">
+    <div class="heading">
+      <span>Detailed domain annotation</span>
+      <div class="help-container"> <div class="help-icon" data-id="nrps-domain-help-2"></div> <span class="help-tooltip" id="nrps-domain-help-2">Shows <a href='https://docs.antismash.secondarymetabolites.org/glossary/#nrps' target='_blank'>NRPS</a>- and <a href='https://docs.antismash.secondarymetabolites.org/glossary/#pks' target='_blank'>PKS</a>-related domains for each feature that contains them. Click on each domain for more information about the domain's location, consensus monomer prediction, and other details.<br>A glossary is available <a href='https://docs.antismash.secondarymetabolites.org/modules/nrps_pks_domains/' target='_blank'>here</a>.</span></div>
+      <div class="download-container">
+        <div class="download-icon download-svg" data-tag="r1c1-details-svg" data-filename="ARBH01000003.1_r1c1_nrps_pks.svg">
+        </div>
+      </div>
+    </div>
+    <div class="nrps-pks-domain-buttons">
+      <div class="domains-selected-only switch-container"><span class="switch-desc">Selected features only</span> <label class="switch">  <input class="domains-selected-only" type="checkbox">  <span class="slider"></span> </label></div>
+      <div class="show-module-domains switch-container"><span class="switch-desc">Show module domains</span> <label class="switch">  <input class="show-module-domains" type="checkbox">  <span class="slider"></span> </label></div>
+    </div>
+    <div class="details-svg" id="r1c1-details-svg"></div>
+</div>
+    </div>
+     
+    
+     
+    <div class="body-details-section r1c1-knownclusterblast">
+      <div class = "knownclusterblast">
+    <div class="heading">
+      <span>Similar known gene clusters</span>
+      <div class="help-container"> <div class="help-icon" data-id="cb-known-help-3"></div> <span class="help-tooltip" id="cb-known-help-3">Shows clusters from the MiBIG database that are similar to the current region. Genes marked with the same colour are interrelated. White genes have no relationship.<br>Click on reference genes to show details of similarities to genes within the current region.<br>Click on an accession to open that entry in the MiBIG database.</span></div>
+    </div>
+  
+  <div>
+    <p>No matches found.</p>
+  </div>
+  
+</div>
+    </div>
+     
+    <div class="body-details-section r1c1-subclusterblast">
+      <div class = "subclusterblast">
+    <div class="heading">
+      <span>Similar subclusters</span>
+      <div class="help-container"> <div class="help-icon" data-id="cb-sub-help-4"></div> <span class="help-tooltip" id="cb-sub-help-4">Shows sub-cluster units that are similar to the current region. Genes marked with the same colour are interrelated. White genes have no relationship.<br>Click on reference genes to show details of similarities to genes within the current region.</span></div>
+    </div>
+  
+  <div>
+    <p>No matches found.</p>
+  </div>
+  
+</div>
+    </div>
+     
+    
+     
+    
+  </div>
+
+  <div class="sidepanel">
+    <div class="sidepanel-details-headers">
+    
+     
+    
+     
+    
+     
+    
+     
+    
+    </div>
+    
+     
+    
+     
+    
+     
+    
+     
+    
+  </div>
+
+ </div>
+
+</div>
+
+
+  <footer class="footer">
+    <div class="container">
+      <div>
+        <img src="images/bacteria_antismash_logo.svg" style="height:90px;width:unset;">
+      </div>
+      <div class="cite-me">
+        If you have found antiSMASH useful, please <a href="https://antismash.secondarymetabolites.org/#!/about">cite us</a>.
+      </div>
+      <div>
+        <img src="images/bacteria_antismash_icon.svg" style="height:100px;width:unset;">
+      </div>
+    </div>
+  </footer>
+
+  <script src="js/jquery.js"></script>
+  <script src="js/antismash.js"></script>
+  <script src="regions.js"></script>
+  <script>
+    $(document).ready(function() {
+        viewer["start"](all_regions, details_data, resultsData, recordData);
+    })
+  </script>
+
+<svg xmlns="http://www.w3.org/2000/svg" version="1.1" xmlns:xlink="http://www.w3.org/1999/xlink">
+ <defs>
+  <filter id="inset-shadow">
+   <feOffset dx="-2" dy="-2"></feOffset>
+   <feGaussianBlur result="offset-blur" stdDeviation="2"></feGaussianBlur>
+   <feComposite operator="out" in="SourceGraphic" in2="offset-blur" result="inverse"></feComposite>
+   <feFlood flood-color="black" result="color" flood-opacity="1"></feFlood>
+   <feComposite operator="in" in="color" in2="inverse" result="shadow"></feComposite>
+   <feComponentTransfer in="shadow" result="shadow">
+    <feFuncA type="linear" slope=".95"></feFuncA>
+   </feComponentTransfer>
+   <feComposite operator="over" in="shadow" in2="SourceGraphic"></feComposite>
+  </filter>
+ </defs>
+</svg>
+</body>
+</html>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/sideload.json	Tue Jul 05 10:37:38 2022 +0000
@@ -0,0 +1,40 @@
+{
+  "tool": {
+    "name": "Example tool",
+    "version": "1.2.3",
+    "description": "Example of external result sideloading in antiSMASH",
+    "configuration": {
+      "verbose": "true",
+      "multisetting": [
+        "first",
+        "second"
+      ]
+    }
+  },
+  "records": [
+    {
+      "name": "ARBH01000003.1",
+      "subregions": [
+        {
+          "start": 2,
+          "end": 3500,
+          "label": "dhpg biosynthesis",
+          "details": {
+            "score": "6.5"
+          }
+        }
+      ],
+      "protoclusters": [
+        {
+          "core_start": 2,
+          "core_end": 3500,
+          "product": "bht",
+          "details": {
+            "score": "6.5",
+            "some_option_name": "no"
+          }
+        }
+      ]
+    }
+  ]
+}