assemblerflow/flowcraft

merge specific params

tiagofilipe12 opened this issue · 0 comments

At the moment --merge_params argument allow us to merge all the parameters that are repeated through the pipeline, while not providing this option will make a unique parameter for each component. However there will be some cases where the user will want to set a given parameter global to the entire pipeline (e.g. genomeSize). For that it would be cool if when this parameter is passed we could provide a list of all the parameters that we want to merge.

flowcraft.py build -t "trimmomatic (spades | skesa)" -o outputfile.nf --merge_params "genomeSize, minCoverage"

If we want to merge all the parameters it could be just like it is at the moment but if a string is provided after the parameter then it should take only those parameters to merge them.
So, the default behavior would remain the same, i.e., if no --merge_params is given there won't be any merging, if --merge_params is provided without anything else it would merge all the parameters in a given pipeline. But if a string with a list of parameters separated by commas is provided then it would only merge those parameters throughout the pipeline and all the other ones would remain with the param_idexclusive of each process.