Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
ippidb-web
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
iPPIDB
ippidb-web
Commits
ba83798f
Commit
ba83798f
authored
6 years ago
by
Hervé MENAGER
Browse files
Options
Downloads
Patches
Plain Diff
first draft to show similar drugbank compounds
WIP on #96 Former-commit-id: ae2cb02a8bd669efa51c98bbf4d759cd78519434
parent
cd7afec5
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
ippisite/ippidb/models.py
+5
-1
5 additions, 1 deletion
ippisite/ippidb/models.py
ippisite/ippidb/templates/compound_card.html
+20
-0
20 additions, 0 deletions
ippisite/ippidb/templates/compound_card.html
with
25 additions
and
1 deletion
ippisite/ippidb/models.py
+
5
−
1
View file @
ba83798f
...
...
@@ -496,7 +496,11 @@ class Compound(AutoFillableModel):
return the all PPI families for PPIs involved in the compound activity of the compound
"""
return
list
(
set
([
ca
.
ppi
.
family
for
ca
in
self
.
compoundaction_set
.
all
()]))
@property
def
sorted_similar_drugbank_compounds
(
self
):
return
self
.
drugbankcompoundtanimoto_set
.
order_by
(
'
-tanimoto
'
)
def
autofill
(
self
):
# compute InChi and InChiKey
self
.
inchi
=
smi2inchi
(
self
.
canonical_smile
)
...
...
This diff is collapsed.
Click to expand it.
ippisite/ippidb/templates/compound_card.html
+
20
−
0
View file @
ba83798f
...
...
@@ -201,6 +201,26 @@
</div>
<div
class=
"tab-pane fade"
id=
"drugsimilarity"
role=
"tabpanel"
aria-labelledby=
"drugsimilarity-tab"
>
<table
class=
"table table-striped"
>
<thead>
<tr>
<th
title=
"Tanimoto index"
>
Ta
</th>
<th>
Structure
</th>
<th>
Name
</th>
<th>
Drugbank ID
</th>
</tr>
</thead>
<tbody>
{% for dbct in compound.sorted_similar_drugbank_compounds %}
<tr>
<td>
{{ dbct.tanimoto }}
</td>
<td>
{% include "compound_smiles_draw.html" with id=dbct.drugbank_compound.id smile=dbct.drugbank_compound.canonical_smiles %}
</td>
<td>
{{ dbct.drugbank_compound.common_name }}
</td>
<td><a
target=
"_blank"
href=
"https://www.drugbank.ca/drugs/{{ dbct.drugbank_compound.id }}"
>
{{ dbct.drugbank_compound.id }}
</a></td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
</div>
</div>
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment