Commit 34f524e1 authored by Hervé Ménager's avatar Hervé Ménager
Browse files

Merge branch 'dev' of gitlab.pasteur.fr:statistical-genetics/jass into dev

parents 515002a8 cbcd847b
......@@ -294,6 +294,35 @@ class ProjectLocalManhattanMethodView(MethodView):
abort(500)
@blp_projects.route("/<project_id>/heatmap/<chromosome>/<region>")
class ProjectLocalHeatmapMethodView(MethodView):
def get(self, project_id, chromosome, region):
try:
return (
Project(id=project_id).get_project_local_heatmap_data(
chromosome, region
),
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>/zoom_manhattan")
class ProjectZoomManhattanMethodView(MethodView):
def get(self, project_id):
......
......@@ -116,7 +116,7 @@ paths:
"worktable": "READY"
progress":
"progress": "100"
/local_project:
/local_projects:
post:
description: |
Create a new local project from a selection of phenotypes
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment