Hello,
I am running a bash script inside a docker container that expects DEPLOY_ENV
variable to be set to an appropriate value. However, when running cwltool ./runFolderCheck.cwl ./runFolderCheck-job.yml
, I get:
INFO /Users/kanwals/miniconda3/envs/cwl/bin/cwltool 1.0.20190915164430
INFO Resolved './runFolderCheck.cwl' to 'file:///Users/kanwals/Documents/UMCCR/git/bcl2fastq/tools/runFolderCheck.cwl'
ERROR Got workflow error Traceback (most recent call last):
File "/Users/kanwals/miniconda3/envs/cwl/lib/python3.6/site-packages/cwltool/executors.py", line 169, in run_jobs
for job in jobiter: File "/Users/kanwals/miniconda3/envs/cwl/lib/python3.6/site-packages/cwltool/command_line_tool.py", line 506, in job
self.updatePathmap(builder.outdir, builder.pathmapper, l)
File "/Users/kanwals/miniconda3/envs/cwl/lib/python3.6/site-packages/cwltool/command_line_tool.py", line 295, in updatePathmap
for sf in fn.get("secondaryFiles", []): AttributeError: 'str' object has no attribute 'get'
ERROR Workflow error, try again with --debug for more information: 'str' object has no attribute 'get'
And with the --debug
flag:
INFO /Users/kanwals/miniconda3/envs/cwl/bin/cwltool 1.0.20190915164430
INFO Resolved './runFolderCheck.cwl' to 'file:///Users/kanwals/Documents/UMCCR/git/bcl2fastq/tools/runFolderCheck.cwl'
usage: ./runFolderCheck.cwl [-h] --denv DENV [--input_folder INPUT_FOLDER]
[job_order] ./runFolderCheck.cwl: error: the following arguments are required: --denv
The cwl-tool definition runFolderCheck.cwl
, I am using is:
#!/usr/bin/env cwl-runner
cwlVersion: v1.0
class: CommandLineTool
hints:
DockerRequirement:
dockerImageId: umccr/pipeline
requirements:
EnvVarRequirement:
envDef:
DEPLOY_ENV: $(inputs.denv)
InitialWorkDirRequirement:
listing: $(inputs.input_folder)
inputs:
denv: string
input_folder:
type: string?
inputBinding:
position: 1
outputs:
log_out:
type: stdout
stdout: output/output_runFOlderCheck.txt
baseCommand: [bash, '-c', /scripts/runfolder-check.sh]
And the input yaml runFolderCheck-job.yml
is:
denv: dev
input_folder: /Users/kanwals/Documents/UMCCR/data/bcl2fastq
Any help to solve the issue will be appreciated.
Sehrish K
/scripts/runfolder-check.sh: line 31: /scripts/runfolder-check.sh.dev.log: Read-only file system
The script is trying to write a log file in its directory. It should either use
$TMPDIR
, or write the log to a user specified path.Hi Michael,
Thanks a lot for the response. I have edited the bash script to write to the standard output and using
stdout
in the cwl definition to write it to a file. This works as expected.Sehrish K