mirror of
https://github.com/MillironX/nf-core_modules.git
synced 2024-12-22 11:08:17 +00:00
luslab-umitools | Added parameter overriding function to umi_tools
This commit is contained in:
parent
549f81e4ea
commit
e00b7bd91e
1 changed files with 19 additions and 0 deletions
19
tools/umi_tools/groovy/NfUtils.groovy
Normal file
19
tools/umi_tools/groovy/NfUtils.groovy
Normal file
|
@ -0,0 +1,19 @@
|
|||
class NfUtils{
|
||||
def check_internal_overrides(String moduleName, Map params)
|
||||
{
|
||||
// get params set of keys
|
||||
Set paramsKeySet = params.keySet()
|
||||
|
||||
// Interate through and set internals to the correct parameter at runtime
|
||||
paramsKeySet.each {
|
||||
if(it.startsWith("internal_")) {
|
||||
|
||||
def searchString = moduleName + '_' + it.replace('internal_', '');
|
||||
|
||||
if(paramsKeySet.contains(searchString)) {
|
||||
params.replace(it, params.get(searchString))
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue