I am trying to name my output file based on input file name
cat test.cwl
cwlVersion: v1.0
class: CommandLineTool
baseCommand: [sh, fastqc_check.sh]
requirements:
- class: InlineJavascriptRequirement
inputs:
fq1_zips:
type: File
inputBinding:
position: 1
outputs:
fastqc_check_out:
type: File
outputBinding:
glob: $(inputs.fq1_zips.path + '.results')
cat test.yml
fq1_zips:
class: File
path: R1_001_fastqc.zip
fastqc_check_script:
class: File
path: fastqc_check.sh
Error I am getting
cwl-runner test.cwl test.yml
/Softwares/conda/bin/cwl-runner 1.0.20180521150620
Resolved 'test.cwl' to '/standalone/test.cwl'
[job test.cwl] /tmp/tmpC3PfP4$ sh \
/standalone/fastqc_check.sh \
/tmp/tmpI_W5Z1/stg41acb21e-f0fe-4f8d-ae4c-cbde594f49c6/R1_001_fastqc.zip
R1_001_fastqc.zip
[job test.cwl] Job error:
Error collecting output for parameter 'fastqc_check_out':
test.cwl:20:4: glob patterns must not start with '/'
[job test.cwl] completed permanentFail
{}
Final process status is permanentFail
This shell script outputs a file named R1_001_fastqc.zip.results
, this is what I want to capture in the cwl
sh fastqc_check.sh R1_001_fastqc.zip
If this line is given in the glob
, glob: $(inputs.fq1_zips + '.results')
Error
cwl-runner test.cwl test.yml
/Softwares/conda/bin/cwl-runner 1.0.20180521150620
Resolved 'test.cwl' to '/standalone/test.cwl'
[job test.cwl] /tmp/tmpcBEW38$ sh \
/standalone/fastqc_check.sh \
/tmp/tmpvdRGjb/stgdee3f23e-0476-413a-ad96-eb1914f71b82/R1_001_fastqc.zip
R1_001_fastqc.zip
[job test.cwl] Job error:
Error collecting output for parameter 'fastqc_check_out':
test.cwl:20:4: Did not find output file with glob pattern: '[u'[object Object].results']'
[job test.cwl] completed permanentFail
{}
Final process status is permanentFail
Yes, it worked. Also as you said
InlineJavascriptRequirement
is not required in this case. Thanks a lot !!Worked code: cat test.cwl