{% from "cases/utils.html" import variant_transcripts %}
{% from "utils.html" import comments_table, variant_related_comments_table %}
{% extends "report_base.html" %}
{% block title %}
{{ super() }} - {{ institute.display_name }} - {{ case.display_name }}
{% endblock %}
{% set affected = [] %}
{% set printed_vars = [] %}
{% block body %}
Case {{case.display_name}}
Scout case analysis report - created on:
{{report_created_at}}
{{ phenotype_panel() }}
{{ gene_panels_panel()}}
{{ causatives_panel()}}
{{ pinned_panel() }}
{{ classified_panel() }}
{{ tagged_panel() }}
{{ commented_panel() }}
{{ dismissed_panel() }}
[END OF VARIANT REPORT]
{% if coverage_report %}
{{ coverage_report|safe }}
{% endif %}
clinical-genomics.github.io/scout
{% endblock %}
{% macro phenotype_panel() %}
{% if case.madeline_info and case.individuals|length > 1 %}
{% if format == 'html' %}
{{ case.madeline_info|safe }}
{% elif case.madeline_path %}
{% endif %}
{% endif %}
Case created: {{case.created_at.strftime('%Y-%m-%d')}}
Last updated: {{case.updated_at.strftime('%Y-%m-%d') if case.updated_at else "n.a." }}
Sample
Sex
Status
Sequencing
{% if not cancer %}
Ancestry (pred.)
Parenthood
{% endif %}
{% for ind in case.individuals %}
{{ ind.display_name }}
{% if ind.sex == '2' %}
F
{% elif ind.sex == '1' %}
M
{% else %}
n.a.
{% endif %}
{% if ind.confirmed_sex %}
V
{% endif %}
{% if ind.phenotype==2 %}
{% do affected.append(ind.display_name) %}
{{ ind.phenotype_human }}
{% else %}
{{ ind.phenotype_human }}
{% endif %}
{{ ind.analysis_type|upper }}
{% if not cancer %}
{{ ind.predicted_ancestry or 'N/A' }}
{% if ind.confirmed_parent == True %}
V
{% elif ind.confirmed_parent == False %}
!
{% else %}
N/A
{% endif %}
{% endif %}
{% endfor %}
Case status:
{% if 'solved' in case.status%}
{{case.status.upper()}}
{% else %}
{{case.status.upper()}}
{% endif %}
{% if case.synopsis %}
Synopsis:
{{ case.synopsis|markdown }}
{% endif %}
Associated phenotypes:
{% if case.phenotype_terms %}
{% for pheno in case.phenotype_terms %}
{{pheno.feature}} - ({{pheno.phenotype_id}})
{% for feature_ind in pheno.individuals %}
{% for case_ind in case.individuals %}
{% if feature_ind.individual_name == case_ind.display_name %}
{{case_ind.display_name}}
{% endif %}
{% endfor %}
{% endfor %}
{% endfor %}
{% else %}
No associated HPO terms.
{% endif %}
Associated diagnoses:
{% if case.diagnosis_phenotypes %}
{% for dia in case.diagnosis_phenotypes %}
{{dia.description}} ({{dia.disease_id}})
{% for feature_ind in dia.individuals %}
{% for case_ind in case.individuals %}
{% if feature_ind.individual_name == case_ind.display_name %}
{{case_ind.display_name}}
{% endif %}
{% endfor %}
{% endfor %}
{% endfor %}
{% else %}
No associated OMIM diagnoses.
{% endif %}
{% if comments | count_cursor > 0 %}
{% else %}
{% endif %}
{% if audits | count_cursor > 0 %}
Filters marked audited for case
{% set audit_query = namespace() %}
{% for audit in audits %}
{% set audit_query = audit.link|url_args %}
{{ audit.subject }} ({{audit_query.variant_type if audit_query.variant_type else "type unavailable -"}} {{ audit_query.category if audit_query.category else "category unavailable"}}) was marked checked by {{ audit.user_name }} on {{audit.created_at.strftime('%Y-%m-%d')}}.
{% endfor %}
{% endif %}
{% endmacro %}
{% macro gene_panels_panel() %}
Panel
Version
Genes
{% for panel in case.panels %}
{% if panel.is_default %}
{{ panel.display_name|truncate(75, True) }}
{{ panel.version }} ({{ panel.updated_at.date() }})
{{ panel.nr_genes }}
{% endif %}
{% else %}
No panels linked to case
{% endfor %}
{% endmacro %}
{% macro causatives_panel() %}
{% if variants.causatives_detailed or variants.partial_causatives_detailed %}
{% for causative in variants.causatives_detailed|sort(attribute='variant_rank') + variants.partial_causatives_detailed|sort(attribute='variant_rank') %}
{% do printed_vars.append(causative['_id']) %}
{{ variant_content(causative, loop.index) }}
{% endfor %}
{% else %}
No causative variants available for this case
{% endif %}
{% endmacro%}
{% macro pinned_panel() %}
{% set duplicated_variants = [] %}
{% if variants.suspects_detailed %}
{% if cancer %}
{{ somatic_variant_table(variants.suspects_detailed) }}
{% endif %}
{% for pinned in variants.suspects_detailed|sort(attribute='variant_rank') %}
{% if pinned['_id'] not in printed_vars %}
{% do printed_vars.append(pinned['_id']) %}
{{ variant_content(pinned, loop.index) }}
{% else %}
{% do duplicated_variants.append(pinned['_id']) %}
{% endif %}
{% endfor %}
{% else %}
No pinned variants available for this case
{% endif %}
{% if variants.suspects_detailed and duplicated_variants|length == variants.suspects_detailed.suspects_detailed|length %}
All pinned variants are described among the causative variants
{% endif %}
{% endmacro %}
{% macro classified_panel() %}
{% set duplicated_variants = [] %}
{% if variants.classified_detailed %}
{% for variant in variants.classified_detailed|sort(attribute='variant_rank') %}
{% if variant['_id'] not in printed_vars %}
{% do printed_vars.append(variant['_id']) %}
{{ variant_content(variant, loop.index) }}
{% else %}
{% do duplicated_variants.append(variant['_id']) %}
{% endif %}
{% endfor %}
{% else %}
No ACMG-classified variants available for this case
{% endif %}
{% if variants.classified_detailed and duplicated_variants|length == variants.classified_detailed|length %}
All ACMG-classified variants are already described in the previous views
{% endif %}
{% endmacro %}
{% macro tagged_panel() %}
{% set duplicated_variants = [] %}
{% if variants.tagged_detailed %}
{% for variant in variants.tagged_detailed|sort(attribute='variant_rank') %}
{% if variant['_id'] not in printed_vars %}
{% do printed_vars.append(variant['_id']) %}
{{ variant_content(variant, loop.index) }}
{% else %}
{% do duplicated_variants.append(variant['_id']) %}
{% endif %}
{% endfor %}
{% endif %}
{% if variants.tier_detailed %}
{% for variant in variants.tier_detailed|sort(attribute='variant_rank') %}
{% if variant['_id'] not in printed_vars %}
{% do printed_vars.append(variant['_id']) %}
{{ variant_content(variant, loop.index) }}
{% else %}
{% do duplicated_variants.append(variant['_id']) %}
{% endif %}
{% endfor %}
{% endif %}
{% if not (variants.tagged_detailed or variants.tier_detailed) %}
No tagged variants for this case
{% endif %}
{% if (variants.tagged_detailed or variants.tier_detailed) and duplicated_variants|length == (variants.tagged_detailed|length+variants.tier_detailed|length) %}
All tagged variants are already described in the previous views
{% endif %}
{% endmacro %}
{% macro variant_content(variant, index) %}
{% if variant.category == 'snv' %}
{{ sn_variant_content(variant, index) }}
{% elif variant.category == 'cancer' %}
{{ sn_variant_content(variant, index) }}
{% elif variant.category == 'str' %}
{{ str_variant_content(variant, index) }}
{% else %}
{{ sv_variant_content(variant, index) }}
{% endif %}
{% endmacro %}
{% macro commented_panel() %}
{% set duplicated_variants = [] %}
{% if variants.commented_detailed %}
{% for variant in variants.commented_detailed|sort(attribute='variant_rank') %}
{% if variant['_id'] not in printed_vars %}
{% do printed_vars.append(variant['_id']) %}
{% if variant.category == 'snv' %}
{{ sn_variant_content(variant, loop.index) }}
{% elif variant.category == 'cancer' %}
{{ sn_variant_content(variant, loop.index) }}
{% elif variant.category == 'str' %}
{{ str_variant_content(variant, loop.index) }}
{% else %}
{{ sv_variant_content(variant, loop.index) }}
{% endif %}
{% else %}
{% do duplicated_variants.append(variant['_id']) %}
{% endif %}
{% endfor %}
{% else %}
No commented variants for this case
{% endif %}
{% if variants.commented_detailed and duplicated_variants|length == variants.commented_detailed|length %}
All commented variants are already described in the previous views
{% endif %}
{% endmacro %}
{% macro sn_variant_content(variant, index) %}
Coordinates
Cytoband
nucl. change
SNP ids
Gene panels
chr{{variant.chromosome}}:{{variant.position}}-{{variant.end}}
{% if variant.cytoband_start and variant.cytoband_end %}
{{variant.cytoband_start}}-{{variant.cytoband_end}}
{% else %}
-
{% endif %}
{{variant.reference}} → {{variant.alternative}}
{% if variant.dbsnp_id %}
{% set dbsnp_ids = variant.dbsnp_id.split(';') %}
{% for snp in dbsnp_ids %}
{% if "rs" in snp %}
dbSNP:{{ snp }}
{% else %}
ClinVar:{{ snp }}
{% endif %}
{% endfor %}
{% else %}
-
{% endif %}
{% if variant.panels%}
{% if variant.panels|length <= 3 %}
{% for panel_id in variant.panels %}
{{ panel_id }}
{% endfor %}
{% else %}
{{ variant.panels|length }} panels
{% endif %}
{% endif %}
{{ genotype_table(variant) }}
Pop. frequency
{% if variant.frequency == 'common' %}
{{variant.frequency}}
{% elif variant.frequency == 'uncommon' %}
{{variant.frequency}}
{% else %}
{{variant.frequency}}
{% endif %}
{% if variant.dbsnp_id %}
1000G
{% else %}
1000G
{% endif %}
{% if variant.max_thousand_genomes_frequency %}
{{ variant.max_thousand_genomes_frequency|human_decimal }} (max) |
{% endif %}
{{ variant.thousand_genomes_frequency|human_decimal if variant.thousand_genomes_frequency }}
{% if not variant.max_thousand_genomes_frequency and not variant.thousand_genomes_frequency %}
Not annotated
{% endif %}
ExAC
{% if variant.max_exac_frequency %}
{{ variant.max_exac_frequency|human_decimal }} (max) |
{% endif %}
{{ variant.exac_frequency|human_decimal if variant.exac_frequency }}
{% if not variant.max_exac_frequency and not variant.exac_frequency %}
Not annotated
{% endif %}
gnomAD
{% if 'gnomad_frequency' in variant%}
{% if variant.max_gnomad_frequency %}
{{ variant.max_gnomad_frequency|human_decimal }}
(max) |
{% endif %}
{{ variant.gnomad_frequency|human_decimal if variant.gnomad_frequency }}
{% else %}
Not annotated
{% endif %}
Scout Rank
Scout score
Manual rank
CADD score
{% if not cancer %}
Inheritance models
{% endif %}
ACMG classification
{{variant.variant_rank}}
{{variant.rank_score}}
{% if variant.manual_rank %}
{{ manual_rank_options[variant.manual_rank]['label'] }}
{% endif %}
{% if variant.cancer_tier %}
{{ cancer_tier_options[variant.cancer_tier]['label'] }}
{% endif %}
{% if not (variant.manual_rank or variant.cancer_tier) %}
-
{% endif %}
{% if variant.cadd_score %}
{{ variant.cadd_score|round(1) }}
{% else %}
-
{% endif %}
{% if not cancer %}
{% if variant.genetic_models %}
{% for model in variant.genetic_models|sort %}
{{ model }}
{% endfor %}
{% else %}
No models followed
{% endif %}
{% endif %}
{% if variant.acmg_classification %}
{{variant.acmg_classification['code'] }}
{% else %}
-
{% endif %}
Affected gene(s)
Description
Region annotation
Transcript - HGVS - Protein
OMIM phenotypes [inheritance]
{% if variant.genes %}
{% for gene in variant.genes %}
{{ gene.common.hgnc_symbol if gene.common else gene.hgnc_id }}
{{gene.description|title}}
{{gene.region_annotation}}
{{ variant_transcripts(gene) }}
{% for disease_term in gene.disease_terms %}
{{ disease_term.description }} {{ disease_term.inheritance }}
{% endfor %}
{% endfor %}
{% endif %}
{% if variant.comments | count_cursor > 0 %}
{{ variant_related_comments_table(variant, case) }}
{% endif %}
{% endmacro %}
{% macro dismissed_gene_list(variant) %}
{% if variant.genes %}
{% if variant.genes|length > 3%}
{{ variant.hgnc_symbols|length }} genes
{% else %}
{% for gene in variant.genes %}
{{ gene.hgnc_symbol }} {{gene.region_annotation}}
{% endfor %}
{% endif %}
{% else %}
-
{% endif %}
{% endmacro %}
{% macro dismissed_panel() %}
{% if variants.dismissed_detailed %}
Variant
Category
Genes
Dismissed description
{% for variant in variants.dismissed_detailed|sort(attribute='variant_rank') %}
#{{loop.index}}
{% if variant.category == 'snv' %}
{{variant.display_name[:30]}}
{% elif variant.category == 'cancer' %}
{{variant.display_name[:30]}}
{% elif variant.category == 'sv' %}
chr{{variant.chromosome}}:{{variant.position}}_{{variant.sub_category|upper}}
{% else %}
rep. {{variant.str_repid}}
{% endif %}
{{variant.category|upper}}
{{ dismissed_gene_list(variant) }}
{% for reason in variant.dismiss_variant if not reason == "Select a tag" %}
{{dismissed_options[reason|int]['description']}}
{% if reason == '2' and variant.category == 'snv'%}
Pop. frequency
{% if variant.frequency == 'common' %}
{{variant.frequency}}
{% elif variant.frequency == 'uncommon' %}
{{variant.frequency}}
{% else %}
{{variant.frequency}}
{% endif %}
{% if variant.dbsnp_id %}
1000G
{% else %}
1000G
{% endif %}
{% if variant.max_thousand_genomes_frequency %}
{{ variant.max_thousand_genomes_frequency|human_decimal }} (max) |
{% endif %}
{{ variant.thousand_genomes_frequency|human_decimal if variant.thousand_genomes_frequency }}
{% if not variant.max_thousand_genomes_frequency and not variant.thousand_genomes_frequency %}
Not annotated
{% endif %}
ExAC
{% if variant.max_exac_frequency %}
{{ variant.max_exac_frequency|human_decimal }} (max) |
{% endif %}
{{ variant.exac_frequency|human_decimal if variant.exac_frequency }}
{% if not variant.max_exac_frequency and not variant.exac_frequency %}
Not annotated
{% endif %}
gnomAD
{% if 'gnomad_frequency' in variant%}
{% if variant.max_gnomad_frequency %}
{{ variant.max_gnomad_frequency|human_decimal }}
(max) |
{% endif %}
{{ variant.gnomad_frequency|human_decimal if variant.gnomad_frequency }}
{% else %}
Not annotated
{% endif %}
{% elif reason == '7' %}
({% if variant.genetic_models %}
{% for model in variant.genetic_models|sort %}
{{model}}
{% endfor %}
{% else %}
No models followed
{% endif %})
{% elif reason== '23' %}
Sample
Genotype (GT)
Allele depth (AD)
Genotype quality
Ref.
Alt.
{% for sample in variant.samples %}
{{ sample.display_name }}
{{ sample.genotype_call }}
{% if sample.allele_depths %}
{% for number in sample.allele_depths %}
{{ number }}
{% endfor %}
{% else %}
N/A
N/A
{% endif %}
{{ sample.genotype_quality }}
{% endfor %}
{% endif %}
{% endfor %}
{% if variant.comments | count_cursor > 0 %}
{{ comments_table(institute, case, variant.comments) }}
{% endif %}
{% endfor %}
{% else %}
No dismissed variants for this case
{% endif %}
{% endmacro %}
{% macro sv_variant_content(variant,index) %}
Variant type
length
Coordinates
Cytoband
Gene panels
Callers
{{variant.sub_category|upper}}
{{ variant.length }}
{% if variant.chromosome == variant.end_chrom %}
chr{{variant.chromosome}}:{{variant.position}}-{{variant.end}}
{% else %}
chr{{variant.chromosome}}:{{variant.position}}/chr{{variant.end_chrom or variant.chromosome}}:{{variant.end}}
{% endif %}
{% if variant.cytoband_start and variant.cytoband_end %}
{{variant.cytoband_start}}-{{variant.cytoband_end}}
{% else %}
-
{% endif %}
{% if variant.panels %}
{% if variant.panels|length <= 3 %}
{% for panel_id in variant.panels %}
{{ panel_id }}
{% endfor %}
{% else %}
{{ variant.panels|length }} panels
{% endif %}
{% endif %}
{% if variant.callers %}
{% for caller,call in variant.callers|sort %}
{{ caller+':'+call }}
{% endfor %}
{% else %}
-
{% endif %}
{{genotype_table(variant)}}
Pop. frequency
{% for freq_name, value, link in variant.frequencies %}
{{ freq_name }}
{% if value %}
{{ value|human_decimal }}
{% else %}
Not annotated
{% endif %}
{% endfor %}
Scout Rank
Scout score
Manual rank
{% if not cancer %}
Inheritance models
{% endif %}
ACMG classification
{{variant.variant_rank}}
{{variant.rank_score}}
{% if variant.manual_rank %}
{{ manual_rank_options[variant.manual_rank]['label'] }}
{% endif %}
{% if variant.cancer_tier %}
{{ cancer_rank_options[variant.cancer_tier]['label'] }}
{% endif %}
{% if not (variant.manual_rank or variant.cancer_tier) %}
-
{% endif %}
{% if variant.genetic_models %}
{% for model in variant.genetic_models|sort %}
{{ model }}
{% endfor %}
{% else %}
No models followed
{% endif %}
{% if variant.acmg_classification %}
{{variant.acmg_classification['code'] }}
{% else %}
-
{% endif %}
{% if variant.genes and variant.genes|length <= 3 %}
Affected gene(s)
Description
Region annotation
Transcript - HGVS - Protein
OMIM phenotypes [inheritance]
{% for gene in variant.genes %}
{{ gene.common.hgnc_symbol if gene.common else gene.hgnc_id }}
{{gene.description|title}}
{{gene.region_annotation}}
{{ variant_transcripts(gene) }}
{% for disease_term in gene.disease_terms %}
{{ disease_term.description }} {{ disease_term.inheritance }}
{% endfor %}
{% endfor %}
{% elif variant.genes %}
{{ variant.hgnc_symbols|length }} affected gene(s)
{% if variant.hgnc_symbols|length() <= 10 %}
{{ variant.hgnc_symbols|sort|join(" ") }}
{% elif genes_in_panels %}
Genes matching one or more case default gene panels: {{ variant.hgnc_symbols|list_intersect(genes_in_panels)|sort|join(" ") }}
{% endif %}
{% endif %}
{% if variant.comments | count_cursor > 0 %}
{{ variant_related_comments_table(variant, case) }}
{% endif %}
{% endmacro %}
{% macro str_variant_content(variant,index) %}
Variant type
Estimated size
Reference size
Coordinates
Gene panels
{% if not variant.str_status or variant.str_status == 'normal' %}
{% elif variant.str_status == 'full_mutation' %}
{% elif variant.str_status == 'pre_mutation' %}
{% endif %}
{{variant.category | upper}}
{{ variant.alternative|replace("STR", "")|replace("<", "")|replace(">", "") }}
{{ variant.str_ref }}
{% if variant.chromosome == variant.end_chrom %}
chr{{variant.chromosome}}:{{variant.position}}-{{variant.end}}
{% else %}
chr{{variant.chromosome}}:{{variant.position}}/chr{{variant.end_chrom or variant.chromosome}}:{{variant.end}}
{% endif %}
{% if variant.panels %}
{% if variant.panels|length <= 3 %}
{% for panel_id in variant.panels %}
{{ panel_id }}
{% endfor %}
{% else %}
{{ variant.panels|length }} panels
{% endif %}
{% endif %}
Sample
Genotype (GT)
Allele depth (AD)
ExpansionHunter support
Reference
Alternative
{% for sample in variant.samples %}
{{ sample.display_name }}
{{ sample.genotype_call }}
{% if sample.allele_depths %}
{% for number in sample.allele_depths %}
{% if number == -1 %}
N/A
{% else %}
{{ number }}
{% endif %}
{% endfor %}
{% else %}
N/A
N/A
{% endif %}
{{ sample.so }}
{% endfor %}
Scout Rank
Scout score
Manual rank
{{variant.variant_rank}}
{{variant.rank_score}}
{% if variant.manual_rank %}
{{ manual_rank_options[variant.manual_rank]['label'] }}
{% endif %}
{% if variant.cancer_tier %}
{{ cancer_rank_options[variant.cancer_tier]['label'] }}
{% endif %}
{% if not (variant.manual_rank or variant.cancer_tier) %}
-
{% endif %}
Disease
Inheritance model
Source
{% if variant.str_disease %}
{{ variant.str_disease }}
{% else %}
-
{% endif %}
{{ variant.str_inheritance_mode if variant.str_inheritance_mode else "-" }}
{% if variant.str_source.display %}
{{ variant.str_source.display }}
{% else %}
"-"
{% endif %}
{% if variant.comments | count_cursor > 0 %}
{{ variant_related_comments_table(variant, case) }}
{% endif %}
{% endmacro %}
{% macro variant_phenotypes(variant) %}
{% if variant.get('phenotypes') %}
Partial causative
OMIM terms: {{ variant['phenotypes'].get('diagnosis_phenotypes')|join(' ')}} -
HPO terms:
{%- for hpo_term in variant['phenotypes'].get('phenotype_terms') -%}
{{ hpo_term.phenotype_id}}({{hpo_term.feature}})
{%- endfor -%}
{% endif %}
{% endmacro %}
{% macro genotype_table(variant) %}
Sample
Genotype (GT)
Allele depth (AD)
{% if cancer %}
VAF
{% else %}
Genotype quality (GQ)
{% endif %}
Reference
Alternative
{% for sample in variant.samples %}
{{ sample.display_name }}
{{ sample.genotype_call }}
{% if sample.allele_depths %}
{% for number in sample.allele_depths %}
{{ number }}
{% endfor %}
{% else %}
N/A
N/A
{% endif %}
{% if cancer %}
{% if sample.read_depth and sample.allele_depths[1] != -1 %}
{{ (sample.allele_depths[1]/sample.read_depth)|round(4) }}
{% else %}
N/A
{% endif %}
{% else %}
{{ sample.genotype_quality }}
{% endif %}
{% endfor %}
{% endmacro %}
{% macro somatic_variant_table(variants) %}
Gene Symbol
Transcript
HGVS c.
HGVS p.
Tumor VAF%
ACMG
{% for acmg in ["P","LP", "VUS", "LB", "B", ] %}
{% for variant in variants|selectattr("acmg_classification", "defined")|selectattr("acmg_classification.short", "equalto", acmg)|selectattr("first_rep_gene.hgnc_symbol", "defined")|sort(attribute='first_rep_gene.hgnc_symbol') %}
{{ variant_table_line(variant) }}
{% endfor %}
{% endfor %}
{% for variant in variants|selectattr("acmg_classification", "defined")|selectattr("acmg_classification.short", "undefined")|selectattr("first_rep_gene.hgnc_symbol", "defined")|sort(attribute='first_rep_gene.hgnc_symbol') %}
{{ variant_table_line(variant) }}
{% endfor %}
{% for variant in variants|selectattr("acmg_classification", "undefined")|selectattr("first_rep_gene.hgnc_symbol", "defined")|sort(attribute='first_rep_gene.hgnc_symbol') %}
{{ variant_table_line(variant) }}
{% endfor %}
{% for variant in variants|selectattr("first_rep_gene.hgnc_symbol", "undefined") %}
{{ alt_variant_line(variant) }}
{% endfor %}
{% endmacro %}
{% macro variant_table_line(variant) %}
{{ variant.first_rep_gene.hgnc_symbol or variant.first_rep_gene.hgnc_id }} {% if variant.sub_category != "snv" %}{{ variant.sub_category|upper }}{% endif %}
{{ variant.first_rep_gene.canonical_transcript }}
{{ (variant.first_rep_gene.hgvs_identifier or variant.display_name)|truncate(20, True) }}
{{ (variant.first_rep_gene.hgvsp_identifier or '') |url_decode|truncate(30, True) }}
{% for sample in variant.samples %}{% if sample.is_affected %} {{ (sample.allele_depths[1]/sample.read_depth*100)|round|int }}{% endif %} {% endfor %}
{% if variant.acmg_classification %}
{{variant.acmg_classification['short'] }}
{% elif variant.manual_rank %}
{{ manual_rank_options[variant.manual_rank]['label'] }}
{% else %}
-
{% endif %}
{% endmacro %}
{% macro alt_variant_line(variant) %}
chr {{ variant.chromosome }} {{ variant.sub_category|upper }}
pos {{ variant.position }}
{% if variant.category in ['cancer_sv', 'sv'] %}
chr {{ variant.end_chrom }}
{% else %}
{{ variant.reference|truncate(20, True) }}
{% endif %}
{% if variant.category in ['cancer_sv', 'sv'] %}
end {{ variant.end }}
{% else %}
{{ variant.alternative|truncate(20, True) }}
{% endif %}
{% for sample in variant.samples %}{% if sample.is_affected %} {{ (sample.allele_depths[1]/sample.read_depth*100)|round|int }}{% endif %} {% endfor %}
{% if variant.acmg_classification %}
{{variant.acmg_classification['short'] }}
{% elif variant.manual_rank %}
{{ manual_rank_options[variant.manual_rank]['label'] }}
{% else %}
-
{% endif %}
{% endmacro %}