Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
iPPIDB
ippidb-web
Commits
ac3d82b8
Commit
ac3d82b8
authored
Feb 10, 2018
by
Hervé MENAGER
Browse files
new designs for compound query page, WIP
see #43 Former-commit-id: 6863d32646dcfe64d3ad51c428dd28c6358665c4
parent
4c06bb1f
Changes
7
Hide whitespace changes
Inline
Side-by-side
ippisite/ippidb/models.py
View file @
ac3d82b8
...
...
@@ -328,6 +328,19 @@ class Compound(models.Model):
"""
return
RefCompoundBiblio
.
objects
.
filter
(
compound
=
self
)
@
property
def
pfam_ids
(
self
):
"""
return all PFAM ids for the domain of the proteins of the bound
complexes in the PPIs this compound has an action on
"""
pfam_ids
=
set
()
for
ca
in
self
.
compoundaction_set
.
all
():
ca
.
get_complexes
()
for
bound_complex
in
ca
.
ppi
.
get_ppi_bound_complexes
():
pfam_ids
.
add
(
bound_complex
.
complex
.
domain
.
pfam_id
)
return
pfam_ids
class
MDDRActivityClass
(
models
.
Model
):
name
=
models
.
CharField
(
'Activity Class'
,
max_length
=
100
,
unique
=
True
)
...
...
ippisite/ippidb/static/images/Other/ChemSpider_Logo.png
0 → 100644
View file @
ac3d82b8
9.96 KB
ippisite/ippidb/static/images/Other/Chembl_logo.png
0 → 100644
View file @
ac3d82b8
9.19 KB
ippisite/ippidb/static/images/Other/Pubchemlogo.png
0 → 100644
View file @
ac3d82b8
3.85 KB
ippisite/ippidb/templates/compound_db_links.html
View file @
ac3d82b8
{%if compound.pubchem_id or compound.chembl_id or compound.chemspider_id %}
<p>
in other databases
</p>
<ul
class=
"list-group"
>
<div
class=
"row"
>
{% if compound.pubchem_id %}
<
li
class=
"
list-group-item"
>
PubChem:
<a
href=
"https://pubchem.ncbi.nlm.nih.gov/compound/{{ compound.pubchem_id }}"
target=
"_blank"
>
{{ compound.pubchem_id }}
</a></
li
>
<
span
class=
"
col-sm-4"
>
<a
href=
"https://pubchem.ncbi.nlm.nih.gov/compound/{{ compound.pubchem_id }}"
target=
"_blank"
>
<img
src=
"/static/images/Other/Pubchemlogo.png"
style=
"height: 1.5em;"
title=
"PubChem ID:
{{ compound.pubchem_id }}
"
/>
</a></
span
>
{% endif %}
{% if compound.chembl_id %}
<
li
class=
"
list-group-item"
>
ChEMBL:
<a
href=
"https://www.ebi.ac.uk/chembldb/compound/inspect/{{ compound.chembl_id}}"
target=
"_blank"
>
{{ compound.chem
bl
_id}}
</a></
li
>
<
span
class=
"
col-sm-4"
>
<a
href=
"https://www.ebi.ac.uk/chembldb/compound/inspect/{{ compound.chembl_id
}}"
target=
"_blank"
>
<img
src=
"/static/images/Other/Chembl_logo.png"
style=
"height: 1.5em;"
title=
"ChEMBL ID:
{{ compound.
pub
chem_id
}}
"
/>
</a></
span
>
{% endif %}
{% if compound.chemspider_id %}
<
li
class=
"
list-group-item"
>
ChemSpider:
<a
href=
"http://www.chemspider.com/Chemical-Structure.{{ compound.chemspider_id}}.html"
target=
"_blank"
>
{{ compound.chemspider_id}}
</a></
li
>
<
span
class=
"
col-sm-4"
>
<a
href=
"http://www.chemspider.com/Chemical-Structure.{{ compound.chemspider_id}}.html"
target=
"_blank"
>
<img
src=
"/static/images/Other/ChemSpider_Logo.png"
style=
"height: 1.5em;"
title=
"ChemSpider ID:
{{ compound.chemspider_id
}}
"
/>
</a></
span
>
{% endif %}
</
ul
>
</
div
>
{% endif %}
ippisite/ippidb/templates/compound_grid_item.html
View file @
ac3d82b8
<div
class=
"card m-2 border border-info"
style=
"width: 300px"
>
<a
href=
"/compound/{{ compound.id }}"
>
{% include "pubchem_img.html" %}
</a>
<div
class=
"card-body"
style=
"overflow:hidden; word-wrap:break-word;"
>
{% if compound.common_name %}
<p
class=
"card-text"
>
Common name: {{ compound.common_name }}
</p>
{% endif %}
{% if compound.canonical_smile %}
<p
class=
"card-text"
>
Canonical SMILES: {{ compound.canonical_smile }}
</p>
{% endif %}
{% if compound.iupac_name %}
<p
class=
"card-text"
>
IUPAC name: {{ compound.iupac_name }}
</p>
{% endif %}
<span
class=
"badge badge-dark"
><a
href=
"/compound/{{ compound.id }}"
>
{{ compound.id }}
</a></span>
<p>
{% for pfam_id in compound.pfam_ids %}{{ pfam_id }}{% endfor %}
</p>
<p>
Molecular Weight: {{ compound.molecular_weight }} g/mol
</p>
</div>
</div>
<!--
...
...
ippisite/ippidb/templates/compound_table_item.html
View file @
ac3d82b8
...
...
@@ -3,10 +3,8 @@
<a
href=
"/compound/{{ compound.id }}"
>
{% include "pubchem_img.html" %}
</a>
</div>
<div
class=
"col-sm-9"
>
<span
class=
"badge badge-dark"
><a
href=
"/compound/{{ compound.id }}"
>
{{ compound.id }}
</a></span>
{%if compound.common_name %}
<span>
Common name: {{ compound.common_name }}
</span>
{% endif %}
<ul
class=
"list-group"
>
{% if compound.common_name %}
<li
class=
"list-group-item"
>
Common name: {{ compound.common_name }}
</li>
{% endif %}
{% if compound.canonical_smile %}
<li
class=
"list-group-item"
>
Canonical SMILES: {{ compound.canonical_smile }}
</li>
{% endif %}
...
...
@@ -14,12 +12,12 @@
<li
class=
"list-group-item"
>
IUPAC name: {{ compound.iupac_name }}
</li>
{% endif %}
</ul>
<p>
in bibliography
</p>
<p>
External links
</p>
{% include "compound_db_links.html" %}
<ul
class=
"list-group"
>
{% for biblio_ref in compound.biblio_refs %}
<li
class=
"list-group-item"
>
Mentionned in {% include "biblio_citation.html" with bibliography=biblio_ref.bibliography%} as
<i>
{{ biblio_ref.compound_name }}
</i></li>
{% endfor %}
</ul>
{% include "compound_db_links.html" %}
</div>
</div>
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment