{% extends "layout_bs4.html" %} {% from "variants/components.html" import gene_cell, frequency_cell %} {% from "variants/utils.html" import cancer_filters %} {% 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 %} {% endfor %}
Rank Variant:Transcript:Exon:HGVS Tier Score Gene Chr pos ExAC Type Consequence Tumor Normal
{{ variant.variant_rank }} {% for annotation in variant.canonical_transcripts %}
{{ annotation }}
{% endfor %}
{{ tier_cell(variant) }} {{ 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 tier_cell(variant) %} {% if variant.manual_rank %} {% if variant.manual_rank == 1 %} {% set label_class = 'default' %} {% elif variant.manual_rank == 2 %} {% set label_class = 'info' %} {% elif variant.manual_rank == 3 %} {% set label_class = 'primary' %} {% elif variant.manual_rank == 4 %} {% set label_class = 'warning' %} {% elif variant.manual_rank == 5 %} {% set label_class = 'danger' %} {% endif %}
{{ variant.manual_rank }}
{% endif %} {% endmacro %} {% macro score_cell(variant) %} {% if variant.rank_score %} {% if variant.rank_score < 3 %} {% set label_class = 'default' %} {% elif variant.rank_score == 3 %} {% set label_class = 'info' %} {% elif variant.rank_score == 4 %} {% set label_class = 'primary' %} {% elif variant.rank_score == 5 %} {% set label_class = 'mixed' %} {% elif variant.rank_score == 6 %} {% set label_class = 'warning' %} {% elif variant.rank_score > 6 %} {% 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(4) }}% {% else %} N/A {% endif %}
{{ allele.ref_depth }} / {{ allele.alt_depth }} {% endmacro %} {% block scripts %} {{ super() }} {% endblock %}