user_guide
user_guide copied to clipboard
Best practice for the scope of CommandLineTools
I was asking on gitter for a guideline on when to provide functionality in a single tool wrapper and when to write multiple CommandLineTools.
I have since found that the user guide recommends:
Each CommandLineTool description should focus on a single operation only, even if the (sub)command is capable of more. Don’t overcomplicate your tool descriptions with options that you don’t need/use.
While this provides a first answer to my question, the approach seems to encourage CWL-documents that are very narrow in scope and thus limited in terms of flexibility and reuseability.
I would like to inquire how other users create their CommandLineTools and what practices you would recommend. Do you include all possible parameters or just the ones you need at the time of writing? At which point do you write multiple wrappers for a single piece of software (samtools comes to mind)? If using workflow steps like a short AWK script, would you write a specialized tool wrapper with the script baked in as an argument or use a generalized AWK-wrapper and specify the script in the workflow?
I have found myself pondering these questions quite a few times, especially when i was really new to CWL/workflows, and some guidelines would have been helpful. Maybe we can outline some key principles for determining CommandLineTool-scope.