process { publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } withName: 'MERYL.*' { ext.args = 'k=21' } withName: 'GENOMESCOPE2' { ext.args = '-k 21 -p 1' } }