Print out commands in workflow without running them

Dear all,

Sometimes, when debugging, it would be nice to have a way to just print out all commands in a given workflow without running them. Is this possible? Ideally, it would also indicate the dependencies between the commands it outputs (like snakemake dry-run option). Initially there was a --dry-run option, but it was removed…

I searched a bit, but only found other users with the same issue, e.g. https://www.biostars.org/p/268851/

thanks,

Welcome @fgvieira and thank you for your question.

As the linked biostars post shows, it would be possible to show the commands to run a single CommandLineTool, though nobody has implemented that yet.

As for an entire workflow, that would be more complicated as command line options can vary based upon the results of earlier steps. And in CWL v1.2 entire steps could be skipped due to the results of earlier steps.

It would be possible to create a CWL-to-shell-script converter that would provide a high-fidelity preview. While this would be really cool, such a complete converter would not be a small project.

If you would accept something that isn’t a completely perfect preview, then an intermediate representation of a CWL would be possible, but this intermediate workflow representation wouldn’t necessarily be runnable on the command line.

Once a CommandLineTool --dry-run (or equivalent preview) feature is implemented in cwltool, then that could be combined with the --target option to preview any CommandLineTool within a CWL workflow.

Hi @mrc,

Thanks for your quick reply.

I understand that this is quite a considerable task but, even though it wouldn’t be a completely perfect preview, an intermediate representation of a CWL would still be very nice!

I understand it wouldn’t be directly run from the command line, but it would still be very useful for debugging.
thanks,

1 Like