diff options
author | Arun Isaac | 2024-08-24 16:01:15 +0100 |
---|---|---|
committer | Arun Isaac | 2024-08-24 16:01:15 +0100 |
commit | 493da73d35bf622f94845bb295a6093e562da661 (patch) | |
tree | c48dc54585702b7825421fb1214ce8d6f18c4dd2 | |
parent | 98e600bc3e06ea4c51e8591a767653498d1c1a8a (diff) | |
download | ravanan-493da73d35bf622f94845bb295a6093e562da661.tar.gz ravanan-493da73d35bf622f94845bb295a6093e562da661.tar.lz ravanan-493da73d35bf622f94845bb295a6093e562da661.zip |
workflow: Retrieve outputs differently based on workflow class.
* ravanan/workflow.scm (run-workflow): Retrieve outputs differently based on
whether the workflow is a CommandLineTool class or a Workflow class.
-rw-r--r-- | ravanan/workflow.scm | 24 |
1 files changed, 19 insertions, 5 deletions
diff --git a/ravanan/workflow.scm b/ravanan/workflow.scm index d4d2c6c..d0afdde 100644 --- a/ravanan/workflow.scm +++ b/ravanan/workflow.scm @@ -212,8 +212,22 @@ authenticate to the slurm API with. @var{slurm-api-endpoint} and #:slurm-api-endpoint slurm-api-endpoint #:slurm-jwt slurm-jwt)) inputs))) - (vector-map->list (lambda (output) - (cons (assoc-ref output "id") - (assoc-ref cell-values - (assoc-ref output "outputSource")))) - (assoc-ref cwl "outputs")))) + (let ((class (assoc-ref* cwl "class"))) + (cond + ((string=? class "CommandLineTool") + (vector-map->list (lambda (output) + (let ((output-id (assoc-ref output "id"))) + (cons output-id + (or (assoc-ref cell-values output-id) + (error "output not found" output-id))))) + (assoc-ref cwl "outputs"))) + ((string=? class "ExpressionTool") + (error "Workflow class not implemented yet" class)) + ((string=? class "Workflow") + (vector-map->list (lambda (output) + (let ((output-id (assoc-ref output "id"))) + (cons output-id + (or (assoc-ref cell-values + (assoc-ref* output "outputSource")) + (error "output not found" output-id))))) + (assoc-ref cwl "outputs"))))))) |