{% from "variants/components.html" import variant_gene_symbols_cell, variant_funct_anno_cell, fusion_variant_gene_symbols_cell %} {% macro analysis_type(analysis_types) %} {% for analysis_type in analysis_types %} {% if analysis_type == 'wgs' %} {% set badge_class = 'primary' %} {% elif analysis_type == 'wes' %} {% set badge_class = 'warning' %} {% elif analysis_type == 'tga' %} {% set badge_class = 'info' %} {% elif analysis_type in ['panel', 'panel-umi'] %} {% set badge_class = 'info' %} {% elif analysis_type == 'mixed' %} {% set badge_class = 'dark' %} {% elif analysis_type == 'external' %} {% set badge_class = 'danger' %} {% elif analysis_type == 'wts' %} {% set badge_class = 'success' %} {% else %} {% set badge_class = 'default' %} {% endif %} {{ analysis_type|upper }} {% endfor %} {% endmacro %} {% macro institute_settings(form, beacon_form, institute, current_user, loqus_instances) %}
{{ form.csrf_token }}

Institute Settings

General settings
{{ form.display_name.label(class="control-label",data_bs_toggle="tooltip", data_bs_placement="top", title="Name of the institute which will be displayed on Scout pages.") }} {{ form.display_name(class='form-control', value=institute.display_name) }} {% for error in form.display_name.errors %} {{ error }}
{% endfor %}
{{form.sanger_emails.label(class="control-label",data_bs_toggle="tooltip", data_bs_placement="top", title="Email addresses to send variant verification email to. Only accepts current Scout user emails: exceptions to this can be made by a db admin. Please ask for support!")}} {% for error in form.sanger_emails.errors %} {{ error }}
{% endfor %}
{{ form.coverage_cutoff.label(class="control-label",data_bs_toggle="tooltip", data_bs_placement="top", title="Read depth considered reliable for displaying variants. Used in coverage reports.") }} {{ form.coverage_cutoff(class='form-control', value=institute.coverage_cutoff) }} {% for error in form.coverage_cutoff.errors %} {{ error }}
{% endfor %}
{{ form.frequency_cutoff.label(class="control-label",data_bs_toggle="tooltip", data_bs_placement="top", title="Lower frequency threshold to display variants. NOTE: used as the institute's default in clinical filter.") }} {{ form.frequency_cutoff(class='form-control', value=institute.frequency_cutoff) }} {% for error in form.frequency_cutoff.errors %} {{ error }}
{% endfor %}
Phenotype groups
{{ form.pheno_group.label(class="control-label",data_bs_toggle="tooltip", data_bs_placement="top", title="Add a new phenotype group item to the list of phenotype shortcuts below.") }}
{{ form.pheno_abbrev.label(class="control-label",data_bs_toggle="tooltip", data_bs_placement="top", title="A short name for this phenotype group.") }}
{{ form.pheno_groups.label(class="control-label",data_bs_toggle="tooltip", data_bs_placement="top", title="Phenotype groups are used to quickly assign a certain phenotype to a case, on the case page.") }}
Cohorts
{{form.cohorts.label(class="control-label",data_bs_toggle="tooltip", data_bs_placement="top", title="Categories used to subdivide patients")}}
Variants and gene panels searching
{{ form.institutes.label(class="control-label",data_bs_toggle="tooltip", data_bs_placement="top", title="Allow case sharing only with preselected institutes.") }}
{{ form.gene_panels.label(class="control-label",data_bs_toggle="tooltip", data_bs_placement="top", title="Select gene panels that will be available for variants filtering.") }}
{{ form.gene_panels_matching.label(class="control-label",data_bs_toggle="tooltip", data_bs_placement="top", title="Limit incidental findings by looking for matching managed and causatives variants only in these panels") }}
{{ form.check_show_all_vars.label(class="control-label", data_bs_toggle="tooltip", data_bs_placement="top", title="Check this box if you want all variants (and not just those occurring in the affected individuals) to be shown by default on variants page") }}
{% if "admin" in current_user.roles %}
LoqusDB
{{ form.loqusdb_id.label(class="control-label", data_bs_toggle="tooltip", data_bs_placement="top", title="LoqudDB id" ) }}
Alamut Plus*
{{ form.alamut_key.label(class="control-label") }} {{ form.alamut_key(class='form-control', value=institute.alamut_key if institute.alamut_key) }}
{{ form.alamut_institution.label(class="control-label") }} {{ form.alamut_institution(class='form-control', value=institute.alamut_institution if institute.alamut_institution) }}
ClinVar API submissions*
{{ form.clinvar_key.label(class="control-label") }} {{ form.clinvar_key(class='form-control', value=institute.clinvar_key if institute.clinvar_key) }}
{{form.clinvar_emails.label(class="control-label",data_bs_toggle="tooltip", data_bs_placement="top", title="Scout users who should be able to submit for you institute using this key. Only accepts current Scout user emails.")}}
{% endif %}
{{ form.submit_btn(class="btn-primary btn") }}
{% if current_user.is_admin and config.BEACON_URL and config.BEACON_TOKEN %}
The following institute-level datasets are missing and could be created in Beacon:
{{beacon_form.beacon_dataset(class="selectpicker btn-secondary")}}
{{beacon_form.beacon_submit_btn(class="btn-secondary btn")}}
{% endif %}
{% endmacro %} {% macro users_table(users) %} {% for user in users %} {% endfor %}
# Name E-mail Roles Last connected
{{loop.index}} {{user.name}} {{user.email}} {{user.roles|join(', ')}} {{user.accessed_at or "-"}}
{% endmacro %} {% macro variant_list_content(institute, variants, acmg_map, callers) %}
{% for variant in variants %} {% set case = variant["case_obj"] %} {% set analysis_types = [] %} {% for score in [variant.revel, variant.revel_score] %} {% endfor %} {% endfor %}
List of selected variants
Gene Variant Change HGVS[c] HGVS[p] Functional Annotation Category Callers CADD score Rank score Revel score Revel rank score SpliceAI DS max Zygosity Inheritance ACMG Case Analysis type Validated status
{% if variant.category == "fusion" %} {{ fusion_variant_gene_symbols_cell(variant) }} {% else %} {{ variant_gene_symbols_cell(variant) }} {% endif %} {% set var_type_page = {"snv":"variant.variant", "str":"variant.variant", "mei": "variant.variant", "cancer":"variant.cancer_variant", "sv":"variant.sv_variant", "cancer_sv": "variant.sv_variant", "fusion": "variant.variant"} %} {% for key, page in var_type_page.items() %} {% if variant.category == key %} {{ variant.display_name|truncate(15, True) }} {% endif %} {% endfor %} {% if variant.category in 'str' %} {{ variant.alternative|truncate(10, True) | replace("<", " ") | replace(">", "")}} {% else %} {{ variant.reference|truncate(10, True) }} → {{ variant.alternative|truncate(10, True) }} {% endif%} {% if variant.first_rep_gene and variant.first_rep_gene.hgvs_identifier %} {{variant.first_rep_gene.hgvs_identifier|truncate(15, True)}} {% else %} - {% endif %} {% if variant.first_rep_gene and variant.first_rep_gene.hgvsp_identifier %} {{variant.first_rep_gene.hgvsp_identifier|truncate(15, True)}} {% else %} - {% endif %} {{ variant_funct_anno_cell(variant) }} {{ variant.category|upper }} {% for key, values in callers.items() %} {% if variant.category == key %} {% for caller in values %} {% if caller.id in variant %} {{caller.name}}:{{variant[caller.id]}}  {% endif %} {% endfor %} {% endif %} {% endfor %} {% if variant.cadd_score %} {{ variant.cadd_score|round(2) }} {% else %} - {% endif %} {{ variant.rank_score }} {% if variant.category == 'sv' %} (v. {{case.sv_rank_model_version or 'na'}}) {% else %} (v. {{case.rank_model_version or 'na'}}) {% endif %} {% if score %} {{score|round(2)}} {% else %} - {% endif %} {{ variant.spliceai_scores|list_remove_none|join(', ') if variant.spliceai_scores else "-" }} {%- for sample in variant.samples -%} {%- for ind in case.individuals -%} {%- if sample.sample_id == ind.individual_id -%} {% if sample.genotype_call not in ['0/0', './.', '0/.', './0'] %} {% do analysis_types.append(ind.analysis_type) %} {% endif %} {% set allele_depths = ['ref depth', sample.allele_depths[0]]|join(":") + ' - ' + ['alt depth', sample.allele_depths[1]]|join(":") %} {{sample.genotype_call}} GQ:{{sample.genotype_quality}} AD:{{sample.allele_depths[0]}}|{{sample.allele_depths[1]}} {%- endif -%} {%- endfor -%} {%- endfor -%} {% for model in variant.genetic_models %} {{model}} {% endfor %} {% if 'acmg_classification' in variant %} {{acmg_map[variant.acmg_classification].short}} {% else %} - {% endif %} {{ case.display_name }} {{ case.status }} {% if (case.partial_causatives and variant._id in case.partial_causatives) %} partial {% endif %} {{ analysis_type(analysis_types|unique) }} {% if variant.validation %} {{ variant.validation }} {% endif %}
{% endmacro %}