{% 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, colour_subset) -%}
{{ segment.start }}
{{ coloured_ripp_sequence(segment.sequence, colour_subset=colour_subset) }}
{{ segment.end }}
{%- endmacro -%} {%- macro create_hit_block(hit, tail, tail_list, colour_subset) -%}
{{ "%.1f" % (hit.similarity*100) }}% {{ description(hit) }}
{{ segment_line(hit.query, colour_subset) }}
{{ hit.get_consensus_html(colour_subset=colour_subset) }}
{{ segment_line(hit.reference, colour_subset) }}
{%- endmacro -%} {%- set display_limit = 3 -%} {%- set extra_limit = 10 -%}

{{ 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, colour_subset) }} {%- endfor %}
{%- if groups | length > display_limit -%}
with {{ groups | length - display_limit }} more sequence matches {{ collapser_start("comparippson-worse-hits", "none") }} {%- set extras = [extra_limit, groups | length - display_limit] | min -%} {%- if groups | length - display_limit > extra_limit -%}
Only the first {{ extras }} are displayed here.
{%- endif -%} {% for hit, tail, tail_list in groups[display_limit:display_limit + extra_limit] -%} {{ create_hit_block(hit, tail, tail_list, colour_subset) }} {% endfor -%} {{ collapser_end() }}
{%- endif -%} {%- endif %}