{% macro gt_call(case_id, individuals) -%}
<table class="table table-bordered table-hover">
  <thead>
    <tr>
      <th rowspan="2">Case</th>
      <th rowspan="2">Sample</th>
      <th rowspan="2">Genotype (GT)</th>
      <th colspan="2">Allele depth (AD)</th>
      <th rowspan="2">Quality (GQ)</th>
    </tr>
    <tr>
      <th>Ref</th>
      <th>Alt</th>
    </tr>
  </thead>
  <tbody>
    {% for individual in individuals %}
      <tr>
        <td>{{ case_id }}</td>
        <td>
          {% if individual.is_affected %}
            <strong><mark>{{ individual.sample_id }}</mark></strong>
          {% else %}
            {{ individual.sample_id }}
          {% endif %}
        </td>
        <td>{{ individual.genotype }}</td>
        <td>{{ individual.ref_depth }}</td>
        <td>{{ individual.alt_depth }}</td>
        <td>{{ individual.genotype_quality }}</td>
      </tr>
    {% endfor %}
  </tbody>
</table>
{%- endmacro %}

{% macro sv_gt_call(case_id, individuals) -%}
<table class="table table-bordered table-hover">
  <thead>
    <tr>
      <th rowspan="2">Case</th>
      <th rowspan="2">Sample</th>
      <th rowspan="2">Genotype (GT)</th>
      <th colspan="2">Support (SU)</th>
    </tr>
    <tr>
      <th>PE</th>
      <th>SR</th>
    </tr>
  </thead>
  <tbody>
    {% for individual in individuals %}
      <tr>
        <td>{{ case_id }}</td>
        <td>
          {% if individual.is_affected %}
            <strong><mark>{{ individual.sample_id }}</mark></strong>
          {% else %}
            {{ individual.sample_id }}
          {% endif %}
        </td>
        <td>{{ individual.genotype }}</td>
        <td>{{ individual.pe_support }}</td>
        <td>{{ individual.sr_support }}</td>
      </tr>
    {% endfor %}
  </tbody>
</table>
{%- endmacro %}
