process { publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } withName:CONTROLFREEC{ ext.args = { [ "sample":[ inputformat: 'pileup', mateorientation: 'FR' ], "general" :[ bedgraphoutput: "TRUE", noisydata: "TRUE", minexpectedgc: "0", readcountthreshold: "1", sex: meta.sex, window: "10", ], "control":[ inputformat: "pileup", mateorientation: "FR" ] ] } } }