+
+ {# ── Status banner ── #}
+ {% if tax.taxonomy is string %}
+
+ {% else %}
+
+ {% endif %}
+
+ {# ── Mixed rank warning ── #}
+ {% if tax.is_mixed %}
+
+ {% endif %}
+
+ {# ── Sub-tabs ── #}
+
+
+ {# ── Rank Distribution ── #}
+
+ {% if tax.rank_distribution %}
+
+
+
+
+ | Rank |
+ Frequency |
+ Distribution |
+
+
+
+ {% for rank, freq in tax.rank_distribution.items() | sort(attribute='1', reverse=true) %}
+ {% set pct = (freq * 100) | round(1) %}
+
+ | {{ rank if rank else '—' }} |
+ {{ pct }}% |
+
+
+ |
+
+ {% endfor %}
+
+
+
+ {% if tax.is_mixed %}
+
Multiple ranks exceed 5 % — column appears to contain a mixture of taxonomic levels.
+ {% endif %}
+ {% else %}
+
No rank distribution available.
+ {% endif %}
+
+
+ {# ── Invalid Entries ── #}
+ {% if tax.taxonomy is not string %}
+
+
+ These entries could not be matched against the NCBI taxonomy database. Check for spelling errors, synonyms, or outdated names.
+
+
+
+
+ | # | Entry |
+
+
+ {% for entry in tax.taxonomy %}
+
+ | {{ loop.index }} |
+ {{ entry }} |
+
+ {% endfor %}
+
+
+
+
+ {% endif %}
+
+ {# ── Outdated Names ── #}
+ {% if tax.outdated_names %}
+
+
+ These names are recognised but have been replaced by a current scientific name. Consider updating them for consistency.
+
+
+
+
+
+ | Used Name |
+ Current Scientific Name |
+
+
+
+ {% for used, current in tax.outdated_names.items() %}
+
+ | {{ used }} |
+ {{ current }} |
+
+ {% endfor %}
+
+
+
+
+ {% endif %}
+
+ {# ── Tax IDs ── #}
+ {% if tax.taxid %}
+
+ {% if tax.taxid is string %}
+
+ All numeric IDs in this column are valid NCBI taxonomy identifiers.
+
+ {% else %}
+
+ {{ tax.taxid | length }} ID(s) could not be matched against the NCBI taxonomy database.
+
+
+
+
+ | # | Invalid Tax ID |
+
+
+ {% for tid in tax.taxid | sort %}
+
+ | {{ loop.index }} |
+ {{ tid }} |
+
+ {% endfor %}
+
+
+
+ {% endif %}
+
+ {% endif %}
+
+