common-workflow-language / cwltool

Common Workflow Language reference implementation
https://cwltool.readthedocs.io/
Apache License 2.0
335 stars 230 forks source link

Invalid filename when transferring Directory between steps #600

Open mr-c opened 6 years ago

mr-c commented 6 years ago

@michael-kotliar commented on 24 Jan 2017

Hi all! Noticed one interesting thing that may cause a problem when running java application in a workflow step.

Brief explanation: Workflow structure: File -> Step1 -> Directory -> Step2 -> File On the input of Step2 I got an error: WorkflowException("Invalid filename: '%s' contains illegal characters" % (f["basename"])) WorkflowException: Invalid filename: '' contains illegal characters, because after Step1 some of the subfolders of Directory have "basename": ""

Detailed explanation: Link on the workflow with all Dockerfiles and input data: https://github.com/michael-kotliar/cwl_sandbox/tree/master/fastqc_parser If run workflow - get an error: cwl-runner --debug workflow.cwl workflow-job.json If run each tools separately - all works fine: cwl-runner --debug fastqc.cwl fastqc-job.json cwl-runner --debug parse-fastqc-results.cwl parse-fastqc-results-job.json

Part of workflow log, where some of the basenames are empty :

[job fastqc] completed success
[job fastqc] {
    "report_dir": {
        "basename": "tmp4m7vzp", 
        "listing": [
            {
                "checksum": "sha1$7cccb0555aace9287c0b16ab17f0b9e663cb7cd5", 
                "basename": "test_fastqc.html", 
                "size": 341364, 
                "class": "File", 
                "location": "file:///tmp/tmp4m7vzp/test_fastqc.html"
            }, 
            {
                "basename": "", 
                "listing": [
                    {
                        "basename": "", 
                        "listing": [
                            {
                                "basename": "", 
                                "listing": [
                                    {
                                        "basename": "", 
                                        "listing": [
                                            {
                                                "checksum": "sha1$a9decdaf8033361823c3fca2714372fbfca5e277", 
                                                "basename": "", 
                                                "size": 7965, 
                                                "class": "File", 
                                                "location": "file:///tmp/tmp4m7vzp/?/.java/fonts/1.7.0_91/fcinfo-1-87028e295b98-Ubuntu-15.10-en.properties"
                                            }
                                        ], 
                                        "class": "Directory", 
                                        "location": "file:///tmp/tmp4m7vzp/?/.java/fonts/1.7.0_91"
                                    }
                                ], 
                                "class": "Directory", 
                                "location": "file:///tmp/tmp4m7vzp/?/.java/fonts"
                            }
                        ], 
                        "class": "Directory", 
                        "location": "file:///tmp/tmp4m7vzp/?/.java"
                    }
                ], 
                "class": "Directory", 
                "location": "file:///tmp/tmp4m7vzp/?"
            }, 
.....
mr-c commented 6 years ago

@michael-kotliar Can you provide the scidap/fastqc:v0.11.2 image? I can't get the first step to run