{% macro disease_associated(variant) %}
Disease associated transcripts
{% set ns = namespace(gene='') %} {% for transcript in variant.disease_associated_transcripts %} {% set ns.gene = transcript.split(":")[0] != ns.gene %} {% if ns.gene and loop.index > 1%}
{{transcript.split(":")[0]}}:   {% elif ns.gene %} {{transcript.split(":")[0]}}:   {% endif %} {{transcript.split(":")[1]}}   {% set ns.gene = transcript.split(":")[0] %} {% else %} - {% endfor %}
{% endmacro %} {% macro transcripts_overview(variant) %}
RefSeq transcripts
{% for gene in variant.genes %} {% for transcript in gene.transcripts %} {% if "refseq_identifiers" in transcript or transcript.is_canonical %} {% endif %} {% endfor %} {% endfor %}
Gene Refseq IDs ID HGVS Description Links
{{ gene.common.hgnc_symbol if gene.common else gene.hgnc_id }} {% set decorated_txs = [] %} {% for tx_id in transcript.refseq_identifiers %} {% if tx_id.startswith('XM') and transcript.refseq_id != tx_id %} {% set decorated_tx = '' + tx_id + '' %} {% else %} {% set decorated_tx = tx_id %} {% endif %} {{ decorated_txs.append(decorated_tx)|default("", true) }} {% endfor %} {% if transcript.transcript_id.startswith('NM') and not decorated_txs %} {{ decorated_txs.append(transcript.transcript_id)|default("", true) }} {% endif %} {{ decorated_txs|join(", ")|safe or 'Check complete list of transcripts'|safe }}
{{ transcript.transcript_id }} {% if gene.common and transcript.refseq_id in gene.common.primary_transcripts %} P {% endif %} {% if transcript.mane_transcript %} {% set mane_transcript_parts = transcript.mane_transcript.split('.') %} {% if mane_transcript_parts[0] == refseq_id %} (MANE) {% endif %} {% endif %} {% if transcript.is_canonical %} C {% endif %}
{{ (transcript.coding_sequence_name or '')|truncate(20, True) }} {{ (transcript.protein_sequence_name or '')|url_decode }} {% if transcript.varsome_link %} V {% endif %} {% if transcript.tp53_link %} TP53 {% endif %} {% if transcript.cbioportal_link %} CBP {% endif %} {% if transcript.mycancergenome_link %} MCG {% endif %}
{% endmacro %}