20
20
- |
21
21
```
22
22
23
- Use a JSON object in a separate file to describe the input of a run:
23
+ Use a YAML object in a separate file to describe the input of a run:
24
24
25
25
*echo-job.yml*
26
26
```
106
106
Notice that "example_file", as a `File` type, must be provided as an
107
107
object with the fields `class: File` and `path`.
108
108
109
- Invoke `cwl-runner` with the tool wrapper and the input object on the
109
+ Next, create a whale.txt and invoke `cwl-runner` with the tool wrapper and the input object on the
110
110
command line:
111
111
112
112
```
113
+ $ touch whale.txt
113
114
$ cwl-runner inp.cwl inp-job.yml
114
115
[job 140020149614160] /home/example$ echo -f -i42 --example-string hello --file=/home/example/whale.txt
115
116
-f -i42 --example-string hello --file=/home/example/whale.txt
218
219
- |
219
220
```
220
221
221
- Invoke `cwl-runner` with the tool wrapper and the input object on the
222
+ Next, create a tar file for the example and invoke `cwl-runner` with the tool wrapper and the input object on the
222
223
command line:
223
224
```
225
+ $ touch hello.txt && tar -cvf hello.tar hello.txt
224
226
$ cwl-runner tar.cwl tar-job.yml
225
227
[job 139868145165200] $ tar xf /home/example/hello.tar
226
228
Final process status is success
308
310
- |
309
311
```
310
312
311
- Invoke `cwl-runner` with the tool wrapper and the input object on the
313
+ Create your input files and invoke `cwl-runner` with the tool wrapper and the input object on the
312
314
command line:
313
315
```
316
+ $ rm hello.tar || true && touch goodbye.txt && tar -cvf hello.tar
314
317
$ cwl-runner tar-param.cwl tar-param-job.yml
315
318
[job 139868145165200] $ tar xf /home/example/hello.tar goodbye.txt
316
319
Final process status is success
374
377
- |
375
378
```
376
379
377
- Now invoke `cwl-runner` providing the tool wrapper and the input object
380
+ Provide a hello.js and invoke `cwl-runner` providing the tool wrapper and the input object
378
381
on the command line:
379
382
380
383
```
381
- $ cwl-runner example-docker.cwl example-docker-job.yml
384
+ $ echo "console.log(\"Hello World\");" > hello.js
385
+ $ cwl-runner docker.cwl docker-job.yml
382
386
[job 140259721854416] /home/example$ docker run -i --volume=/home/example/hello.js:/var/lib/cwl/job369354770_examples/hello.js:ro --volume=/home/example:/var/spool/cwl:rw --volume=/tmp/tmpDLs5hm:/tmp:rw --workdir=/var/spool/cwl --read-only=true --net=none --user=1001 --rm --env=TMPDIR=/tmp node:slim node /var/lib/cwl/job369354770_examples/hello.js
383
387
Hello world!
384
388
Final process status is success
417
421
- |
418
422
```
419
423
420
- Now invoke `cwl-runner` providing the tool wrapper and the input object
424
+ Now create a sample Java file and invoke `cwl-runner` providing the tool wrapper and the input object
421
425
on the command line:
422
426
423
427
```
424
- $ cwl-runner example-arguments.cwl example-arguments-job.yml
428
+ $ echo "public class Hello {}" > Hello.java
429
+ $ cwl-runner arguments.cwl arguments-job.yml
425
430
[job 140051188854928] /home/example$ docker run -i --volume=/home/example/Hello.java:/var/lib/cwl/job710906416_example/Hello.java:ro --volume=/home/example:/var/spool/cwl:rw --volume=/tmp/tmpdlQDWi:/tmp:rw --workdir=/var/spool/cwl --read-only=true --net=none --user=1001 --rm --env=TMPDIR=/tmp java:7 javac -d /var/spool/cwl /var/lib/cwl/job710906416_examples/Hello.java
426
431
Final process status is success
427
432
{
855
860
The second step `compile` depends on the results from the first step by
856
861
connecting the input parameter `src` to the output parameter of `untar`
857
862
using `#untar/example_out`. The output of this step `classfile` is
858
- connected to the `outputs` section for the Workflow, described above.
863
+ connected to the `outputs` section for the Workflow, described above.
0 commit comments