<div id="comparison-{{class_name}}-{{region.anchor_id}}-{{tag}}" class="comparison-container {{extra_class}}">
  {% if results %}
  <table class="cc-heat-table">
    <tr>
     <th>Reference</th>
     <th><span class="cc-heat-product">Aggregated</span></th>
     <th>Similarity score</th>
     <th>Type</th>
     <th>Compound(s)</th>
     <th>Organism</th>
    </tr>
    {% for score in proto_results %}
     {% set ref = score.reference %}
     <tr class="cc-heat-row heat-row-{{class_name}}" data-accession="{{ref.get_identifier()}}">
      <td>{% if url %}<a href="{{url.format(accession=ref.accession.split('.')[0], version=ref.accession.split('.')[1], start=ref.start, end=ref.end)}}" target="_new">{{ref.accession if class_name == "MIBiG" else ref.get_identifier()}}</a>{% else %} {{ref.get_identifier()}} {% endif %}</td>
      {% set perc = "{:.0f}".format(score.final_score*100) %}
      {% set colour = "rgb(0, 0, 0, {:.2f})".format(score.final_score) %}
      <td class="cc-heat-cell" title="{{score.table_string()}}" style="background-image: linear-gradient(to top, {{colour}}, {{colour}} {{perc}}%, white {{perc}}%)"></td>
      <td>{{"{:.2f}".format(score.final_score)}}</td>
      <td>{{ref.get_product_string()}}</td>
      <td>{{ref.description}}</td>
      <td>{{ref.organism}}</td>
     </tr>
    {% endfor %}
   </table>
  {% else %}
    <div><p>No matches found.</p></div>
  {% endif %}
</div>
