process {

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

    withName: HOMER_MAKETAGDIRECTORY {
        ext.args = '-format bed'
    }

    withName: HOMER_FINDPEAKS {
        ext.args = '-style factor'
    }

}
