-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
cwlex.cwl
41 lines (39 loc) · 872 Bytes
/
cwlex.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
#!/usr/bin/env cwl-runner
arguments:
- cwlex
- '$(inputs.inp ? inputs.inp.path : inputs.inpdir.path+''/''+inputs.inpfile)'
class: CommandLineTool
cwlVersion: v1.0
id: '#main'
inputs:
- id: inp
type:
- 'null'
- File
- id: inpdir
type:
- 'null'
- Directory
- id: inpfile
type:
- 'null'
- string
- id: outname
type:
- 'null'
- string
outputs:
- id: converted
outputBinding:
glob: $(outname(inputs))
type: File
requirements:
- class: DockerRequirement
dockerPull: commonworkflowlanguage/cwlex
- class: InlineJavascriptRequirement
expressionLib:
- |
function outname(inputs) {
return inputs.outname ? inputs.outname : (inputs.inp ? inputs.inp.nameroot+'.cwl' : inputs.inpfile.replace(/(.*).cwlex/, '$1.cwl'));
}
stdout: $(outname(inputs))