File tree Expand file tree Collapse file tree 1 file changed +40
-0
lines changed Expand file tree Collapse file tree 1 file changed +40
-0
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ title : " Creating Files at Runtime"
3
+ teaching : 10
4
+ exercises : 0
5
+ questions :
6
+ - " What do I do when I want to create values dynamically and CWL doesn't
7
+ provide a built-in way of doing so?"
8
+ objectives :
9
+ - " Learn how to insert JavaScript expressions into a CWL description."
10
+ keypoints :
11
+ - " Use `InitialWorkDirRequirement` to specify input files that need to be
12
+ created during tool runtime."
13
+ ---
14
+ Sometimes you need to create a file on the fly from input parameters,
15
+ such as tools which expect to read their input configuration from a file
16
+ rather than the command line parameters. To do this, use
17
+ ` InitialWorkDirRequirement ` .
18
+
19
+ * createfile.cwl*
20
+
21
+ ```
22
+ {% include cwl/createfile.cwl %}
23
+ ```
24
+
25
+ * echo-job.yml*
26
+
27
+ ```
28
+ {% include cwl/echo-job.yml %}
29
+ ```
30
+
31
+ Now invoke ` cwl-runner ` with the tool wrapper and the input object on the
32
+ command line:
33
+
34
+ ```
35
+ $ cwltool createfile.cwl echo-job.yml
36
+ [job 140528604979344] /home/example$ cat example.conf
37
+ CONFIGVAR=Hello world!
38
+ Final process status is success
39
+ {}
40
+ ```
You can’t perform that action at this time.
0 commit comments