process { publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } withName: SAMTOOLS_VIEW { ext.prefix = { "${meta.id}.sam" } } withName: METAPHLAN3 { ext.args = '--index mpa_v30_CHOCOPhlAn_201901 --add_viruses --bt2_ps very-sensitive-local' } }