{% macro link(hit) -%} {%- if db.url -%} {{ db.build_identifier_for_hit(hit) }} {%- else -%} {{ db.build_identifier_for_hit(hit) }} {%- endif -%} {%- endmacro -%} {% macro description(hit) -%} {{ db.build_description_for_hit(hit) }} {%- endmacro %} {% macro segment_line(segment) -%}
{{ segment.start }}
{{ coloured_ripp_sequence(segment.sequence) }}
{{ segment.end }}
{%- endmacro -%} {%- macro create_hit_block(hit, tail, tail_list) -%}
{{ "%.1f" % (hit.similarity*100) }}% {{ link(hit) }} {%- if tail_list %}{{ tail }}:{{ collapser_start("comparippson-extra-names", level="none") }}
{%- for other in tail_list -%} {{ link(other) }} {{ description(other) }} {%- endfor %}
{{ collapser_end() }}{% else %}:{% endif %}
{{ description(hit) }}
{{ segment_line(hit.query) }}
{{ hit.get_consensus(space="\u00A0") }}
{{ segment_line(hit.reference) }}
{%- endmacro -%} {%- set display_limit = 3 -%}

{{ db.name }} {{ db.version }} matches for {{ name }}

{% if not groups -%} No matches found. {%- else -%}
{% for hit, tail, tail_list in groups[:display_limit] -%} {{ create_hit_block(hit, tail, tail_list) }} {%- endfor %}
{%- if groups | length > display_limit -%}
with {{ groups | length - display_limit }} more sequence matches {{ collapser_start("comparippson-worse-hits", "none") }} {% for hit, tail, tail_list in groups[display_limit:] -%} {{ create_hit_block(hit, tail, tail_list) }} {% endfor -%} {{ collapser_end() }}
{%- endif -%} {%- endif %}