I've implemented a CommandLineTool that has exclusive parameters
inputs:
touchparam:
type:
- type: record
name: touchcode
fields:
touchcode:
type: string
inputBinding:
position: 1
- type: record
name: touchfile
fields:
touchfile:
type: File
inputBinding:
prefix: -f
but I can't quite get the syntax to bind the inputs from a workflow:
steps:
generate:
run: Generate.cwl
in: []
out: [rannum]
touch:
run: Touch.cwl
in:
touchparam:
touchfile: generate/rannum
out: [results]
This was just a guess based on how you bind them from a yml file. Any help?
3 answers
I implemented a solution based on my reading of what you have done:
First, the tool:
cwlVersion: v1.0
class: CommandLineTool
inputs:
touchparam:
type:
- type: record
name: touchcode
fields:
touchcode:
type: string
inputBinding:
position: 1
- type: record
name: touchfile
fields:
touchfile:
type: File
inputBinding:
prefix: -f
stdout: my_output.txt
outputs:
out:
type: stdout
baseCommand: echo
with a workflow:
cwlVersion: v1.0
class: Workflow
inputs:
touchit:
type:
- type: record
name: touchcode
fields:
touchcode:
type: string
- type: record
name: touchfile
fields:
touchfile:
type: File
outputs:
out:
type: File
outputSource: step1/out
steps:
step1:
run: tool/tool.cwl
in:
touchparam: touchit
out: [out]
and then two input files, first a string input:
touchparam:
touchcode: "foo"
and then a file input:
touchit:
touchfile:
class: File
path: my_output.txt
I hope this helps!
I implemented a solution based on my reading of what you have done:
First, the tool:
cwlVersion: v1.0
class: CommandLineTool
inputs:
touchparam:
type:
- type: record
name: touchcode
fields:
touchcode:
type: string
inputBinding:
position: 1
- type: record
name: touchfile
fields:
touchfile:
type: File
inputBinding:
prefix: -f
stdout: my_output.txt
outputs:
out:
type: stdout
baseCommand: echo
with a workflow:
cwlVersion: v1.0
class: Workflow
inputs:
touchit:
type:
- type: record
name: touchcode
fields:
touchcode:
type: string
- type: record
name: touchfile
fields:
touchfile:
type: File
outputs:
out:
type: File
outputSource: step1/out
steps:
step1:
run: tool/tool.cwl
in:
touchparam: touchit
out: [out]
and then two input files, first a string input:
touchparam:
touchcode: "foo"
and then a file input:
touchit:
touchfile:
class: File
path: my_output.txt
I hope this helps!
I implemented a solution based on my reading of what you have done:
First, the tool:
cwlVersion: v1.0
class: CommandLineTool
inputs:
touchparam:
type:
- type: record
name: touchcode
fields:
touchcode:
type: string
inputBinding:
position: 1
- type: record
name: touchfile
fields:
touchfile:
type: File
inputBinding:
prefix: -f
stdout: my_output.txt
outputs:
out:
type: stdout
baseCommand: echo
with a workflow:
cwlVersion: v1.0
class: Workflow
inputs:
touchit:
type:
- type: record
name: touchcode
fields:
touchcode:
type: string
- type: record
name: touchfile
fields:
touchfile:
type: File
outputs:
out:
type: File
outputSource: step1/out
steps:
step1:
run: tool/tool.cwl
in:
touchparam: touchit
out: [out]
and then two input files, first a string input:
touchparam:
touchcode: "foo"
and then a file input:
touchit:
touchfile:
class: File
path: my_output.txt
I hope this helps!
Log in to answer this question.
Thanks for the answer
It looks like the workflow you've implemented there takes the exclusive parameter as an input to itself, which is not what I am intending.
The second step is the one with the exclusive parameter, although it always takes the same one from the previous step. The full workflow and tool files are here:
https://github.com/petehague/Stoa/blob/master/actions/workflow1.cwl https://github.com/petehague/Stoa/blob/master/actions/Generate.cwl https://github.com/petehague/Stoa/blob/master/actions/Touch.cwl
For this test case, the workflow itself should not take any inputs.
Please use
ADD COMMENT/ADD REPLYwhen responding to existing posts to keep threads logically organized.This comment belongs under the answer below.