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