Create config utils module for managing common functions in config
- Dominant language
- Nextflow
- Stars
- 2
- Forks
- 4
- PR merge metrics
- No merged PRs in 30d
Description
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.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.