Skip to content

Commit

Permalink
Update the results template to add feature for browsing statements
Browse files Browse the repository at this point in the history
  • Loading branch information
Prasham Marfatia committed Feb 13, 2025
1 parent d3b523e commit 5a27e0e
Showing 1 changed file with 12 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
</script>
{% endblock %}

{% macro render_table(df, table_id) -%}
{% macro render_table(results, table_id) -%}
<table class="table table-hover table-striped" id="{{ table_id }}" style="width: 100%;">
<thead>
<tr>
Expand All @@ -62,17 +62,27 @@
<th scope="col">NES</th>
<th scope="col"><i>p</i>-value</th>
<th scope="col"><i>q</i>-value</th>
<th scope="col">Statements</th>
</tr>
</thead>
<tbody>
{% for curie, name, es, nes, p, q, geneset_size, matched_size in df.values %}
{% for curie, name, es, nes, p, q, geneset_size, matched_size in results.values %}
<tr>
<td><a href="https://bioregistry.io/{{ curie }}" target="_blank">{{ curie }}</a></td>
<td>{{ name }}</td>
<td>{{ "{:.2f}".format(es) }}</td>
<td>{{ "{:.2f}".format(nes) }}</td>
<td>{{ "{:.2e}".format(p) }}</td>
<td>{{ "{:.2e}".format(q) }}</td>
<td>
<a href="{{ url_for('search.search_continuous_statements',
target_id=curie,
genes=gene_names,
minimum_evidence=minimum_evidence,
minimum_belief=minimum_belief) }}"
target="_blank"
class="btn btn-primary btn-sm">View Statements</a>
</td>
</tr>
{% endfor %}
</tbody>
Expand Down

0 comments on commit 5a27e0e

Please sign in to comment.