Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
J
jass
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Léo HENCHES
jass
Commits
0ad77c74
Commit
0ad77c74
authored
3 years ago
by
Cyril NERIN
Browse files
Options
Downloads
Patches
Plain Diff
FIX #92 FEAT #93 FEAT #94
parent
0741ece9
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
jass/server.py
+41
-0
41 additions, 0 deletions
jass/server.py
with
41 additions
and
0 deletions
jass/server.py
+
41
−
0
View file @
0ad77c74
...
@@ -40,6 +40,7 @@ class LocalProjectParamsSchema(ma.Schema):
...
@@ -40,6 +40,7 @@ class LocalProjectParamsSchema(ma.Schema):
chromosome
=
ma
.
fields
.
Integer
()
chromosome
=
ma
.
fields
.
Integer
()
start
=
ma
.
fields
.
Integer
()
start
=
ma
.
fields
.
Integer
()
end
=
ma
.
fields
.
Integer
()
end
=
ma
.
fields
.
Integer
()
to_init
=
ma
.
fields
.
Integer
()
class
ProjectStatusSchema
(
ma
.
Schema
):
class
ProjectStatusSchema
(
ma
.
Schema
):
...
@@ -120,6 +121,7 @@ class LocalProjectCreateMethodView(MethodView):
...
@@ -120,6 +121,7 @@ class LocalProjectCreateMethodView(MethodView):
str
(
parameters
[
"
chromosome
"
]),
str
(
parameters
[
"
chromosome
"
]),
str
(
parameters
[
"
start
"
]),
str
(
parameters
[
"
start
"
]),
str
(
parameters
[
"
end
"
]),
str
(
parameters
[
"
end
"
]),
str
(
parameters
[
"
to_init
"
]),
)
)
...
@@ -396,6 +398,45 @@ class ProjectZoomPlotMethodView(MethodView):
...
@@ -396,6 +398,45 @@ class ProjectZoomPlotMethodView(MethodView):
abort
(
500
)
abort
(
500
)
@blp_projects.route
(
"
/<project_id>/gene_exon
"
)
class
ProjectGeneExonMethodView
(
MethodView
):
def
get
(
self
,
project_id
):
try
:
return
(
Project
(
id
=
project_id
).
get_project_gene_exon_data
(),
200
,
{
"
Content-Type
"
:
"
text/plain; charset=utf-8
"
},
)
except
FileNotFoundError
:
status
=
Project
(
id
=
project_id
).
status
if
status
==
Project
.
DOES_NOT_EXIST
:
return
(
f
"
project
{
project_id
}
does not exist
"
,
404
,
{
"
Content-Type
"
:
"
text/plain; charset=utf-8
"
},
)
elif
status
[
"
worktable
"
]
==
Project
.
CREATING
:
return
(
"
data not ready yet
"
,
202
,
{
"
Content-Type
"
:
"
text/plain; charset=utf-8
"
},
)
else
:
abort
(
500
)
@blp_projects.route
(
"
/<project_id>/error_msg
"
)
class
ProjectErrorMsgMethodView
(
MethodView
):
def
get
(
self
,
project_id
):
return
Project
(
id
=
project_id
).
get_error_msg
()
@blp_projects.route
(
"
/<project_id>/dispo_gene_exon
"
)
class
ProjectDispoGeneExonMethodView
(
MethodView
):
def
get
(
self
,
project_id
):
return
Project
(
id
=
project_id
).
get_dispo_gene_exon
()
class
JassApp
(
Flask
):
class
JassApp
(
Flask
):
"""
"""
JassApp builds the JASS Flask application
JassApp builds the JASS Flask application
...
...
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