You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Specifying "--outdir" to cwl-runner when running a Workflow doesn't appear to work #154
When I run one of my CommandLineTools (which runs in a Docker container) using the "--outdir" flag, I can see that the output directory gets set correctly:
What I need is for all of my workflow steps to have access to the same output directory. Is there some other way to force the output directory to be the same for all workflow steps?
Can you explain what it is you are doing that you need a shared output directory? In general, you can't do that with CWL, because workflow steps may run in separate containers on separate nodes, and there is no requirement for a shared file system, so you have to be explicit about which files each step consumes and produces.
Perform a single-end (or paired-end) alignment on a bam file, given the genome and transcriptome index directories from steps 1 and 2:
snapr single path/to/index-dir path/to/transcriptome-dir annotation.gtf reads.bam -o out.bam
snapr paired ... <the rest of the command is identical to the one above>
Steps 1 and 2 each create 4 files in their respective index directories, which isn't too difficult to map to individual outputs. The problem now is that step 3 expects all of the files from step one to be in a single (distinct) directory, and the same goes for the files from step 2. Putting them all in the same directory wouldn't work (which is what I think would happen if I just fed all of the resulting files from steps 1 and 2 as input to the third step), because steps 1 and 2 create the same number of files with the same file names, so attempting to merge them all into a single directory would likely cause something to be overwritten.
Intuitively I was thinking that steps sharing the same output directory would solve the issue, but I think I'm starting to see why that's not possible. I'm trying to make sense of "linkMerge" in the draft 2 spec, but the wording is a little bit vague. Is this a feature that I could use to somehow merge collections of output files for use as input for subsequent steps?
I think I figured out how to make this scenario work using the CreateFileRequirement in the final step, in which the content from the outputs of the previous steps are used for the fileContent property. I just use / to generate the file on the correct path in the designated output directory and it appears to work. This issue can probably be closed now.
Activity
tetron commentedon Oct 29, 2015
Can you explain what it is you are doing that you need a shared output directory? In general, you can't do that with CWL, because workflow steps may run in separate containers on separate nodes, and there is no requirement for a shared file system, so you have to be explicit about which files each step consumes and produces.
A couple of features that may help you:
"secondaryFiles": http://common-workflow-language.github.io/draft-2/#binding
"CreateFileRequirement": http://common-workflow-language.github.io/draft-2/#createfilerequirement
vardaofthevalier commentedon Oct 30, 2015
The workflow that I'm working on has 3 primary steps (refer to SNAPR documentation for more specifics):
Steps 1 and 2 each create 4 files in their respective index directories, which isn't too difficult to map to individual outputs. The problem now is that step 3 expects all of the files from step one to be in a single (distinct) directory, and the same goes for the files from step 2. Putting them all in the same directory wouldn't work (which is what I think would happen if I just fed all of the resulting files from steps 1 and 2 as input to the third step), because steps 1 and 2 create the same number of files with the same file names, so attempting to merge them all into a single directory would likely cause something to be overwritten.
Intuitively I was thinking that steps sharing the same output directory would solve the issue, but I think I'm starting to see why that's not possible. I'm trying to make sense of "linkMerge" in the draft 2 spec, but the wording is a little bit vague. Is this a feature that I could use to somehow merge collections of output files for use as input for subsequent steps?
vardaofthevalier commentedon Nov 6, 2015
I think I figured out how to make this scenario work using the CreateFileRequirement in the final step, in which the content from the outputs of the previous steps are used for the fileContent property. I just use / to generate the file on the correct path in the designated output directory and it appears to work. This issue can probably be closed now.
Squashed 'v1.1.0-dev1/salad/' changes from 98a5bea..27c20e8