process { publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } withName: 'FASTK.*' { ext.args = '-t' publishDir = [ enabled: false ] } withName: 'FASTK1' { ext.prefix = { "${meta.id}_sampleA" } } withName: 'FASTK2' { ext.prefix = { "${meta.id}_sampleB" } } withName: 'test_merquryfk_katcomp_pdf:MERQURYFK_KATCOMP' { ext.args = '-pdf' } }