<!- template: subsearch_flat.html -->
<head>
  <title>search of {{ sample_name }} against {{ search_db.shortname }} - chill-filter</title>
  {% include "_header.html" %}
{% include "_header.html" %}
</head>
<body>
<main class="container">

<h2>Search summary of {{ sample_name }} against database: {{ search_db.description }}</h2>
<p>
Based on the abundance profile, this looks like an assembly.
<p>
We are searching this sample against a subset of reference genomes: <b>{{ search_db.description }}</b>
  <p>
Based on the search results below, we estimate that at least <b>{{ "{:.1f}".format(f_found * 100) }}%</b> of your contigs will align to reference genomes in this subset database. More may align to other genomes that aren't in this subset - that's what <a href='../../search'>the full search</a> shows</a>!
<h2>Sample breakdown</h2>

<table border=1>
  <tr> <th> <b>Percent assigned</b> </th> <th> <b>Reference genome or collection</b> </th> </tr>
  {% for item in gather_df.to_dict(orient='records') %}
   <tr>
     <td>{{ item['f_unique_weighted']|percent }} ({{ item|unique_flat_bp }})</td>
     <td> {{ item|subsearch_link(search_db) }}  </td>
   </tr>
  {% endfor %}
</table>

<p>

<a href='./' style="color:white"><button>Go to sample information page</a></button>
<a href="./download_csv" style="color:white"><button>Download spreadsheet of reports</button></a>
<a href="/" style="color:white"><button>Submit a new sample</button></a>

{% include "_footer.html" %}
</main>
</body>

</html>
