Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
backend
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Cosy-Bio
Drugst.One
backend
Commits
5ab77506
Commit
5ab77506
authored
2 years ago
by
AndiMajore
Browse files
Options
Downloads
Patches
Plain Diff
try to fix tissue expression route
parent
e732fffb
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
drugstone/urls.py
+3
-3
3 additions, 3 deletions
drugstone/urls.py
drugstone/views.py
+43
-50
43 additions, 50 deletions
drugstone/views.py
with
46 additions
and
53 deletions
drugstone/urls.py
+
3
−
3
View file @
5ab77506
...
@@ -17,9 +17,9 @@ from django.contrib import admin
...
@@ -17,9 +17,9 @@ from django.contrib import admin
from
django.urls
import
path
from
django.urls
import
path
from
drugstone.views
import
map_nodes
,
tasks_view
,
result_view
,
\
from
drugstone.views
import
map_nodes
,
tasks_view
,
result_view
,
\
graph_export
,
TissueView
,
TissueExpressionView
,
query_tissue_proteins
,
TaskView
,
\
graph_export
,
TissueView
,
query_tissue_proteins
,
TaskView
,
\
adjacent_drugs
,
adjacent_disorders
,
fetch_edges
,
create_network
,
load_network
,
get_license
,
get_datasets
,
\
adjacent_drugs
,
adjacent_disorders
,
fetch_edges
,
create_network
,
load_network
,
get_license
,
get_datasets
,
\
get_max_tissue_expression
get_max_tissue_expression
,
get_tissue_expression
# cache time is 6 hours
# cache time is 6 hours
urlpatterns
=
[
urlpatterns
=
[
...
@@ -33,7 +33,7 @@ urlpatterns = [
...
@@ -33,7 +33,7 @@ urlpatterns = [
path
(
'
query_tissue_proteins/
'
,
query_tissue_proteins
),
path
(
'
query_tissue_proteins/
'
,
query_tissue_proteins
),
path
(
'
adjacent_drugs/
'
,
adjacent_drugs
),
path
(
'
adjacent_drugs/
'
,
adjacent_drugs
),
path
(
'
adjacent_disorders/
'
,
adjacent_disorders
),
path
(
'
adjacent_disorders/
'
,
adjacent_disorders
),
path
(
'
tissue_expression/
'
,
T
issue
E
xpression
View
.
as_view
()
),
path
(
'
tissue_expression/
'
,
get_t
issue
_e
xpression
),
path
(
'
tissue_max_expression/
'
,
get_max_tissue_expression
),
path
(
'
tissue_max_expression/
'
,
get_max_tissue_expression
),
path
(
'
tissues/
'
,
TissueView
.
as_view
()),
path
(
'
tissues/
'
,
TissueView
.
as_view
()),
path
(
'
admin/
'
,
admin
.
site
.
urls
),
path
(
'
admin/
'
,
admin
.
site
.
urls
),
...
...
This diff is collapsed.
Click to expand it.
drugstone/views.py
+
43
−
50
View file @
5ab77506
...
@@ -653,15 +653,8 @@ class TissueView(APIView):
...
@@ -653,15 +653,8 @@ class TissueView(APIView):
return
Response
(
TissueSerializer
(
many
=
True
).
to_representation
(
tissues
))
return
Response
(
TissueSerializer
(
many
=
True
).
to_representation
(
tissues
))
class
TissueExpressionView
(
APIView
):
@api_view
([
'
POST
'
,
'
GET
'
])
"""
def
get_tissue_expression
(
request
)
->
Response
:
Expression of host proteins in tissues.
"""
def
get
(
self
,
request
)
->
Response
:
return
self
.
post
(
request
)
def
post
(
self
,
request
)
->
Response
:
tissue
=
Tissue
.
objects
.
get
(
id
=
request
.
query_params
.
get
(
'
tissue
'
))
tissue
=
Tissue
.
objects
.
get
(
id
=
request
.
query_params
.
get
(
'
tissue
'
))
if
request
.
query_params
.
get
(
'
proteins
'
):
if
request
.
query_params
.
get
(
'
proteins
'
):
...
...
This diff is collapsed.
Click to expand it.
Maier, Andreas
@bba1660
mentioned in commit
2932cfbf
·
1 year ago
mentioned in commit
2932cfbf
mentioned in commit 2932cfbf5fea44ca3f400e7d98d26a3e0b9879f8
Toggle commit list
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