common-workflow-language / common-workflow-language/cwltool
CWLtool scatter dot product is not scattering the steps and it is overwriting the output results
- Dominant language
- Python
- Stars
- 376
- Forks
- 255
- Avg merge
- 2d 7h
- Merged PRs (30d)
- 12
Description
## Expected Behavior
I have toy example workflow which I used for running. final workflow in using Toil, but I cannot let the toy script run parallel using scatter dot product.
The output file must contain two string in two lines as,
hello MOHUA
hello MSJLF
## Actual Behaviour
But instead the it is printing only last string from the input YML file, like this
hello MSJLF
## Workflow Code
```
cwlVersion: v1.0
class: Workflow
requirements:
- class: ScatterFeatureRequirement
- class: StepInputExpressionRequirement
inputs:
scattered_messages: string[]
message: string
outputs:
out_message:
type: File[]
outputSource: step1/out_message
steps:
step1:
run: echo-tool.cwl
scatter: [scattered_message]
scatterMethod: dotproduct
in:
message: message
scattered_message: scattered_messages
out: [out_message]
```
The `echo-too.cwl`
```
cwlVersion: v1.0
class: CommandLineTool
inputs:
scattered_message:
type: string
inputBinding:
position: 2
message:
type: string
inputBinding:
position: 1
outputs:
out_message:
type: stdout
baseCommand: echo
```
And the `yml` file
```
scattered_messages:
- MOHUA
- MSJLF
message: hello
```
## Full Traceback
```pytb
/cluster/home/aalva/.local/bin/cwltool 1.0.20181012180214
Resolved 'echo-workflow.cwl' to 'file:///cluster/work/grlab/projects/alva_temp/Hypoxia_Toil_CWL/Test_Tum/echo-workflow.cwl'
[workflow ] start
[workflow ] starting step step1
[step step1] start
[job step1] /tmp/tmph0e5qlu4$ echo \
hello \
MOHUA > /tmp/tmph0e5qlu4/6e994e34e21be716dbfb7d003cd1dfb945e64fd6
[job step1] completed success
[step step1] start
[job step1_2] /tmp/tmpb3pjng9k$ echo \
hello \
MSJLF > /tmp/tmpb3pjng9k/6e994e34e21be716dbfb7d003cd1dfb945e64fd6
[job step1_2] completed success
[step step1] completed success
[workflow ] completed success
{
"out_message": [
{
"location": "file:///cluster/work/grlab/projects/alva_temp/Hypoxia_Toil_CWL/Test_Tum/6e994e34e21be716dbfb7d003cd1dfb945e64fd6",
"basename": "6e994e34e21be716dbfb7d003cd1dfb945e64fd6",
"class": "File",
"checksum": "sha1$b8ac62e1c5ad7411b62394a0b932c80b4824a74c",
"size": 12,
"path": "/cluster/work/grlab/projects/alva_temp/Hypoxia_Toil_CWL/Test_Tum/6e994e34e21be716dbfb7d003cd1dfb945e64fd6"
},
{
"location": "file:///cluster/work/grlab/projects/alva_temp/Hypoxia_Toil_CWL/Test_Tum/6e994e34e21be716dbfb7d003cd1dfb945e64fd6",
"basename": "6e994e34e21be716dbfb7d003cd1dfb945e64fd6",
"class": "File",
"checksum": "sha1$1cb57f2c62878e2cdda6d2c34d693a3ae96ba05b",
"size": 12,
"path": "/cluster/work/grlab/projects/alva_temp/Hypoxia_Toil_CWL/Test_Tum/6e994e34e21be716dbfb7d003cd1dfb945e64fd6"
}
]
}
Final process status is success
```
The final process is success as you can see in traceback to the temporary file cal is writing both messages but to the final final only last string from the input strings. I think it is some kind of overwriting but I am not sure why. And I do not understand the fundamental interactions within the cwltool.
## Your Environment
* CWL version 1.0.20181012180214
Contributor guide
Assessment
This issue has not been assessed yet.