Some groovy code snippets are duplicated across config files. For example the snippet:
Closure get_partition;
if (partition instanceof Closure){
get_partition = partition
}else{
get_partition = { t -> partition }
}
Closure cacheDir;
if (params.cache_dir){
cacheDir = { f ->
def d = new File("$params.cache_dir/$f")
d.mkdirs()
"$params.cache_dir/$f"
}
}else{
cacheDir = { f -> "" }
}
Is re-used in multiple config files. Originally thought to define all config specs in the main boonstim.nf.config file but the scope induced by includeConfig doesn't seem to carry over function definitions - they are local.
The solution here would be to create a groovy script containing function definitions that can be imported in each of the config files.
Some groovy code snippets are duplicated across config files. For example the snippet:
Is re-used in multiple config files. Originally thought to define all config specs in the main
boonstim.nf.configfile but the scope induced byincludeConfigdoesn't seem to carry over function definitions - they are local.The solution here would be to create a groovy script containing function definitions that can be imported in each of the config files.