Hi! I have python script and a cwl wrapper for the script in the same directory. When I try to run the cwl I get an error because the python script can´t be found. It only works when I specifiy the absolut path to the script in baseCommand. Maybe anyone can give me a hint what I have to add, so the script is found by the cwl-runner? Thanks a lot!
Hello sibyllewohlgemuth, thank you for your question.
If your tool isn't wrapped in a container, and it isn't installed on a standard system path, they you'll need to inform your CWL executor where to find it.
Don't forget to
chmod a+x my_script.py and ensure that it starts with
#!/usr/bin/env python or similar :-)
For example, with the reference implementation, set your
PATH and pass in
--preserve-environment PATH to
PATH=$PATH:/absolute/path/to/the/directory/of/my/script cwltool --preserve-environment PATH my-tool.cwl my-inputs.yaml
If you are using a Docker container with your tool, then this is easy: configure the container to install your script to a standard path like
I hope this was helpful. Cheers,