{% if biological_candidates %}

Antigen biology and targeting

Highest-ranked candidate window per source. Highlighted residues or junctions mark the altered region. Reference translation evidence and patient RNA support are shown separately; comparisons show recorded references or computed backgrounds, not observed patient-normal protein.

{% macro render_biology_cards(cards) %} {% for antigen in cards %}

{{ antigen.rank }}. {{ antigen.gene | e }} {{ antigen.kind | e }}

{% if antigen.facts %}
{% for label, value in antigen.facts %}
{{ label | e }}
{{ value | e }}
{% endfor %}
{% endif %}
{{ antigen.sequence_html }} source aa {{ antigen.sequence_start }}–{{ antigen.sequence_end }}
{% for junction in antigen.junctions %}

{{ junction.left | e }} → {{ junction.right | e }} {% for start, end in junction.boundaries %} · {% if start == end %}junction after source aa {{ antigen.sequence_start - 1 + start }}{% else %}split codon at source aa {{ antigen.sequence_start + start }}{% endif %}{% endfor %}

{% endfor %} {% for comparison in antigen.comparisons %}

{{ comparison.label | e }} · tumor aa {{ comparison.tumor_start }}–{{ comparison.tumor_end }}, reference aa {{ comparison.reference_start }}–{{ comparison.reference_end }}

{% for start in range(0, comparison.tumor | length, 65) %}
Tumor  {{ comparison.tumor[start:start + 65] | e }}
       {{ comparison.differences[start:start + 65] | e }}
Ref    {{ comparison.reference[start:start + 65] | e }}
{% endfor %} {% else %}{% if antigen.kind != 'CTA' %}

Normal/reference protein comparison not recorded.

{% endif %}{% endfor %} {% if antigen.targeting %} {% for target in antigen.targeting_preview %}{% endfor %}
Peptide / positionTargetingMatching reference proteins
{{ target.peptide | e }} · {{ target.start + 1 }}–{{ target.end }}{{ target.status | e }}{{ target.source_summary | e }}
{% if antigen.targeting | length > 8 %}

Showing 8 of {{ antigen.targeting | length }} assessed peptides in this window; all tested positions are summarized below. Exact protein accessions remain in the native evidence and workbook.

{% endif %}{% endif %}
{% endfor %} {% endmacro %} {% set selected_bio = biological_candidates | selectattr('selected') | list %} {% set other_bio = biological_candidates | rejectattr('selected') | list %} {% if selected_bio and other_bio %}

Selected targets ({{ selected_bio | length }})

{{ render_biology_cards(selected_bio) }}
Additional ranked candidates not emitted in products ({{ other_bio | length }}) {{ render_biology_cards(other_bio) }}
{% else %} {{ render_biology_cards(biological_candidates) }} {% endif %}
{% endif %} {% if cta_targeting_summary %}

CTA regions assessed against OncoRef

Positions below are peptide starts in the source protein, grouped by peptide length. Unsafe containment excludes a peptide from CTA targeting. Eligible peptides still undergo the shared expression, prediction and ranking rules. Unmeasured peptide lengths and reference coverage gaps remain unassessed.

{% if cta_targeting_summary | length > 10 %}
Per-protein OncoRef CTA containment ledger ({{ cta_targeting_summary | length }} CTA proteins) {% for source in cta_targeting_summary %}

{{ source.gene | e }}

{% if source.gene_id %}

{{ source.gene_id | e }}

{% endif %} {% for row in source.rows %}{% endfor %}
Peptide lengthStart positions (1-based)Sequence policyUnsafe / review proteins
{{ row.length }} aa{{ row.starts }}{% if row.status == 'excluded' %}Do not target: Unsafe containment{% elif row.status == 'eligible' %}Eligible under sequence policy{% elif row.status == 'review' %}Review: unresolved occurrence{% else %}Unassessed{% endif %}{{ row.matches | e }}
{% endfor %}
{% else %} {% for source in cta_targeting_summary %}

{{ source.gene | e }}

{% if source.gene_id %}

{{ source.gene_id | e }}

{% endif %} {% for row in source.rows %}{% endfor %}
Peptide lengthStart positions (1-based)Sequence policyUnsafe / review proteins
{{ row.length }} aa{{ row.starts }}{% if row.status == 'excluded' %}Do not target: Unsafe containment{% elif row.status == 'eligible' %}Eligible under sequence policy{% elif row.status == 'review' %}Review: unresolved occurrence{% else %}Unassessed{% endif %}{{ row.matches | e }}
{% endfor %} {% endif %}
{% endif %}