A solution would be creating a wrapper helper function known as get_output that will take workflow paramter. The workflow parameter expects a path to the workflow_config.yaml file (example: cp_process.yaml ). Since the information what outputs are being generated, we can let the wrapper function know what paths to produce based on those configs.
it will look something like this (using same example above)
Currently, there are repeated code of generating the output. In snakemake files
Here's the code below:
There are a lot of function calls
A solution would be creating a wrapper helper function known as
get_output
that will takeworkflow
paramter. Theworkflow
parameter expects a path to theworkflow_config.yaml
file (example:cp_process.yaml
). Since the information what outputs are being generated, we can let the wrapper function know what paths to produce based on those configs.it will look something like this (using same example above)
This will remove redundancy and improve readability