Best practice for divvying up functionality among Command Line Tools

I am developing a workflow that uses samtools at two different points. I use two different modes - index and sort. I thought of two possible approaches, and wanted to know if there was a best practice for the divvying up of functionality.

Is it better to create two different CWLs command line tools (samtools-sort.cwl and samtools-index.cwl) that each pull from the same docker container but have the mode as a base command, or would it be better to have one different CWL command line tool (samtools.cwl), in which the mode is passed as a user argument?

For samtools specifically, there are wrappers in bio-cwl-tools, that may be of use to you:

It is generally easier to wrap each subcommand in its own CommandLineTool and use the same underlying Docker image.

1 Like

Thank you so much for your quick response! That library seems super useful.

1 Like