Commit a88d0f29 authored by carlosribas's avatar carlosribas
Browse files

Update interactions

parent 03856b07
......@@ -134,15 +134,23 @@ limitations under the License.
</div>
{% endif %}
{% if context.intact %}
{% if context.interactions %}
<div ng-if="taxid">
<h2>Interactions
<small>
{{ context.intact|length }}
{{ context.interactions|length }}
</small>
</h2>
<p>
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:
According to
{% if context.psicquic and context.intact %}
<a href="http://www.ebi.ac.uk/Tools/webservices/psicquic/view/home.xhtml" target="_blank">PSICQUIC</a> and <a href="https://www.ebi.ac.uk/intact" target="_blank">IntAct</a>,
{% elif context.psicquic %}
<a href="http://www.ebi.ac.uk/Tools/webservices/psicquic/view/home.xhtml" target="_blank">PSICQUIC</a>,
{% elif context.intact %}
<a href="https://www.ebi.ac.uk/intact" target="_blank">IntAct</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%;">
......@@ -151,10 +159,10 @@ limitations under the License.
<th>Participant</th>
<th>Synonyms</th>
</thead>
{% for interaction in context.intact %}
{% for interaction in context.interactions %}
<tr>
<td style="white-space: nowrap;">
{% if context.intact_name == 'PSICQUIC' %}
{% if interaction.intact_id|first in 'U' %}
{{ interaction.intact_id }}
{% else %}
<a href="https://www.ebi.ac.uk/intact/interaction/{{ interaction.intact_id }}" target="_blank">{{ interaction.intact_id }}</a>
......
......@@ -142,15 +142,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:
intact = False
psicquic = False
interactions = rna.get_intact(taxid)
for item in interactions:
if item['intact_id'].startswith('PSICQUIC'):
split_data = item['intact_id'].split(':')
item['intact_id'] = split_data[1]
elif intact and intact[0]['intact_id'].startswith('EBI'):
intact_name = 'IntAct'
psicquic = True
else:
intact = True
context = {
'upi': upi,
......@@ -166,8 +168,9 @@ 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),
'interactions': interactions,
'intact': intact,
'intact_name': intact_name,
'psicquic': psicquic,
'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