process {

    publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" }

    withName: GENRICH {
        ext.args = '-p 0.1'
    }

    withName: GENRICH_CTRL {
        ext.args = '-p 0.9'
    }

    withName: GENRICH_ALL {
        ext.args = '-r -p 0.1'
    }

    withName: GENRICH_ATACSEQ {
        ext.args = '-j -p 0.1'
    }

}
