Commit 255650ad authored by carlosribas's avatar carlosribas
Browse files

Update interactions section

parent f4fa192c
......@@ -142,19 +142,23 @@ limitations under the License.
</small>
</h2>
<p>
According to <a href="https://www.ebi.ac.uk/intact" target="_blank">IntAct</a>, {{ context.precomputed.description }} interacts with:
According to {% if context.intact_name == 'PSICQUIC' %}<a href="http://www.ebi.ac.uk/Tools/webservices/psicquic/view/home.xhtml" target="_blank">{{ context.intact_name }}</a>{% else %}<a href="https://www.ebi.ac.uk/intact" target="_blank">{{ context.intact_name }}</a>{% endif %}, {{ context.precomputed.description }} interacts with:
</p>
<div style="overflow-y: auto; max-height: 200px;" class="force-scrollbars">
<table class="table table-condensed table-hover table-responsive" style="margin-left: 10px; width: 95%;">
<thead>
<th>IntAct ID</th>
<th>Interaction id</th>
<th>Participant</th>
<th>Synonyms</th>
</thead>
{% for interaction in context.intact %}
<tr>
<td style="white-space: nowrap;">
<a href="https://www.ebi.ac.uk/intact/interaction/{{ interaction.intact_id }}" target="_blank">{{ interaction.intact_id }}</a>
{% if context.intact_name == 'PSICQUIC' %}
{{ interaction.intact_id }}
{% else %}
<a href="https://www.ebi.ac.uk/intact/interaction/{{ interaction.intact_id }}" target="_blank">{{ interaction.intact_id }}</a>
{% endif %}
</td>
<td>
{% if interaction.url %}
......
......@@ -141,6 +141,17 @@ def rna_view(request, upi, taxid=None):
)
plugin_installed = True if os.path.isfile(path) else False
# Interactions
intact_name = None
intact = rna.get_intact(taxid)
if intact and intact[0]['intact_id'].startswith('PSICQUIC'):
intact_name = 'PSICQUIC'
for item in intact:
split_data = item['intact_id'].split(':')
item['intact_id'] = split_data[1]
elif intact and intact[0]['intact_id'].startswith('EBI'):
intact_name = 'IntAct'
context = {
'upi': upi,
'symbol_counts': symbol_counts,
......@@ -155,7 +166,8 @@ def rna_view(request, upi, taxid=None):
'precomputed': precomputed,
'mirna_regulators': rna.get_mirna_regulators(taxid=taxid),
'annotations_from_other_species': rna.get_annotations_from_other_species(taxid=taxid),
'intact': rna.get_intact(taxid),
'intact': intact,
'intact_name': intact_name,
'plugin_installed': plugin_installed,
}
response = render(request, 'portal/sequence.html', {'rna': rna, 'context': context})
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment