From 364cd0a987c2a6644ceb2803f92c01d16356d7a1 Mon Sep 17 00:00:00 2001
From: Arun Isaac
Date: Sun, 21 Feb 2021 19:43:16 +0530
Subject: Add CWL generator for CommandLineTool workflows
---
scripts/generate-cwl.scm | 130 +++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 130 insertions(+)
create mode 100644 scripts/generate-cwl.scm
(limited to 'scripts')
diff --git a/scripts/generate-cwl.scm b/scripts/generate-cwl.scm
new file mode 100644
index 0000000..a28cdb0
--- /dev/null
+++ b/scripts/generate-cwl.scm
@@ -0,0 +1,130 @@
+;;
+;; CWL generator
+;;
+;; This file implements a generator to generate CWL files.
+
+(define-module (generate-cwl)
+ #:use-module (rnrs records syntactic)
+ #:use-module (srfi srfi-1)
+ #:use-module (srfi srfi-71)
+ #:use-module (ice-9 match)
+ #:export (clitool
+ workflow
+ input
+ output
+ step
+ workflow-output))
+
+(define-record-type ( make-input input?)
+ (fields (immutable id input-id)
+ (immutable type input-type)
+ (immutable default input-default)
+ (immutable label input-label)
+ (immutable other input-other)))
+
+(define-record-type unspecified-default)
+
+(define* (input id #:key type label (default (make-unspecified-default)) (other '()))
+ "Build and return an object."
+ (make-input id type default label other))
+
+(define-record-type (