@@ -171,9 +171,9 @@ outputs:
171
171
outputSource: first/txt
172
172
` ` `
173
173
174
- # ## There is a error, but only using Paramter Reference.
174
+ # ## CWL Paramter Reference error due to hyphen in input identifier
175
175
176
- ` cwltool --validate` is return valid.
176
+ If `cwltool --validate` returns valid
177
177
178
178
` ` ` console
179
179
$ cwltool --validate cwl/qiime.cwl
@@ -182,42 +182,30 @@ INFO Resolved 'cwl/qiime.cwl' to 'file:///workspace/cwl/qiime.cwl'
182
182
cwl/qiime.cwl is valid CWL.
183
183
` ` `
184
184
185
- But execute it causes error.
185
+ But executing it causes an error like :
186
186
187
- ```
188
- cwltool cwl/qiime.cwl --sample-input metadata.tsv
187
+ ` ` ` console
188
+ $ cwltool cwl/qiime.cwl --sample-input metadata.tsv
189
189
INFO /usr/local/bin/cwltool 1.0.20190831161204
190
190
INFO Resolved 'cwl/qiime.cwl' to 'file:///workspace/cwl/qiime.cwl'
191
191
ERROR Workflow error, try again with --debug for more information:
192
192
cwl/qiime.cwl:14:5: Expression evaluation error:
193
193
Syntax error in parameter reference '(inputs.sample-input)'. This could be due
194
194
to using Javascript code without specifying InlineJavascriptRequirement.
195
- $
196
195
` ` `
197
196
198
197
The file is here
199
198
200
199
` ` ` cwl
201
200
cwlVersion: v1.0
202
201
class: CommandLineTool
203
- hints:
204
- DockerRequirement:
205
- dockerPull: qiime2/core:2019.7
206
202
baseCommand: [qiime, metadata, tabulate]
207
203
arguments:
208
204
- prefix: --m-input-file
209
205
valueFrom: $(inputs.sample-input)
210
- - prefix: --o-visualization
211
- valueFrom: metadata.qzv
212
206
inputs:
213
- # for metadata.tsv
214
207
sample-input: File
215
- outputs:
216
- # metadata.qzv
217
- visualization:
218
- type: File
219
- outputBinding:
220
- glob: metadata.qzv
208
+ outputs: []
221
209
` ` `
222
210
223
211
Problem caused by `-` (hyphen charcter).
@@ -233,7 +221,7 @@ inputs:
233
221
` ` `
234
222
235
223
236
- Fix this error is change ` - ` (hyphen) to ` _ ` (under score )
224
+ Fix this error is change `-` (hyphen) to `_` (underscore )
237
225
238
226
` ` ` cwl
239
227
valueFrom: $(inputs.sample_input)
@@ -245,3 +233,9 @@ inputs:
245
233
sample_input: File
246
234
# ^ changed here
247
235
` ` `
236
+
237
+ If is not possible to change the input identifier, then you can use an alternative CWL Parameter Reference syntax :
238
+
239
+ ` ` ` cwl
240
+ valueFrom: $(inputs["sample-input"])
241
+ ` ` `
0 commit comments