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


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?


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: