Skip to content
Snippets Groups Projects
Commit dc0d5974 authored by Cyril  NERIN's avatar Cyril NERIN
Browse files

FIX #90

parent d1490469
No related branches found
No related tags found
2 merge requests!35Replace Connexion by flask-smorest,!34Replace connexion by flask-smorest
......@@ -288,6 +288,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):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment