Skip to content

Commit

Permalink
removed redundancy in GO labels on sequence page
Browse files Browse the repository at this point in the history
  • Loading branch information
proost committed Dec 6, 2017
1 parent 7531888 commit cf2487e
Showing 2 changed files with 8 additions and 2 deletions.
8 changes: 7 additions & 1 deletion conekt/controllers/sequence.py
Original file line number Diff line number Diff line change
@@ -37,12 +37,18 @@ def sequence_view(sequence_id):
:param sequence_id: ID of the sequence
"""
from conekt.models.relationships.sequence_go import SequenceGOAssociation

current_sequence = Sequence.query.get_or_404(sequence_id)

go_associations = current_sequence.go_associations.group_by(SequenceGOAssociation.go_id,
SequenceGOAssociation.evidence,
SequenceGOAssociation.source).all()

# to avoid running long count queries, fetch relations here and pass to template
return render_template('sequence.html',
sequence=current_sequence,
go_associations=current_sequence.go_associations.all(),
go_associations=go_associations,
interpro_associations=current_sequence.interpro_associations.all(),
families=current_sequence.families.all(),
expression_profiles=current_sequence.expression_profiles.all(),
2 changes: 1 addition & 1 deletion conekt/templates/sequence.html
Original file line number Diff line number Diff line change
@@ -153,7 +153,7 @@ <h3 class="banner-blue" id="coexpression_networks">Co-expression Networks</h3>
{% if ecc_query_associations|count > 0 %}
<h3 class="banner-blue" id="expression_conservation">Expression Context Conservation (<abbr title="Click to show help" href="{{ url_for('help.help_topic', topic='ecc') }}" data-target="#helpModal">ECC</abbr>)</h3>
<div class="table-responsive">
<table class="table table-striped table-separated" id="ecc_hits_table">
<table class="table table-striped table-separated" id="ecc_hits_table">
<thead>
<tr>
<th data-sort="string-ins"><span class="sort-icon"></span>Target</th>

0 comments on commit cf2487e

Please sign in to comment.