forked from common-workflow-language/cwltool
-
Notifications
You must be signed in to change notification settings - Fork 1
/
count-lines2-wf.cwl
executable file
·50 lines (46 loc) · 979 Bytes
/
count-lines2-wf.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
#!/usr/bin/env cwl-runner
class: Workflow
cwlVersion: v1.1.0-dev1
requirements:
InlineJavascriptRequirement: {}
inputs:
file1:
type: File
outputs:
count_output:
type: int
outputSource: step2/parseInt_output
steps:
step1:
in:
wc_file1: file1
out: [wc_output]
run:
id: wc
class: CommandLineTool
inputs:
wc_file1:
type: File
inputBinding: {}
outputs:
wc_output:
type: File
outputBinding:
glob: output.txt
stdout: output.txt
baseCommand: wc
step2:
in:
parseInt_file1: step1/wc_output
out: [parseInt_output]
run:
class: ExpressionTool
inputs:
parseInt_file1:
type: File
inputBinding: { loadContents: true }
outputs:
parseInt_output:
type: int
expression: >
${return {'parseInt_output': parseInt(inputs.parseInt_file1.contents)};}