Hmm, I think this may be a dockstore issue as it 'massages' the initial json before handing to cwltool:
Original as recommended:
$ json_pp < Dockstore3.json
{
"reference" : {
"class" : "File",
"path" : "/tmp/core_ref_GRCh37d5.tar.gz"
},
"bwa_idx" : {
"path" : "/tmp/bwa_idx_GRCh37d5.tar.gz",
"class" : "File"
},
"bams_in" : [
{
"class" : "File",
"path" : "/tmp/insilico_21.bam"
}
],
"mapped_out" : {
"path" : "/tmp/mapped.bam",
"class" : "File",
"secondaryFiles" : [
{
"path" : "/tmp/mapped.bam.bai",
"class" : "File"
},
{
"path" : "/tmp/mapped.bam.bas",
"class" : "File"
},
{
"path" : "/tmp/mapped.bam.md5",
"class" : "File"
},
{
"class" : "File",
"path" : "/tmp/mapped.bam.met"
},
{
"path" : "/tmp/mapped.bam.maptime",
"class" : "File"
}
]
},
"sample" : "insilico_21",
"cram" : false
}
What is passed out of dockstore to cwltool:
$ json_pp < /home/ubuntu/./datastore/launcher-accbffba-6eb5-468a-858f-3c578495b467/workflow_params.json
{
"cram" : false,
"bwa_idx" : {
"path" : "/home/ubuntu/./datastore/launcher-accbffba-6eb5-468a-858f-3c578495b467/inputs/adf6a2b5-3006-42ce-a1bb-3d084c8229f3/bwa_idx_GRCh37d5.tar.gz",
"class" : "File"
},
"mapped_out" : {
"path" : "/home/ubuntu/./datastore/launcher-accbffba-6eb5-468a-858f-3c578495b467/outputs/mapped_out",
"class" : "File"
},
"bams_in" : [
{
"path" : "/home/ubuntu/./datastore/launcher-accbffba-6eb5-468a-858f-3c578495b467/inputs/7a8bb7c9-98c9-4dc3-82bd-131e0d798bff/insilico_21.bam",
"class" : "File"
}
],
"reference" : {
"class" : "File",
"path" : "/home/ubuntu/./datastore/launcher-accbffba-6eb5-468a-858f-3c578495b467/inputs/6baa8f3d-c46b-4642-8836-5ff8fb5a16b7/core_ref_GRCh37d5.tar.gz"
},
"sample" : "insilico_21"
}
Is $(inputs.sample) a string?
Why are you writing the JSON manually? Is the tool itself CWL aware and producing a
cwl.output.jsonfile?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]