process {

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

    withName: CNVKIT_HYBRID {
        ext.args = '--output-reference reference.cnn'
    }

    withName: CNVKIT_WGS {
        ext.args = '--output-reference reference.cnn --method wgs'
    }

    withName: CNVKIT_TUMORONLY {
        ext.args = '--method wgs'
    }

}
