aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArun Isaac2024-08-24 16:01:15 +0100
committerArun Isaac2024-08-24 16:01:15 +0100
commit493da73d35bf622f94845bb295a6093e562da661 (patch)
treec48dc54585702b7825421fb1214ce8d6f18c4dd2
parent98e600bc3e06ea4c51e8591a767653498d1c1a8a (diff)
downloadravanan-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.scm24
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")))))))