Hi,
Have a CWL defined that needs to return a set of files (all filename extensions) so I have defined my outputs as:
outputs:
mapped_out:
type: File
outputBinding:
glob: $(inputs.sample).bam
secondaryFiles:
- .bai
- .bas
- .md5
- .met
- .maptime
I've tried a couple of variations of the json:
{
...
"mapped_out": {
"path": "/tmp/mapped.bam",
"class": "File"
},
...
}
Yeilded one file provisioned to /tmp/mapped.bam
This version (based on alea-createGenome.cwl & alea-alignReads-job.json) didn't stage anything:
{
...
"mapped_out": "/tmp/mapped",
...
}
Everything seems to have compelted in the cwltool side:
Final process status is success
{
"mapped_out": {
"checksum": "sha1$53bb0c4abb07013393891cb50a3feec4c6381304",
"basename": "insilico_21.bam",
"location": "file:///home/ubuntu/./datastore/launcher-ccd381b4-c475-4770-b88b-bebd2b06439c/outputs/insilico_21.bam",
"path": "/home/ubuntu/./datastore/launcher-ccd381b4-c475-4770-b88b-bebd2b06439c/outputs/insilico_21.bam",
"secondaryFiles": [
{
"checksum": "sha1$ef6f2cf70e11d7d0be17b79dfb02eb1277e43b41",
"basename": "insilico_21.bam.bai",
"location": "file:///home/ubuntu/./datastore/launcher-ccd381b4-c475-4770-b88b-bebd2b06439c/outputs/insilico_21.bam.bai",
"path": "/home/ubuntu/./datastore/launcher-ccd381b4-c475-4770-b88b-bebd2b06439c/outputs/insilico_21.bam.bai",
"class": "File",
"size": 1370120
},
{
"checksum": "sha1$4bf5068040c0e2a350aa21fa299f6567230bfbeb",
"basename": "insilico_21.bam.bas",
"location": "file:///home/ubuntu/./datastore/launcher-ccd381b4-c475-4770-b88b-bebd2b06439c/outputs/insilico_21.bam.bas",
"path": "/home/ubuntu/./datastore/launcher-ccd381b4-c475-4770-b88b-bebd2b06439c/outputs/insilico_21.bam.bas",
"class": "File",
"size": 1973
},
{
"checksum": "sha1$4a60424144f5283c4e9cf74deb214597cac8bae8",
"basename": "insilico_21.bam.md5",
"location": "file:///home/ubuntu/./datastore/launcher-ccd381b4-c475-4770-b88b-bebd2b06439c/outputs/insilico_21.bam.md5",
"path": "/home/ubuntu/./datastore/launcher-ccd381b4-c475-4770-b88b-bebd2b06439c/outputs/insilico_21.bam.md5",
"class": "File",
"size": 32
},
{
"checksum": "sha1$63139bed16686c6be0dd5469342af1dac8795260",
"basename": "insilico_21.bam.met",
"location": "file:///home/ubuntu/./datastore/launcher-ccd381b4-c475-4770-b88b-bebd2b06439c/outputs/insilico_21.bam.met",
"path": "/home/ubuntu/./datastore/launcher-ccd381b4-c475-4770-b88b-bebd2b06439c/outputs/insilico_21.bam.met",
"class": "File",
"size": 1521
},
{
"checksum": "sha1$39f641f432b510034fb96b3e73569f5fc1824521",
"basename": "insilico_21.bam.maptime",
"location": "file:///home/ubuntu/./datastore/launcher-ccd381b4-c475-4770-b88b-bebd2b06439c/outputs/insilico_21.bam.maptime",
"path": "/home/ubuntu/./datastore/launcher-ccd381b4-c475-4770-b88b-bebd2b06439c/outputs/insilico_21.bam.maptime",
"class": "File",
"size": 279
}
],
"class": "File",
"size": 42245405
}
}
Any help gratefully recieved.
Thanks, Keiran
Is $(inputs.sample) a string?
Why are you writing the JSON manually? Is the tool itself CWL aware and producing a
cwl.output.json
file?I'm attempting to complete the input json file. Dockstore gives the following template:
Can I do the same with cwltool? I can't see any options indicating this.
Sure, but you asked a question about the outputs section :-)
Is the "sure" here in reference to the question as to whether cwltool can generate an input json?
Yes, inputs.sample is a string:
https://github.com/cancerit/dockstore-cgpmap/blob/master/Dockstore.cwl
[deleted, accidentally posted as comment]