Relative file hierarchy not preserved with respect to cwltool "--outdir"

I run a task indicating a relative path for the stdout output, such as:

outputs:
  my_output_file:
    type: stdout
  stdout: parentdir/myfile.txt

So while the output is fine in the temporary directory, when using cwltool --outdir /my/outputdir I am left with only myfile.txt with /my/outputdir/myfile.txt instead of the expected /my/outputdir/parentdir/myfile.txt.

So how is it possible to preserve the relative file hierarchy indicated in a tool stdout ? I would have thought that copying the root cache dir to the root outdir was the default. Any help and suggestion would be great.

Hello @neurorepro . With type: File, there is no preservation of relative paths in CWL, just the filename itself.

Thank you @mrc for the feedback. It seems that saving the outputs in an organized fashion is still an area of development in CWL (as per this issue and also some specific requests like here). Could the preservation of relative paths be part of the solution ?

1 Like