{% from "variants/indicators.html" import clinical_assessments_badge, research_assessments_badge %} {% macro matchmaker_modal(institute, case, suspects, mme_nodes ) %} {% endmacro %} {% macro modal_mme_delete(institute, case) %}
{% endmacro %} {% macro beacon_modal(institute, case) %}
{% endmacro %} {% macro variant_transcripts(gene) %} {% set n_primary_txs = namespace(count=0) %} {% if n_primary_txs.count > 5 %} .. other transcripts available for this variant are not shown.

{% endif %} {% endmacro %} {% macro pretty_variant(variant) %} {% if variant.category in "str" %} {{ variant.str_repid }} {{ variant.alternative | replace("<", " ") | replace(">", "")}} {% elif variant.category in ("snv", "cancer") %} {% set display_genes = [] %} {% for gene in variant.genes %} {% if gene.hgvs_identifier and gene.hgnc_symbol %} {{ "" if display_genes.append(gene.hgnc_symbol + ' ' + gene.hgvs_identifier|truncate(20,True)) }} {% elif gene.hgnc_symbol %} {{ "" if display_genes.append(gene.hgnc_symbol) }} {% elif gene.hgvs_identifier and gene.hgnc_id %} {{ "" if display_genes.append( gene.hgnc_id|string + ' ' + gene.hgvs_identifier|truncate(20,True)) }} {% endif %} {% endfor %} {% if not display_genes %} {{ "" if display_genes.append( variant.simple_id|truncate(40,True) ) }} {% endif %} {{ display_genes|join(", ") }} {% else %} {{ variant.sub_category|upper }}({{ variant.chromosome }}{{ variant.cytoband_start }}-{{ variant.end_chrom }}{{ variant.cytoband_end }}) {% endif %} {% endmacro %} {% macro pretty_link_variant(variant, case) %} {# Returns human readable links to the corresponding variant page #} {% if variant.category in ("mei", "str", "snv", "cancer") %} {% if variant.category == "cancer" %} {% else %} {% endif %} {% else %} {% endif %} {{ pretty_variant(variant) }} {% endmacro %} {% macro variant_validation_badge(variant) %} {% if variant.validation == 'True positive' %} Validated {% elif variant.validation == 'False positive' %} Validated {% elif variant.sanger_ordered %} Verification ordered {% endif %} {% endmacro %} {% macro tumor_allele_freq(variant) %} {% if variant.tumor %} {{ allele_div(variant.tumor, "Tumor") }} {% endif %} {% if variant.normal %} {{ allele_div(variant.normal, "Normal") }} {% endif %} {% endmacro %} {% macro causatives_list(causatives, partial_causatives, evaluated_variants, institute, case, manual_rank_options, cancer_tier_options) %} {% set already_displayed_variant_ids = [] %}
{% if case.track == 'cancer' %} Clinically significant {% else %} Causative variants ({{causatives|length + partial_causatives|length}}) {% endif %}
{% if not case.causatives|length and not case.partial_causatives|length %}
No causative variants
{% endif %}
{% endmacro %} {% macro allele_div(allele, type) %} {% if 'alt_freq' in allele %}
{{ allele.alt_freq|round(4) }}
{% endif %} {% endmacro %} {% macro suspects_list(suspects, institute, case, manual_rank_options, cancer_tier_options) %}
 Pinned variants ({{suspects|length}})
{% if not suspects|length %}
No pinned variants
{% endif %}
{% endmacro %} {% macro matching_causatives(other_causatives, institute, case, default=False) %}
Matching causatives {% if default %}in case default panels{% endif %}({{other_causatives|length}})
{% endmacro %} {% macro matching_managed_variants(managed_variants, institute, case, default=False) %}
Managed variants {% if default %}in case default panels{% endif %}({{managed_variants|length}})
{% endmacro %} {% macro remove_form(url, hidden_input=None, button_name=None, button_value=None) %}
{% if hidden_input %} {% endif %}
{% endmacro %}