process {

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

    withName: DEEPVARIANT {
         ext.args = ' --regions=\"chr22:0-40001\" --model_type=WGS '
         ext.prefix = { "${meta.id}_out" }
     }
     withName: DEEPVARIANT_INTERVALS {
         ext.args = '--model_type=WGS '
         ext.prefix = { "${meta.id}_out" }
     }

}
