/
search.cwl
110 lines (105 loc) · 2.24 KB
/
search.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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
cwlVersion: v1.0
$graph:
- id: index
class: CommandLineTool
baseCommand: python
arguments:
- valueFrom: input.txt
position: 1
requirements:
- class: InitialWorkDirRequirement
listing:
- entryname: input.txt
entry: $(inputs.file)
- class: InlineJavascriptRequirement
hints:
- class: DockerRequirement
dockerPull: python:2-slim
inputs:
file: File
secondfile: File
index.py:
type: File
default:
class: File
location: index.py
inputBinding:
position: 0
outputs:
result:
type: File
outputBinding:
glob: input.txt
secondaryFiles:
- ".idx1"
- "^.idx2"
- '$(self.basename).idx3'
- '${ return self.basename+".idx4"; }'
- '$({"path": self.path+".idx5", "class": "File"})'
- '$(self.nameroot).idx6$(self.nameext)'
- '${ return [self.basename+".idx7", inputs.secondfile]; }'
- "_idx8"
- id: search
class: CommandLineTool
baseCommand: python
requirements:
- class: InlineJavascriptRequirement
hints:
- class: DockerRequirement
dockerPull: python:2-slim
inputs:
file:
type: File
inputBinding:
position: 1
secondaryFiles:
- ".idx1"
- "^.idx2"
- '$(self.basename).idx3'
- '${ return self.basename+".idx4"; }'
- '$(self.nameroot).idx6$(self.nameext)'
- '${ return [self.basename+".idx7"]; }'
- "_idx8"
search.py:
type: File
default:
class: File
location: search.py
inputBinding:
position: 0
term:
type: string
inputBinding:
position: 2
outputs:
result:
type: File
outputBinding:
glob: result.txt
stdout: result.txt
- id: main
class: Workflow
inputs:
infile: File
secondfile: File
term: string
outputs:
outfile:
type: File
outputSource: search/result
indexedfile:
type: File
outputSource: index/result
steps:
index:
run: "#index"
in:
file: infile
secondfile: secondfile
out: [result]
search:
run: "#search"
in:
file: index/result
term: term
out: [result]