{% extends "layout_bs4.html" %} {% from "variants/components.html" import gene_cell, frequency_cell %} {% from "variants/utils.html" import cancer_filters, tier_cell, cell_rank %} {% block title %} {{ variant_type|capitalize }} cancer variants {% endblock %} {% block css %} {{ super() }} {% endblock %} {% block top_nav %} {{ super() }} {% endblock %} {% block content_main %}
{{ cancer_filters(form, institute, case) }}
{% for variant in variants %} {% if variant.dismiss_variant %} {% else %} {% endif %} {% endfor %}
Rank Variant:Transcript:Exon:HGVS Tier Score Gene Chr pos ExAC Type Consequence Tumor Normal
{{cell_rank(variant, institute, case, form, manual_rank_options)}} {% for annotation in variant.canonical_transcripts %}
{{ annotation }}
{% endfor %}
{{ tier_cell(variant, manual_rank_options, cancer_tier_options) }} {{ score_cell(variant) }} {{ gene_cell(variant) }} {{ position_cell(variant) }} {{ frequency_cell(variant) }} {{ variant.sub_category }} {% for annotation in variant.functional_annotations %}
{{ annotation }}
{% endfor %}
{{ allele_cell(variant.tumor or {}) }} {{ allele_cell(variant.normal or {}) }}

{{ pagination() }}
{% endblock %} {% macro pagination() %}
{% if more_variants %}
{% else %} No more variants to display {% endif %}
{% endmacro %} {% macro actions_cell(variant) %} View {% if variant.comments %} {% endif %} {% endmacro %} {% macro score_cell(variant) %} {% if variant.rank_score %} {% if variant.rank_score <= 4 %} {% set label_class = 'default' %} {% elif variant.rank_score == 5 %} {% set label_class = 'info' %} {% elif variant.rank_score == 6 %} {% set label_class = 'primary' %} {% elif variant.rank_score == 7 %} {% set label_class = 'warning' %} {% elif variant.rank_score > 8 %} {% set label_class = 'danger' %} {% endif %} {% endif %}
{{ variant.rank_score }}
{% endmacro %} {% macro position_cell(variant) %} {{ variant.chromosome }}:{{ variant.position }} {% endmacro %} {% macro allele_cell(allele) %} {% if 'alt_freq' in allele %} {{ (allele.alt_freq * 100)|round(2) }}%
{{ allele.alt_depth }} | {{ allele.ref_depth }} {% else %} N/A {% endif %} {% endmacro %} {% block scripts %} {{ super() }} {% endblock %}