{% extends 'base.html' %}

{% block content %}
  {% if initial_dm_length != filtered_dm_length %}
    <p class="alert alert-warning">
      <b>Warning</b>: Some samples were filtered from the input distance matrix
      because they were missing metadata values.<br><b>The input distance matrix
      contained {{ initial_dm_length }} samples but {{ method }} was computed on
      only {{ filtered_dm_length }} samples.</b><p>
    </p>
  {% endif %}

  <div class="row">
    <div class="col-lg-12">
      <h2>Overview</h2>
      {{ result }}
    </div>
  </div>

  <div class="row">
    <div class="col-lg-12">
      <h2>Group significance plots</h2>
      <a href="raw_data.tsv" target="_blank" rel="noopener noreferrer">
        Download raw data as TSV
      </a>
      {% for group_row in group_rows %}
        <div class="row">
          {% for group_id in group_row %}
            <div class="col-lg-{{ bootstrap_group_col_size }} text-center">
              <a href="{{ group_id }}-boxplots.pdf">
                <img src="{{ group_id }}-boxplots.png">
                <br>
                <p>Download as PDF</p>
              </a>
            </div>
          {% endfor %}
        </div>
      {% endfor %}
    </div>
  </div>

  {% if pairwise_results %}
    <div class="row">
      <div class="col-lg-12">
        <h2>Pairwise {{ method }} results</h2>
        <a href="{{ method }}-pairwise.csv">Download CSV</a>
        {{ pairwise_results }}
      </div>
    </div>
  {% endif %}

{% endblock %}
