diff --git a/documentation/prankweb.open-api.yaml b/documentation/prankweb.open-api.yaml index 8c666d8..b4eb66d 100644 --- a/documentation/prankweb.open-api.yaml +++ b/documentation/prankweb.open-api.yaml @@ -2,13 +2,13 @@ openapi: 3.0.2 info: title: Prankweb API - version: 1.0.1 + version: 1.1.0 servers: - url: https://prankweb.cz/api/v2/ paths: - /predictions/{database}/{task}/: + /prediction/{database}/{prediction_task_id}: get: parameters: - in: path @@ -17,18 +17,18 @@ paths: schema: $ref: '#/components/schemas/DatabaseId' - in: path - name: task + name: prediction_task_id required: true schema: - $ref: '#/components/schemas/TaskId' + $ref: '#/components/schemas/PredictionTaskId' responses: '200': description: Success content: application/json: schema: - $ref: '#/components/schemas/Task' - /predictions/{database}/{task}/log: + $ref: '#/components/schemas/PredictionTask' + /prediction/{database}/{prediction_task_id}/log: get: parameters: - in: path @@ -37,10 +37,10 @@ paths: schema: $ref: '#/components/schemas/DatabaseId' - in: path - name: task + name: prediction_task_id required: true schema: - $ref: '#/components/schemas/TaskId' + $ref: '#/components/schemas/PredictionTaskId' responses: '200': description: Success @@ -48,7 +48,7 @@ paths: text/plain: schema: type: string - /predictions/{database}/{task}/public/prediction.json: + /prediction/{database}/{prediction_task_id}/public/prediction.json: get: parameters: - in: path @@ -57,10 +57,10 @@ paths: schema: $ref: '#/components/schemas/DatabaseId' - in: path - name: task + name: prediction_task_id required: true schema: - $ref: '#/components/schemas/TaskId' + $ref: '#/components/schemas/PredictionTaskId' responses: '200': description: Success @@ -68,7 +68,7 @@ paths: application/json: schema: $ref: '#/components/schemas/Prediction' - /docking/{database}/{task}/tasks: + /docking/{database}/{prediction_task_id}/tasks: get: parameters: - in: path @@ -77,10 +77,10 @@ paths: schema: $ref: '#/components/schemas/DatabaseId' - in: path - name: task + name: prediction_task_id required: true schema: - $ref: '#/components/schemas/TaskId' + $ref: '#/components/schemas/PredictionTaskId' responses: '200': description: Success @@ -88,8 +88,8 @@ paths: application/json: schema: $ref: '#/components/schemas/DockingTaskList' - /docking/{database}/{task}/public/result.json: - post: + /docking/{database}/{prediction_task_id}/{docking_task_hash}/public/result.json: + get: parameters: - in: path name: database @@ -97,17 +97,15 @@ paths: schema: $ref: '#/components/schemas/DatabaseId' - in: path - name: task + name: prediction_task_id required: true schema: - $ref: '#/components/schemas/TaskId' - requestBody: - description: The request needs to contain the hash of the docking task. - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/DockingRequest' + $ref: '#/components/schemas/PredictionTaskId' + - in: path + name: docking_task_hash + required: true + schema: + type: string responses: '200': description: Success @@ -120,13 +118,15 @@ components: schemas: DatabaseId: type : string - TaskId: + PredictionTaskId: type : string - Task: + PredictionTask: type: object properties: id: type: string + database: + type: string created: type: string format: date-time @@ -136,6 +136,8 @@ components: status: type: string enum: ['queued', 'running', 'failed', 'successful'] + metadata: + type: object Prediction: type: object properties: @@ -223,11 +225,6 @@ components: type: string pocket: type: string - DockingRequest: - type: object - properties: - hash: - type: string DockingResponse: type: array items: diff --git a/executor-docking/run_task.py b/executor-docking/run_task.py index 67297c1..cd50cb4 100644 --- a/executor-docking/run_task.py +++ b/executor-docking/run_task.py @@ -142,7 +142,7 @@ def execute_directory_task(docking_directory: str, taskId: int): return #parse the prediction file and do some calculations - in this case just counting the number of residues per pocket - #API is /docking///public/ + #API is /docking////public/ #split docking_directory to get database_name and prediction_name result = [] database_name = docking_directory.split("/")[4] @@ -151,7 +151,7 @@ def execute_directory_task(docking_directory: str, taskId: int): else: prediction_name = docking_directory.split("/")[6] - result_url = "./api/v2/docking/" + database_name + "/" + prediction_name + "/public/results.zip" + result_url = "./api/v2/docking/" + database_name + "/" + prediction_name + "/" + status["tasks"][taskId]["initialData"]["hash"] + "/public/results.zip" result.append({ "url": result_url }) diff --git a/frontend/client/index/index.html b/frontend/client/index/index.html index b5045dc..2bc13ad 100644 --- a/frontend/client/index/index.html +++ b/frontend/client/index/index.html @@ -40,7 +40,7 @@

@@ -58,6 +58,15 @@

Use original structure +
+ + +
- - - - -
-
- Conservation -
-
-
-
- + -
+
-