Skip to content

Commit 156d28f

Browse files
author
Peter Amstutz
committed
Update examples to v1.0
1 parent 5403799 commit 156d28f

15 files changed

+72
-88
lines changed

v1.0/examples/1st-tool.cwl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
cwlVersion: cwl:draft-3
1+
cwlVersion: v1.0
22
class: CommandLineTool
33
baseCommand: echo
44
inputs:
5-
- id: message
5+
message:
66
type: string
77
inputBinding:
88
position: 1

v1.0/examples/1st-workflow.cwl

Lines changed: 12 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,24 @@
1-
cwlVersion: cwl:draft-3
1+
cwlVersion: v1.0
22
class: Workflow
33
inputs:
4-
- id: inp
5-
type: File
6-
- id: ex
7-
type: string
4+
inp: File
5+
ex: string
86

97
outputs:
10-
- id: classout
8+
classout:
119
type: File
12-
source: "#compile/classfile"
10+
outputSource: "#compile/classfile"
1311

1412
steps:
15-
- id: untar
13+
untar:
1614
run: tar-param.cwl
1715
inputs:
18-
- id: tarfile
19-
source: "#inp"
20-
- id: extractfile
21-
source: "#ex"
22-
outputs:
23-
- id: example_out
16+
tarfile: inp
17+
extractfile: ex
18+
outputs: [example_out]
2419

25-
- id: compile
20+
compile:
2621
run: arguments.cwl
2722
inputs:
28-
- id: src
29-
source: "#untar/example_out"
30-
outputs:
31-
- id: classfile
23+
src: untar/example_out
24+
outputs: [classfile]

v1.0/examples/arguments.cwl

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,19 @@
1-
cwlVersion: cwl:draft-3
1+
cwlVersion: v1.0
22
class: CommandLineTool
33
label: Example trivial wrapper for Java 7 compiler
44
baseCommand: javac
55
hints:
6-
- class: DockerRequirement
6+
DockerRequirement:
77
dockerPull: java:7
88
baseCommand: javac
9-
arguments:
10-
- prefix: "-d"
11-
valueFrom: $(runtime.outdir)
9+
arguments: ["-d", $(runtime.outdir)]
1210
inputs:
13-
- id: src
11+
src:
1412
type: File
1513
inputBinding:
1614
position: 1
1715
outputs:
18-
- id: classfile
16+
classfile:
1917
type: File
2018
outputBinding:
2119
glob: "*.class"

v1.0/examples/array-inputs.cwl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
1-
cwlVersion: cwl:draft-3
1+
cwlVersion: v1.0
22
class: CommandLineTool
33
inputs:
4-
- id: filesA
4+
filesA:
55
type:
66
type: array
77
items: string
88
inputBinding:
99
prefix: -A
1010
position: 1
1111

12-
- id: filesB
12+
filesB:
1313
type:
1414
type: array
1515
items: string
@@ -19,7 +19,7 @@ inputs:
1919
inputBinding:
2020
position: 2
2121

22-
- id: filesC
22+
filesC:
2323
type:
2424
type: array
2525
items: string

v1.0/examples/array-outputs.cwl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
1-
cwlVersion: cwl:draft-3
1+
cwlVersion: v1.0
22
class: CommandLineTool
33
baseCommand: touch
44
inputs:
5-
- id: touchfiles
5+
touchfiles:
66
type:
77
type: array
88
items: string
99
inputBinding:
1010
position: 1
1111
outputs:
12-
- id: output
12+
output:
1313
type:
1414
type: array
1515
items: File

v1.0/examples/createfile.cwl

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,13 @@
11
class: CommandLineTool
2-
cwlVersion: cwl:draft-3
2+
cwlVersion: v1.0
33
baseCommand: ["cat", "example.conf"]
44

55
requirements:
6-
- class: CreateFileRequirement
7-
fileDef:
8-
- filename: example.conf
9-
fileContent: |
10-
CONFIGVAR=$(inputs.message)
6+
InitialWorkDirRequirirement:
7+
listing:
8+
example.conf: |
9+
CONFIGVAR=$(inputs.message)
1110

1211
inputs:
13-
- id: message
14-
type: string
12+
message: string
1513
outputs: []

v1.0/examples/docker.cwl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
cwlVersion: cwl:draft-3
1+
cwlVersion: v1.0
22
class: CommandLineTool
33
baseCommand: node
44
hints:
5-
- class: DockerRequirement
5+
DockerRequirement:
66
dockerPull: node:slim
77
inputs:
8-
- id: src
8+
src:
99
type: File
1010
inputBinding:
1111
position: 1

v1.0/examples/env.cwl

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
1-
cwlVersion: cwl:draft-3
1+
cwlVersion: v1.0
22
class: CommandLineTool
33
baseCommand: env
44
requirements:
5-
- class: EnvVarRequirement
5+
EnvVarRequirement:
66
envDef:
7-
- envName: HELLO
8-
envValue: $(inputs.message)
7+
HELLO: $(inputs.message)
98
inputs:
10-
- id: message
11-
type: string
9+
message: string
1210
outputs: []

v1.0/examples/expression.cwl

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
cwlVersion: cwl:draft-3
1+
cwlVersion: v1.0
22
class: CommandLineTool
33
baseCommand: echo
44

@@ -8,16 +8,16 @@ requirements:
88
inputs: []
99
outputs: []
1010
arguments:
11-
- valueFrom: $(1+1)
12-
prefix: -A
13-
- valueFrom: $("/foo/bar/baz".split('/').slice(-1)[0])
14-
prefix: -B
15-
- valueFrom: |
11+
- prefix: -A
12+
valueFrom: $(1+1)
13+
- prefix: -B
14+
valueFrom: $("/foo/bar/baz".split('/').slice(-1)[0])
15+
- prefix: -C
16+
valueFrom: |
1617
${
1718
var r = [];
1819
for (var i = 10; i >= 1; i--) {
1920
r.push(i);
2021
}
2122
return r;
2223
}
23-
prefix: -C

v1.0/examples/inp.cwl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
cwlVersion: cwl:draft-3
1+
cwlVersion: v1.0
22
class: CommandLineTool
33
baseCommand: echo
44
inputs:

v1.0/examples/linkfile.cwl

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,25 @@
1-
cwlVersion: cwl:draft-3
1+
cwlVersion: v1.0
22
class: CommandLineTool
33
hints:
4-
- class: DockerRequirement
4+
DockerRequirement:
55
dockerPull: java:7
66
baseCommand: javac
77

88
requirements:
99
- class: InlineJavascriptRequirement
10-
- class: CreateFileRequirement
11-
fileDef:
12-
- filename: $(inputs.src.path.split('/').slice(-1)[0])
13-
fileContent: $(inputs.src)
10+
- class: InitialWorkDirRequirirement
11+
listing:
12+
- $(inputs.src)
1413

1514
inputs:
16-
- id: src
15+
src:
1716
type: File
1817
inputBinding:
1918
position: 1
20-
valueFrom: $(inputs.src.path.split('/').slice(-1)[0])
19+
valueFrom: $(inputs.src.basename)
2120

2221
outputs:
23-
- id: classfile
22+
classfile:
2423
type: File
2524
outputBinding:
2625
glob: "*.class"

v1.0/examples/record.cwl

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,32 @@
1-
cwlVersion: cwl:draft-3
1+
cwlVersion: v1.0
22
class: CommandLineTool
33
inputs:
4-
- id: dependent_parameters
4+
dependent_parameters:
55
type:
66
type: record
77
name: dependent_parameters
88
fields:
9-
- name: itemA
9+
itemA:
1010
type: string
1111
inputBinding:
1212
prefix: -A
13-
- name: itemB
13+
itemB:
1414
type: string
1515
inputBinding:
1616
prefix: -B
17-
- id: exclusive_parameters
17+
exclusive_parameters:
1818
type:
1919
- type: record
2020
name: itemC
2121
fields:
22-
- name: itemC
22+
itemC:
2323
type: string
2424
inputBinding:
2525
prefix: -C
2626
- type: record
2727
name: itemD
2828
fields:
29-
- name: itemD
29+
itemD:
3030
type: string
3131
inputBinding:
3232
prefix: -D

v1.0/examples/stdout.cwl

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,12 @@
1-
cwlVersion: cwl:draft-3
1+
cwlVersion: v1.0
22
class: CommandLineTool
33
baseCommand: echo
44
stdout: output.txt
55
inputs:
6-
- id: message
6+
message:
77
type: string
88
inputBinding:
99
position: 1
1010
outputs:
1111
- id: output
12-
type: File
13-
outputBinding:
14-
glob: output.txt
12+
type: stdout

v1.0/examples/tar-param.cwl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
1-
cwlVersion: cwl:draft-3
1+
cwlVersion: v1.0
22
class: CommandLineTool
33
baseCommand: [tar, xf]
44
inputs:
5-
- id: tarfile
5+
tarfile:
66
type: File
77
inputBinding:
88
position: 1
9-
- id: extractfile
9+
extractfile:
1010
type: string
1111
inputBinding:
1212
position: 2
1313
outputs:
14-
- id: example_out
14+
example_out:
1515
type: File
1616
outputBinding:
1717
glob: $(inputs.extractfile)

v1.0/examples/tar.cwl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
cwlVersion: cwl:draft-3
1+
cwlVersion: v1.0
22
class: CommandLineTool
33
baseCommand: [tar, xf]
44
inputs:
5-
- id: tarfile
5+
tarfile:
66
type: File
77
inputBinding:
88
position: 1
99
outputs:
10-
- id: example_out
10+
example_out:
1111
type: File
1212
outputBinding:
1313
glob: hello.txt

0 commit comments

Comments
 (0)