diff options
-rw-r--r-- | ccwl/ccwl.scm | 65 |
1 files changed, 2 insertions, 63 deletions
diff --git a/ccwl/ccwl.scm b/ccwl/ccwl.scm index 4760fb6..468d021 100644 --- a/ccwl/ccwl.scm +++ b/ccwl/ccwl.scm @@ -8,14 +8,11 @@ #:use-module (srfi srfi-9) #:use-module (srfi srfi-9 gnu) #:use-module (ice-9 match) - #:export (clitool - command + #:export (command workflow input output - step - clitool-step)) - + step)) (define-immutable-record-type <input> (make-input id type label default binding source other) @@ -45,26 +42,6 @@ (define* (output id #:key type binding source (other '())) "Build and return an <output> object." - -(define* (clitool-step id args #:key (additional-inputs '()) (outputs '()) stdout stderr (other '())) - (step id - (clitool (map (lambda (arg) - (if (intermediate? arg) - (intermediate-input arg) - arg)) - args) - #:additional-inputs additional-inputs - #:outputs outputs - #:stdout stdout - #:stderr stderr - #:other other) - (append (filter (lambda (arg) - (or (input? arg) - (intermediate? arg))) - args) - additional-inputs) - (map output-id outputs))) - (make-output id type binding source other)) @@ -80,44 +57,6 @@ (cons 'default (input-default input))))) ,@(input-other input))) -(define* (clitool args #:key (additional-inputs '()) (outputs '()) stdout stderr (other '())) - "Build a CommandLineTool class CWL workflow." - (let ((base-command arguments (parse-command args))) - `((cwl-version . "v1.1") - (class . Command-line-tool) - ,@other - (base-command . ,(list->vector base-command)) - ,@(let ((inputs (append arguments additional-inputs))) - (if (not (null? inputs)) - `((inputs . ,(map (match-lambda - (('keyword prefix input) - (append (input->tree input) - `((input-binding (prefix . ,prefix))))) - (('positional position input) - (append (input->tree input) - `((input-binding (position . ,position))))) - (input - (input->tree input))) - inputs))) - (list))) - ,@(if (or (not (null? outputs)) stdout stderr) - `((outputs . ,(map (lambda (output) - `(,(output-id output) - ,@(filter identity - (list (and (output-type output) - (cons 'type (output-type output))) - (and (output-binding output) - (cons 'output-binding (output-binding output))))) - ,@(output-other output))) - outputs))) - (list)) - ,@(if stdout - `((stdout . ,stdout)) - '()) - ,@(if stderr - `((stderr . ,stderr)) - '())))) - (define* (workflow steps outputs #:key (other '())) (define-immutable-record-type <step> (make-step id run in out) |