Mercurial > repos > kkonganti > cfsan_bettercallsal
diff 0.6.1/workflows/conf/process/bettercallsal_db.process.config @ 11:749faef1caa9
"planemo upload"
author | kkonganti |
---|---|
date | Tue, 05 Sep 2023 11:51:40 -0400 |
parents | |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/0.6.1/workflows/conf/process/bettercallsal_db.process.config Tue Sep 05 11:51:40 2023 -0400 @@ -0,0 +1,58 @@ +process { + withName: 'DB_PER_COMPUTED_SEROTYPE' { + ext.args = addParamsToSummary( + loadThisFunction("${params.toolshelp}${params.fs}wcomp.nf").wcompHelp(params).helpparams + ) + } + + withName: 'DB_PER_SNP_CLUSTER' { + ext.args = addParamsToSummary( + loadThisFunction("${params.toolshelp}${params.fs}wsnp.nf").wsnpHelp(params).helpparams + ) + } + + if (params.mashsketch_run) { + withName: 'MASH_SKETCH' { + ext.args = addParamsToSummary( + loadThisFunction("${params.toolshelp}${params.fs}mashsketch.nf").mashsketchHelp(params).helpparams + ) + } + } + + withName: 'SCAFFOLD_GENOMES' { + maxRetries = 5 + publishDir = [ + path: "${params.output}${params.fs}scaffold_genomes", + mode: "move", + overwrite: true, + saveAs: { filename -> filename ==~ /versions\.yml|genome_paths\.txt/ ? null : filename } + ] + } +} + + +// Parse the default params +def loadThisFunction (func_file) { + GroovyShell grvy_sh = new GroovyShell() + def func = grvy_sh.parse(new File ( func_file ) ) + return func +} + +// Method to add relevant final parameters to summary log +def addParamsToSummary(Map params_to_add = [:]) { + + if (!params_to_add.isEmpty()) { + def not_null_params_to_add = params_to_add.findAll { + it.value.clivalue != null && + it.value.clivalue != '[:]' && + it.value.clivalue != '' + } + + params.logtheseparams += not_null_params_to_add.keySet().toList() + + return not_null_params_to_add.collect { + "${it.value.cliflag} ${it.value.clivalue.toString().replaceAll(/(?:^\s+|\s+$)/, '')}" + }.join(' ').trim() + } + return 1 +}