{% extends "layout_bs4.html" %} {% block title %} {{ super() }} - {{ institute.display_name }} - {{ case.display_name }} {% endblock %} {% block top_nav %} {{ super() }} {% endblock %} {% block content_main %} {% set panel = panel|int %}
{{ patient_data() }}
{{ show_matches('external') }}
{{ show_matches('internal') }}
{% endblock %} {% macro patient_data() %}
Patients
{% for patient in case.mme_submission.patients %}
  • Patient id: {{patient.id}}
  • Patient label: {{patient.label}}
  • Sex: {{patient.sex}}
{% endfor %}
Phenotype features (HPO terms)
{% for hpo in case.mme_submission.features %} {{hpo.id}} {% endfor %}
Diagnoses (OMIM terms)
{% for omim in case.mme_submission.disorders %} {{omim.id}} {% endfor %}

Candidate genes/variants
{% for patient in case.mme_submission.patients %}
{% for g_feat in patient.genomicFeatures %}
    {% for key, value in g_feat.items() %}
  • {% if key == 'gene' %} {{value.id}} {% elif key == 'variant' %} {% for ikey, item in value.items() %} {{ikey}}:{{item}}
    {% endfor %} {% elif key == 'type' %} {{key}}:{{value.label}}
    {% else %} {{key}}:{{value}} {% if value == 1 %} (heteroz. or hemiz. if on X in males) {% elif value == 2 %} (homozygous) {% endif %} {% endif %}
  • {% endfor %}
{% endfor %}
{% endfor %}
{% endmacro %} {% macro show_matches(type) %} {% set matching_patients = [] %}
{% for patient, match_objs in matches.items() %}
{% set p_name = patient.split('.') %}

Showing {{type}} matches for patient {{ p_name[1] }}:

{% for match_obj in match_objs %} {% if match_obj.match_type == type %} {% do matching_patients.append(match_obj.patient_id) %}

{% for match_result in match_obj.patients %} {% endif %} {% if match_result.patient.genomicFeatures%} {% else %} No gene/variant info available {% endif %} {% endfor %}
Score Node ID Contact Phenotypes Diagnoses
{{match_result.score.patient|round(4)}} {{match_result.node.label}} {% if "http" in match_result.patient_id %} link {% else %} {{match_result.patient_id}} {{match_result.patient.contact.name}}
{% if "http" in match_result.patient.contact.href %} contact link {% else %} {{match_result.patient.contact.href}} {% endif %} {% if match_result.patient.contact.institution %}
{{match_result.patient.contact.institution}} {% endif %} {% if match_result.patient.contact.email %}
{{match_result.patient.contact.email|replace("mailto:","")}} {% endif %}
{% for feature in match_result.patient.features %} {{feature.label}}({{feature.id}}) {% else %} - {% endfor %} {% for omim in match_result.patient.disorders %} {{omim.id}} {% else %} - {% endfor %}
Gene/Variants: {% for g_feat in match_result.patient.genomicFeatures %}
{{loop.index}}
{{ g_feat.gene._geneName}} {{g_feat.gene.id}} , Variant:{{g_feat.variant|replace("'", "") or '-'}}, Type:{{g_feat.type|replace("'", "") or '-'}}, zygosity:{{g_feat.zygosity or '-'}}
{% endfor %}

{% endif %} {% endfor %} {% if not matching_patients %}

No matches available for this patient. {% endif %}
{% endfor %}
{% endmacro %} {% block scripts %} {{ super() }} {% endblock %}