Skip to content
Snippets Groups Projects
Commit 11b2efc0 authored by Hervé  MENAGER's avatar Hervé MENAGER
Browse files

finish adding PPI families to the vignette and LE/LLE plot

(closes #55)


Former-commit-id: 4bf4c7d44a0961955e7a196bdad6c4d18f862582
parent 2e8935e4
No related branches found
No related tags found
No related merge requests found
f9381e78efb52e844670bc977d0f99461134ee9d
\ No newline at end of file
5fb9ed7a41b37ceaa343fd897c2db6c4123dfea8
\ No newline at end of file
......@@ -20,7 +20,7 @@ class Command(BaseCommand):
if comp.le is not None:
le = round(comp.le, 7)
lle = round(comp.lle, 7)
le_lle_data.append({'x': le, 'y': lle, 'id': comp.id, 'family_name': comp.best_pXC50_activity_ppi_name})
le_lle_data.append({'x': le, 'y': lle, 'id': comp.id, 'family_name': comp.best_pXC50_activity_ppi_family})
else:
self.stdout.write(
self.style.WARNING('compound %s has no LE (probably because no pXC50 activity results have been registered)' % comp.id))
......
......@@ -457,6 +457,17 @@ class Compound(models.Model):
ppi_name = best_activity_car.test_activity_description.ppi.name
return ppi_name
@property
def best_pXC50_activity_ppi_family(self):
"""
Family of the PPI corresponding to the best PXC50 activity
"""
best_activity_car = self.best_pXC50_compound_activity_result
if best_activity_car is None:
return None
ppi_family = best_activity_car.test_activity_description.ppi.family.name
return ppi_family
@property
def bioch_tests_count(self):
"""
......
......@@ -165,7 +165,7 @@
<div class="card-body">
<canvas id="le_lle_biplot"></canvas>
<script>
drawLeLleBiplotChart('le_lle_biplot', {{ compound.id }}, '{{ compound.best_pXC50_activity_ppi_name|default_if_none:"No target family identified" }}', {{ biplot_data | safe }}, 'pharmacology');
drawLeLleBiplotChart('le_lle_biplot', {{ compound.id }}, '{{ compound.best_pXC50_activity_ppi_family|default_if_none:"No target family identified" }}', {{ biplot_data | safe }}, 'pharmacology');
</script>
</div>
</div>
......
......@@ -2,7 +2,7 @@
<a href="/compound/{{ compound.id }}">{% include "pubchem_img.html" %}</a>
<div class="card-body" style="overflow:hidden; word-wrap:break-word;">
<span class="badge badge-dark"><a href="/compound/{{ compound.id }}">{{ compound.id }}</a></span>
<p>{% for family in compound.families %}{{ family.name }}{% endfor %}</p>
<p>{{ compound.best_pXC50_activity_ppi_family }}</p>
<p>Molecular Weight: {{ compound.molecular_weight }} g/mol</p>
</div>
</div>
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