-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathraw-harvest-stage.cwl
266 lines (202 loc) · 4.9 KB
/
raw-harvest-stage.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
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
$graph:
- class: Workflow
id: main
requirements:
- class: SubworkflowFeatureRequirement
- class: ScatterFeatureRequirement
inputs:
rcm:
doc: RCM acquistion folder including the compressed RCM product
type: Directory[]
sink-access-key-id:
doc: Sink access key id if staging to object storage (optional)
type: string?
sink-secret-access-key:
doc: Sink secret access key if staging to object storage (optional)
type: string?
sink-service-url:
doc: Sink service URL if staging to object storage (optional)
type: string?
sink-region:
doc: Sink region if staging to object storage (optional)
type: string?
sink-path:
doc: Sink path if staging to object storage (optional)
type: string?
outputs:
- id: wf_outputs
outputSource:
- node_rcm/outputs
type: Directory[]
steps:
node_rcm:
run: "#raw-harvest-stage"
in:
rcm: rcm
sink-access-key-id: sink-access-key-id
sink-secret-access-key: sink-secret-access-key
sink-service-url: sink-service-url
sink-region: sink-region
sink-path: sink-path
out:
- outputs
scatter: rcm
scatterMethod: dotproduct
- class: Workflow
id: raw-harvest-stage
inputs:
rcm:
type: Directory
sink-access-key-id:
type: string?
sink-secret-access-key:
type: string?
sink-service-url:
type: string?
sink-region:
type: string?
sink-path:
type: string?
outputs:
- id: outputs
outputSource:
- node_stage_out/staged
type: Directory
steps:
node_raw:
in:
rcm: rcm
out:
- stac
- stac_item
run: "#raw"
node_harvest:
in:
inp1:
source: [node_raw/stac]
stac_item:
source: [node_raw/stac_item]
out:
- harvested
run: "#harvest"
node_stage_out:
in:
sink_access_key_id: sink-access-key-id
sink_secret_access_key: sink-secret-access-key
sink_service_url: sink-service-url
sink_path: sink-path
sink_region: sink-region
harvested:
source: [node_harvest/harvested]
out:
- staged
run: "#stage-out"
- class: CommandLineTool
id: raw
baseCommand: [rcm-raw]
arguments:
- $( inputs.rcm.path + "/" + inputs.rcm.basename + ".zip")
inputs:
rcm:
inputBinding:
type: Directory
outputs:
stac:
outputBinding:
glob: .
type: Directory
stac_item:
outputBinding:
glob: '*.json'
type: File
requirements:
EnvVarRequirement:
envDef:
PATH: /home/fbrito/work/rcm-metadata:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
InlineJavascriptRequirement: {}
DockerRequirement:
dockerPull: raw
- class: CommandLineTool
id: harvest
requirements:
EnvVarRequirement:
envDef:
PATH: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
ResourceRequirement: {}
InlineJavascriptRequirement: {}
DockerRequirement:
dockerPull: terradue/stars-t2:latest
baseCommand: Stars
arguments:
- copy
- -rel
- -r
- '4'
- --harvest
- -o
- ./
- valueFrom: ${ return "file://" + inputs.inp1.path + "/" + inputs.stac_item.basename; }
inputs:
inp1:
inputBinding:
type: Directory
stac_item:
inputBinding:
type: File
outputs:
harvested:
outputBinding:
glob: .
type: Directory
- class: CommandLineTool
doc: Stage-out harvested acquistions
id: stage-out
baseCommand: Stars
arguments:
- copy
- -rel
- -v
- -r
- '4'
inputs:
sink_access_key_id:
type: string?
sink_secret_access_key:
type: string?
sink_service_url:
type: string?
sink_region:
type: string?
sink_path:
inputBinding:
position: 5
prefix: -o
type: string?
harvested:
inputBinding:
position: 6
type: Directory
outputs:
staged:
outputBinding:
glob: .
type: Directory
requirements:
EnvVarRequirement:
envDef:
AWS_ACCESS_KEY_ID: $(inputs.sink_access_key_id)
AWS_SECRET_ACCESS_KEY: $(inputs.sink_secret_access_key)
AWS__ServiceURL: $(inputs.sink_service_url)
AWS__Region: $(inputs.sink_region)
AWS__AuthenticationRegion: $(inputs.sink_region)
AWS__SignatureVersion: "2"
PATH: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
ResourceRequirement: {}
DockerRequirement:
dockerPull: terradue/stars-t2:latest
cwlVersion: v1.0
$namespaces:
s: https://schema.org/
s:softwareVersion: 0.1.1
schemas:
- http://schema.org/version/9.0/schemaorg-current-http.rdf