process { publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } withName: '.*EXAMINEHEATTREE.*' { ext.args = "--write-newick-tree --write-nexus-tree --write-phyloxml-tree --write-svg-tree" prefix = { "${meta.id}.heat-tree." } } }