-
Notifications
You must be signed in to change notification settings - Fork 6
/
example.cwl
57 lines (51 loc) · 1.04 KB
/
example.cwl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
#!/usr/bin/env cwl-runner
cwlVersion: v1.0
class: Workflow
doc: "
Example CWL workflow that uses some advanced features
"
inputs:
value:
type: string
sample_id:
type: string
steps:
# write the sample ID to a file
make_file:
run: write-str.cwl
in:
str: sample_id
out:
[ output_file ]
# put a header line on the file
add_header:
run: add_header.cwl
in:
input_file: make_file/output_file
header_str:
valueFrom: ${ return "SampleID"; }
out:
[ output_file ]
# add a second column to the file
add_value_col:
run: paste-col.cwl
in:
input_file: add_header/output_file
output_filename:
valueFrom: ${ return "output.tsv"; }
header:
valueFrom: ${ return "Value"; }
value: value
out:
[ output_file ]
# sleep for a few seconds so that we can see the system activity
sleep:
run: sleep.cwl
in:
dummy_input: value
out:
[]
outputs:
output_file:
type: File
outputSource: add_value_col/output_file