process { publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } withName: COOLER_CLOAD { ext.args = 'pairix' } withName: COOLER_CLOAD_PAIRS { ext.args = 'pairs --chrom1 1 --pos1 2 --chrom2 4 --pos2 5 -N' } withName: COOLER_CLOAD_TABIX { ext.args = 'tabix' } }