Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
ippidb-web
Manage
Activity
Members
Labels
Code
Merge requests
1
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Operate
Environments
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
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
0c1fd103
Commit
0c1fd103
authored
6 years ago
by
Hervé MENAGER
Browse files
Options
Downloads
Patches
Plain Diff
add filter on PPI family to compounds list
closes #58 Former-commit-id: 5e08e600acf123da45426e04c5c388aa6b3c1a2a
parent
c532f6fc
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/templates/compound_list.html
+2
-0
2 additions, 0 deletions
ippisite/ippidb/templates/compound_list.html
ippisite/ippidb/views.py
+7
-1
7 additions, 1 deletion
ippisite/ippidb/views.py
with
9 additions
and
1 deletion
ippisite/ippidb/templates/compound_list.html
+
2
−
0
View file @
0c1fd103
...
...
@@ -33,6 +33,7 @@
<main
class=
"col-12"
role=
"main"
>
<form>
<div
class=
"row"
>
{% include "multiselection_button.html" with label="PPI Family" param_name="family" %}
{% include "multiselection_button.html" with label="PPI" param_name="ppi" %}
{% include "multiselection_button.html" with label="Disease" param_name="disease" %}
{% include "multiselection_button.html" with label="Organism" param_name="taxonomy" %}
...
...
@@ -128,6 +129,7 @@
</ul>
</nav>
{% include "multiselection_modal.html" with label="PPI Family" selected_list=selected_families unselected_list=families param_name="family" all_param_name="families_all" all_param_value=families_all %}
{% include "multiselection_modal.html" with label="PPI" selected_list=selected_ppis unselected_list=ppis param_name="ppi" all_param_name="ppis_all" all_param_value=ppis_all %}
{% include "multiselection_modal.html" with label="Disease" selected_list=selected_diseases unselected_list=diseases param_name="disease" all_param_name="diseases_all" all_param_value=diseases_all %}
{% include "multiselection_modal.html" with label="Organism" selected_list=selected_taxonomies unselected_list=taxonomies param_name="taxonomy" all_param_name="taxonomies_all" all_param_value=taxonomies_all %}
...
...
This diff is collapsed.
Click to expand it.
ippisite/ippidb/views.py
+
7
−
1
View file @
0c1fd103
...
...
@@ -7,7 +7,7 @@ from formtools.wizard.views import SessionWizardView, NamedUrlSessionWizardView
import
ippidb
from
.forms
import
IdForm
,
BibliographyForm
,
PDBForm
,
ProteinForm
,
ComplexCompositionForm
,
ComplexCompositionFormSet
,
ProteinDomainComplexTypeForm
,
ProteinDomainComplexForm
,
PpiForm
,
PpiComplexForm
,
PpiAndComplexForm
,
ProteinFormSet
,
TestsForm
,
CompoundForm
,
CompoundFormSet
from
.models
import
Protein
,
Bibliography
,
ProteinDomainComplex
,
ProteinDomainBoundComplex
,
RefCompoundBiblio
,
TestActivityDescription
,
Compound
,
Ppi
,
Disease
,
Taxonomy
,
LeLleBiplotData
,
PcaBiplotData
from
.models
import
Protein
,
Bibliography
,
ProteinDomainComplex
,
ProteinDomainBoundComplex
,
RefCompoundBiblio
,
TestActivityDescription
,
Compound
,
Ppi
,
Disease
,
Taxonomy
,
LeLleBiplotData
,
PcaBiplotData
,
PpiFamily
from
.ws
import
get_pdb_uniprot_mapping
...
...
@@ -178,6 +178,8 @@ def compound_list(request):
Display the list of compounds
"""
compounds
=
Compound
.
objects
.
order_by
(
'
id
'
)
if
request
.
GET
.
get
(
'
family
'
):
compounds
=
compounds
.
filter
(
compoundaction__ppi__family__id__in
=
request
.
GET
.
getlist
(
'
family
'
))
# if filtering on "action on PPI"
if
request
.
GET
.
get
(
'
ppi
'
):
compounds
=
compounds
.
filter
(
compoundaction__ppi__id__in
=
request
.
GET
.
getlist
(
'
ppi
'
))
...
...
@@ -187,6 +189,8 @@ def compound_list(request):
compounds
=
compounds
.
filter
(
compoundaction__ppi_id__ppicomplex__complex__protein__organism__id__in
=
request
.
GET
.
getlist
(
'
taxonomy
'
))
if
request
.
GET
.
get
(
'
boundcomplex
'
):
compounds
=
compounds
.
filter
(
compoundaction__ppi_id__ppicomplex__complex__id__in
=
request
.
GET
.
getlist
(
'
boundcomplex
'
))
selected_families
=
PpiFamily
.
objects
.
filter
(
id__in
=
request
.
GET
.
getlist
(
'
family
'
))
families
=
PpiFamily
.
objects
.
exclude
(
id__in
=
request
.
GET
.
getlist
(
'
family
'
))
selected_ppis
=
Ppi
.
objects
.
filter
(
id__in
=
request
.
GET
.
getlist
(
'
ppi
'
))
ppis
=
Ppi
.
objects
.
exclude
(
id__in
=
request
.
GET
.
getlist
(
'
ppi
'
))
selected_diseases
=
Disease
.
objects
.
filter
(
id__in
=
request
.
GET
.
getlist
(
'
disease
'
))
...
...
@@ -221,6 +225,8 @@ def compound_list(request):
'
count
'
:
count
,
'
selected_ppis
'
:
selected_ppis
,
'
ppis
'
:
ppis
,
'
selected_families
'
:
selected_families
,
'
families
'
:
families
,
'
selected_diseases
'
:
selected_diseases
,
'
diseases
'
:
diseases
,
'
selected_taxonomies
'
:
selected_taxonomies
,
...
...
This diff is collapsed.
Click to expand it.
Preview
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!
Save comment
Cancel
Please
register
or
sign in
to comment