common-workflow-language / common-workflow-language/cwltool
CWLtools throwing error upon usage of secondary files for capturing log files from star aligner on two different versions
- Dominant language
- Python
- Stars
- 376
- Forks
- 255
- Avg merge
- 2d 7h
- Merged PRs (30d)
- 12
Description
Dear All,
I have tried using java expression to capture all secondary files from STAR aligner in CWLtools version from 2018 October and 2019 February.
**On 2018 October version it is running successfully without any issues**, whereas on **2019 February version it is throwing error.**
Any suggestions help is much appreciated!!
Thank you
## Actual Behavior
and on 2019 February version the same tool is throwing following error,
```
Error collecting output for parameter 'star_bam':
star.cwl:172:2: Traceback (most recent call last):
star.cwl:172:2:
star.cwl:172:2: File "/cluster/home/user/software/anaconda/envs/tupro/lib/python2.7/site-packages/cwltool/command_line_tool.py", line 624, in collect_output_ports
star.cwl:172:2: compute_checksum=compute_checksum)
star.cwl:172:2:
star.cwl:172:2: File "/cluster/home/user/software/anaconda/envs/tupro/lib/python2.7/site-packages/cwltool/command_line_tool.py", line 786, in collect_output
star.cwl:172:2: primary["secondaryFiles"].append(sfitem)
star.cwl:172:2:
star.cwl:172:2: File "/cluster/home/user/software/anaconda/envs/tupro/lib/python2.7/site-packages/schema_salad/sourceline.py", line 247, in __exit__
star.cwl:172:2: raise self.makeError("\n".join(traceback.format_exception(exc_type, exc_value, tb)))
star.cwl:172:2:
WorkflowException: star.cwl:182:3: Traceback (most recent call last):
star.cwl:182:3:
star.cwl:182:3: File "/cluster/home/user/software/anaconda/envs/tupro/lib/python2.7/site-packages/cwltool/command_line_tool.py", line 765, in collect_output
star.cwl:182:3: if "$(" in sf["pattern"] or "${" in sf["pattern"]:
star.cwl:182:3:
star.cwl:182:3: TypeError: string indices must be integers
[job star] completed permanentFail
[job star] {}
[step star] Output is missing expected field file:///cluster/work/lab/projects/temp/fastq_temp/pipeline_part1.cwl#star/star_bam
[step star] produced output {}
[step star] completed permanentFail
[workflow ] completed permanentFail
[workflow ] {
"alignment_out": null
}
[job star] Removing input staging directory /tmp/tmpS6xqCk
[job star] Removing temporary directory /tmp/tmpmAznco
{
"alignment_out": null
}
Final process status is permanentFail
```
## Workflow Code
```
secondaryFiles: |
${
var p=inputs.outFileNamePrefix?inputs.outFileNamePrefix:"";
return [
{"path": p+"Log.final.out", "class":"File"},
{"path": p+"SJ.out.tab", "class":"File"},
{"path": p+"Log.out", "class":"File"}
];
}
```
## Your Environment
* cwltool version:
Check using ``cwltool --version``
2019 cwltool 1.0.20190228155703
2018 cwltool 1.0.20181012180214
Contributor guide
Assessment
This issue has not been assessed yet.