process { publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } withName: TBPROFILER_PROFILE_ILLUMINA { ext.args = '--platform illumina' } withName: TBPROFILER_PROFILE_NANOPORE { ext.args = '--platform nanopore' } }