Reading filenames from another file in the runtime and treating them as files

Hi,

this is similar to this one but could not work out with me.

I have two CWL files running in workflow steps. The first CWL downloads a file, the second CWL uses docker and loads a YAML file with that downloaded file name as input. The downloaded file is stored at a temp location in the runtime, so it can’t be found when specifying its name in another file (requires the temp full path).

How can the CWL read the filename from the YAML file in the runtime and treat it as a file?

Thanks!

Welcome @mr-eyes!

The download step should return the downloaded file as an output parameter. The second step should take the file as an input parameter. In order to have the correct file path into the YAML, you either want to create the YAML file on the fly, or place the file at some well know location inside the container. In either case you probably want to use the InitialWorkDir feature.

Here’s some documentation links:

http://www.commonwl.org/user_guide/14-runtime/index.html

http://www.commonwl.org/user_guide/15-staging/index.html

Thanks,
Peter