process { publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } withName: PLINK_VCF { ext.args = '--make-bed --set-missing-var-ids @:#:\\$1:\\$2' } withName: PLINK_EXTRACT { ext.prefix = { "${meta.id}.extract" } } }