process { publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } withName: 'FASTK_.*' { ext.args = '-t' publishDir = [ enabled: false ] } withName: 'test_merquryfk_ploidyplot_pdf:MERQURYFK_PLOIDYPLOT' { ext.args = '-pdf' } }