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
f0698166
Commit
f0698166
authored
2 years ago
by
AndiMajore
Browse files
Options
Downloads
Patches
Plain Diff
changed nedrex api routes; fixed protein table download
parent
1d253825
No related branches found
No related tags found
1 merge request
!2
Production
Pipeline
#62941
failed
2 years ago
Stage: check
Stage: deploy
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
Dockerfile
+1
-1
1 addition, 1 deletion
Dockerfile
drugstone/management/commands/populate_db.py
+2
-2
2 additions, 2 deletions
drugstone/management/commands/populate_db.py
drugstone/views.py
+11
-7
11 additions, 7 deletions
drugstone/views.py
with
14 additions
and
10 deletions
Dockerfile
+
1
−
1
View file @
f0698166
...
...
@@ -21,7 +21,7 @@ COPY ./requirements.txt /usr/src/drugstone/requirements.txt
RUN
pip
install
-r
/usr/src/drugstone/requirements.txt
COPY
./supervisord.conf /etc/supervisor/conf.d/supervisord.conf
RUN
pip
install
--index-url
https://test.pypi.org/simple/
--extra-index-url
https://pypi.org/simple
nedrex
==
0.1.4
RUN
pip
install
nedrex
COPY
. /usr/src/drugstone/
...
...
This diff is collapsed.
Click to expand it.
drugstone/management/commands/populate_db.py
+
2
−
2
View file @
f0698166
...
...
@@ -86,8 +86,8 @@ class Command(BaseCommand):
def
populate
(
kwargs
):
nedrex_api_url_unlicenced
=
"
http://
82.148.225.92:7123
/
"
nedrex_api_url_licenced
=
"
http://
82.148.225.92:8123
/
"
nedrex_api_url_unlicenced
=
"
http
s
://
nedrex-api-open.zbh.uni-hamburg.de
/
"
nedrex_api_url_licenced
=
"
http
s
://
nedrex-api-licenced.zbh.uni-hamburg.de
/
"
data_dir
=
kwargs
[
'
data_dir
'
]
...
...
This diff is collapsed.
Click to expand it.
drugstone/views.py
+
11
−
7
View file @
f0698166
...
...
@@ -4,6 +4,7 @@ import string
import
time
import
uuid
from
collections
import
defaultdict
from
functools
import
reduce
import
pandas
as
pd
...
...
@@ -414,18 +415,21 @@ def result_view(request) -> Response:
return
Response
(
result
)
else
:
if
view
==
'
proteins
'
:
proteins
=
list
(
filter
(
lambda
n
:
'
drugstone_type
'
in
n
and
n
[
'
drugstone_type
'
]
==
'
protein
'
,
node_details
.
values
()))
if
fmt
==
'
csv
'
:
items
=
[]
for
i
in
proteins
:
new_i
=
{
'
uniprot_ac
'
:
i
[
'
uniprot_ac
'
],
'
gene
'
:
i
[
'
symbol
'
],
'
name
'
:
i
[
'
protein_name
'
],
'
ensg
'
:
i
[
'
ensg
'
],
'
entrez
'
:
i
[
'
entrez
'
],
'
seed
'
:
is_seed
[
i
[
node_name_attribute
]],
'
id
'
:
i
[
'
id
'
],
'
uniprot_ac
'
:
i
[
'
uniprot_ac
'
]
if
'
uniprot_ac
'
in
i
else
[],
'
gene
'
:
i
[
'
symbol
'
]
if
'
symbol
'
in
i
else
[],
'
name
'
:
i
[
'
protein_name
'
]
if
'
protein_name
'
in
i
else
[],
'
ensembl
'
:
i
[
'
ensg
'
]
if
'
ensg
'
in
i
else
[],
'
entrez
'
:
i
[
'
entrez
'
]
if
'
entrez
'
in
i
else
[],
'
seed
'
:
is_seed
[
i
[
'
id
'
]],
}
if
i
.
get
(
'
score
'
)
:
if
'
score
'
in
i
:
new_i
[
'
score
'
]
=
i
[
'
score
'
]
items
.
append
(
new_i
)
else
:
...
...
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