common-workflow-language / common-workflow-language/cwltool
"entry" content interpretation
- Dominant language
- Python
- Stars
- 376
- Forks
- 255
- Avg merge
- 2d 7h
- Merged PRs (30d)
- 12
Description
## Expected Behavior
I tried to run CWL-file with bash-script inclusion, which makes new files.
## Actual Behavior
It failed with error:
```
Workflow error, try again with --debug for more information:
Expression evaluation error:
Syntax error in parameter reference '{6}'. This could be due to using Javascript code without specifying InlineJavascriptRequirement.
```
## Part of Workflow Code
```
baseCommand: ["/bin/bash", "markduplicates_helper.sh"]
requirements:
- class: ResourceRequirement
coresMin: 8
ramMin: 40000
- class: DockerRequirement
dockerPull: "mgibio/mark_duplicates-cwl:1.0.1"
- class: InitialWorkDirRequirement
listing:
- entryname: 'markduplicates_helper.sh'
entry: |
set -o pipefail
set -o errexit
declare MD_BARCODE_TAG
if [ ! -z "${6}" ]; then
MD_BARCODE_TAG="BARCODE_TAG=${6}"
/usr/bin/java -Xmx16g -jar /opt/picard/picard.jar MarkDuplicates I=$1 O=/dev/stdout ASSUME_SORT_ORDER=$5 METRICS_FILE=$4 QUIET=true COMPRESSION_LEVEL=0 VALIDATION_STRINGENCY=LENIENT "${MD_BARCODE_TAG}" > /usr/bin/sambamba sort -t $2 -m 18G -o $3 /dev/stdin
else
/usr/bin/java -Xmx16g -jar /opt/picard/picard.jar MarkDuplicates I=$1 O=/dev/stdout ASSUME_SORT_ORDER=$5 METRICS_FILE=$4 QUIET=true COMPRESSION_LEVEL=0 VALIDATION_STRINGENCY=LENIENT > /usr/bin/sambamba sort -t $2 -m 18G -o $3 /dev/stdin
fi
```
## Traceback
I've already added [issue](https://github.com/genome/analysis-workflows/issues/684#issue-449860500) in [The McDonnell Genome Institute repository](https://github.com/genome). That's why authors stopped using ${VAR} syntax and tool started to work.
But I just wanted to make sure that this code interpretation by cwltool is anticipated?
Why is "entry" content interpreted by cwltool instead of separate interpretation?
## Your Environment
* cwltool version:
1.0.20190228155703
Contributor guide
Assessment
This issue has not been assessed yet.