Longitudinal and library support

{% if longitudinal_support.design_scope_label %}

Design scope: {{ longitudinal_support.design_scope_label | e }}.

{% endif %}

Each column represents one sequencing library (sample_id / library_id); repeated pipelines on the same library remain grouped in one column and are never summed. Below-threshold CTA measurements distinguish missing values from measured zeros, and mutation rows distinguish exact-window RNA support from alternative windows and unmeasured libraries.

{% macro target_cell(row) %} {{ row.gene | e }} ({{ row.kind | e }}){% if row.transcript_ids %}
{{ row.transcript_ids | join(', ') | e }}{% endif %}{% if row.window %}
{{ row.window | e }}{% endif %}
{% if row.selected %}Selected: {{ row.selected_products | join(', ') | e }}{% else %}Not emitted in products{% endif %} {% endmacro %} {% macro qualification_cell(row) %} {% if row.qualifying_timepoints %}Qualifying timepoints: {{ row.qualifying_timepoints | join(', ') | e }} ({{ row.qualifying_samples | join(', ') | e }}){% elif row.qualifying_samples %}Qualifying samples: {{ row.qualifying_samples | join(', ') | e }}{% else %}No qualifying sample{% endif %}{% if row.longitudinal_headline %}
{{ row.longitudinal_headline | e }}.{% elif row.qualified_only_earlier %}
Qualified only through earlier timepoints (not qualified at {{ longitudinal_support.latest_timepoint | e }}{% if row.below_threshold_at_latest %}; below threshold at {{ longitudinal_support.latest_timepoint | e }}{% endif %}).{% endif %} {% endmacro %} {% macro longitudinal_table(rows) %} {% set all_libs = longitudinal_support.libraries | default([]) %} {% set total_libs = all_libs | length %} {% set max_libs_per_panel = 4 %} {% if total_libs <= max_libs_per_panel %} {% set lib_pct = ((62 / total_libs) | round(2)) if total_libs else 0 %} {% for _ in all_libs %}{% endfor %} {% for lib in all_libs %} {% endfor %} {% for row in rows %} {{ target_cell(row) }} {% for cell in row.cells %} {% endfor %} {{ qualification_cell(row) }} {% endfor %}
Target / candidate window{{ lib.sample_id | e }}{% if lib.timepoint and lib.timepoint != lib.sample_id %} ({{ lib.timepoint | e }}){% endif %}{% if lib.library_id and lib.library_id != lib.sample_id %}
lib {{ lib.library_id | e }}{% endif %}{% if lib.pipelines %}
{{ lib.pipelines | join(', ') | e }}{% endif %}
Qualifying samples & longitudinal status
{{ cell.summary | e }}
{% else %} {% set n_panels = ((total_libs + max_libs_per_panel - 1) // max_libs_per_panel) %} {% for start in range(0, total_libs, max_libs_per_panel) %} {% set end = [start + max_libs_per_panel, total_libs] | min %} {% set panel_libs = all_libs[start:end] %} {% set is_last = (end == total_libs) %} {% set inline_qual = (is_last and (panel_libs | length) <= 3) %} {% set target_pct = 20 %} {% set qual_pct = 22 if inline_qual else 0 %} {% set lib_pct = (((100 - target_pct - qual_pct) / (panel_libs | length)) | round(2)) %}

Libraries {{ start + 1 }}–{{ end }} of {{ total_libs }} (panel {{ loop.index }} of {{ n_panels }})

{% for _ in panel_libs %}{% endfor %} {% if inline_qual %}{% endif %} {% for lib in panel_libs %} {% endfor %} {% if inline_qual %}{% endif %} {% for row in rows %} {{ target_cell(row) }} {% for cell in row.cells[start:end] %} {% endfor %} {% if inline_qual %}{{ qualification_cell(row) }}{% endif %} {% endfor %}
Target / candidate window{{ lib.sample_id | e }}{% if lib.timepoint and lib.timepoint != lib.sample_id %} ({{ lib.timepoint | e }}){% endif %}{% if lib.library_id and lib.library_id != lib.sample_id %}
lib {{ lib.library_id | e }}{% endif %}{% if lib.pipelines %}
{{ lib.pipelines | join(', ') | e }}{% endif %}
Qualifying samples & longitudinal status
{{ cell.summary | e }}
{% endfor %} {% if (total_libs % max_libs_per_panel) == 0 %}

Qualifying samples & longitudinal status summary

{% for row in rows %} {{ target_cell(row) }} {{ qualification_cell(row) }} {% endfor %}
Target / candidate window Qualifying samples & longitudinal status
{% endif %} {% endif %} {% endmacro %} {% set selected_long = longitudinal_support.rows | selectattr('selected') | list %} {% set other_long = longitudinal_support.rows | rejectattr('selected') | list %} {% if selected_long and other_long %}

Selected targets ({{ selected_long | length }})

{{ longitudinal_table(selected_long) }}
Additional candidates not emitted in products ({{ other_long | length }}) {{ longitudinal_table(other_long) }}
{% else %} {{ longitudinal_table(longitudinal_support.rows) }} {% endif %}