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
b67e508f
Commit
b67e508f
authored
6 years ago
by
Hervé MENAGER
Browse files
Options
Downloads
Patches
Plain Diff
filter for pubs in compounds list is >cutoff value, not <
cf #67 Former-commit-id: b28c53e4ac700a6b5ec0c9b2c6e8bf263f4cd24a
parent
406b6242
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
ippisite/ippidb/views.py
+3
-3
3 additions, 3 deletions
ippisite/ippidb/views.py
with
3 additions
and
3 deletions
ippisite/ippidb/views.py
+
3
−
3
View file @
b67e508f
...
...
@@ -137,13 +137,13 @@ class IppiWizard(NamedUrlSessionWizardView):
})
def
process_cutoff_value
(
name
,
context
,
request
,
annotation
=
None
):
def
process_cutoff_value
(
name
,
context
,
request
,
cutoff_dir
=
'
l
'
):
c
=
context
[
'
compounds
'
]
context
[
name
+
'
_max
'
]
=
str
(
int
(
math
.
ceil
(
float
(
c
.
aggregate
(
Max
(
name
))[
name
+
'
__max
'
]))))
context
[
name
+
'
_min
'
]
=
str
(
int
(
math
.
floor
(
float
(
c
.
aggregate
(
Min
(
name
))[
name
+
'
__min
'
]))))
if
request
.
GET
.
get
(
name
):
context
[
name
]
=
request
.
GET
.
get
(
name
)
filter_dict
=
{
name
+
'
__
l
te
'
:
context
[
name
]}
filter_dict
=
{
name
+
'
__
'
+
cutoff_dir
+
'
te
'
:
context
[
name
]}
context
[
'
compounds
'
]
=
context
[
'
compounds
'
].
filter
(
**
filter_dict
)
else
:
context
[
name
]
=
context
[
name
+
'
_max
'
]
...
...
@@ -170,7 +170,7 @@ def compound_list(request):
context
=
process_cutoff_value
(
'
molecular_weight
'
,
context
,
request
)
context
=
process_cutoff_value
(
'
a_log_p
'
,
context
,
request
)
context
=
process_cutoff_value
(
'
nb_donor_h
'
,
context
,
request
)
context
=
process_cutoff_value
(
'
pubs
'
,
context
,
request
)
context
=
process_cutoff_value
(
'
pubs
'
,
context
,
request
,
'
g
'
)
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
'
))
...
...
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