diff options
Diffstat (limited to 'doc')
-rw-r--r-- | doc/capture-output-file-with-parameter-reference.scm | 10 | ||||
-rw-r--r-- | doc/capture-output-file.scm | 9 | ||||
-rw-r--r-- | doc/capture-stdout.scm | 5 | ||||
-rw-r--r-- | doc/ccwl.skb | 16 | ||||
-rw-r--r-- | doc/checksum.scm | 15 | ||||
-rw-r--r-- | doc/decompress-compile-run.scm | 19 | ||||
-rw-r--r-- | doc/hello-world.scm | 3 |
7 files changed, 45 insertions, 32 deletions
diff --git a/doc/capture-output-file-with-parameter-reference.scm b/doc/capture-output-file-with-parameter-reference.scm index 3104fae..bb5476b 100644 --- a/doc/capture-output-file-with-parameter-reference.scm +++ b/doc/capture-output-file-with-parameter-reference.scm @@ -1,9 +1,9 @@ (define extract-specific-file - (command #:run "tar" "--extract" "--file" (input 'archive #:type 'File) - (input 'extractfile #:type 'string) - #:outputs (output 'extracted-file - #:type 'File - #:binding '((glob . "$(inputs.extractfile)"))))) + (command #:inputs (archive #:type 'File) (extractfile #:type 'string) + #:run "tar" "--extract" "--file" archive extractfile + #:outputs (extracted-file + #:type 'File + #:binding '((glob . "$(inputs.extractfile)"))))) (workflow ((archive #:type File) (extractfile #:type string)) (extract-specific-file #:archive archive #:extractfile extractfile)) diff --git a/doc/capture-output-file.scm b/doc/capture-output-file.scm index b13549e..6c5dbbd 100644 --- a/doc/capture-output-file.scm +++ b/doc/capture-output-file.scm @@ -1,8 +1,9 @@ (define extract - (command #:run "tar" "--extract" "--file" (input 'archive #:type 'File) - #:outputs (output 'extracted-file - #:type 'File - #:binding '((glob . "hello.txt"))))) + (command #:inputs (archive #:type 'File) + #:run "tar" "--extract" "--file" archive + #:outputs (extracted-file + #:type 'File + #:binding '((glob . "hello.txt"))))) (workflow ((archive #:type File)) (extract #:archive archive)) diff --git a/doc/capture-stdout.scm b/doc/capture-stdout.scm index 1f26a95..6913809 100644 --- a/doc/capture-stdout.scm +++ b/doc/capture-stdout.scm @@ -1,6 +1,7 @@ (define print - (command #:run "echo" (input 'message #:type 'string) - #:outputs (output 'printed-message #:type 'stdout))) + (command #:inputs (message #:type 'string) + #:run "echo" message + #:outputs (printed-message #:type 'stdout))) (workflow ((message #:type string)) (print #:message message)) diff --git a/doc/ccwl.skb b/doc/ccwl.skb index 57baa94..f31cba8 100644 --- a/doc/ccwl.skb +++ b/doc/ccwl.skb @@ -58,12 +58,16 @@ string.]) (p [The first form in this code defines the ,(code "print") command. This form is the equivalent of defining a -,(code "CommandLineTool") class workflow in CWL. All arguments after -,(code "#:run") specify the command that will be run. One of those -arguments ,(code "(input 'message #:type 'string)") refers to a -,(code "string") type input named ,(code "message"). Notice how the -command definition is very close to a shell command, only that it is -slightly annotated with inputs and their types.]) +,(code "CommandLineTool") class workflow in CWL. The arguments after +,(code "#:inputs") define the inputs to the workflow. The arguments +after ,(code "#:run") specify the command that will be run. The input +,(code "(message #:type 'string)") defines a ,(code "string") type +input named ,(code "message"). The command defined in the +,(code "#:run") argument is the command itself followed by a list of +command arguments. One of the arguments references the input +,(code "message"). Notice how the command definition is very close to +a shell command, only that it is slightly annotated with inputs and +their types.]) (p [The second form describes the actual workflow and is the equivalent of defining a ,(code "Workflow") class workflow in CWL. The diff --git a/doc/checksum.scm b/doc/checksum.scm index 206c2a0..4d8bfaf 100644 --- a/doc/checksum.scm +++ b/doc/checksum.scm @@ -1,14 +1,17 @@ (define md5sum - (command #:run "md5sum" (input 'file #:type 'File) - #:outputs (output 'md5 #:type 'stdout))) + (command #:inputs (file #:type 'File) + #:run "md5sum" file + #:outputs (md5 #:type 'stdout))) (define sha1sum - (command #:run "sha1sum" (input 'file #:type 'File) - #:outputs (output 'sha1 #:type 'stdout))) + (command #:inputs (file #:type 'File) + #:run "sha1sum" file + #:outputs (sha1 #:type 'stdout))) (define sha256sum - (command #:run "sha256sum" (input 'file #:type 'File) - #:outputs (output 'sha256 #:type 'stdout))) + (command #:inputs (file #:type 'File) + #:run "sha256sum" file + #:outputs (sha256 #:type 'stdout))) (workflow ((file #:type File)) (tee (md5sum #:file file) diff --git a/doc/decompress-compile-run.scm b/doc/decompress-compile-run.scm index 437fb41..a2c58bb 100644 --- a/doc/decompress-compile-run.scm +++ b/doc/decompress-compile-run.scm @@ -1,16 +1,19 @@ (define decompress - (command #:run "gzip" "--stdout" "--decompress" (input 'compressed #:type 'File) - #:outputs (output 'decompressed #:type 'stdout))) + (command #:inputs (compressed #:type 'File) + #:run "gzip" "--stdout" "--decompress" compressed + #:outputs (decompressed #:type 'stdout))) (define compile - (command #:run "gcc" "-x" "c" (input 'source #:type 'File) - #:outputs (output 'executable - #:type 'File - #:binding '((glob . "a.out"))))) + (command #:inputs (source #:type 'File) + #:run "gcc" "-x" "c" source + #:outputs (executable + #:type 'File + #:binding '((glob . "a.out"))))) (define run - (command #:run (input 'executable) - #:outputs (output 'stdout #:type 'stdout))) + (command #:inputs executable + #:run executable + #:outputs (stdout #:type 'stdout))) (workflow ((compressed-source #:type File)) (pipe (decompress #:compressed compressed-source) diff --git a/doc/hello-world.scm b/doc/hello-world.scm index 262b99f..1624053 100644 --- a/doc/hello-world.scm +++ b/doc/hello-world.scm @@ -1,5 +1,6 @@ (define print - (command #:run "echo" (input 'message #:type 'string))) + (command #:inputs (message #:type 'string) + #:run "echo" message)) (workflow ((message #:type string)) (print #:message message)) |