process { publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } withName: "test_picard_fastqtosam_paired_custom_samplename:PICARD_FASTQTOSAM" { ext.args = "--SAMPLE_NAME CustomSample" } }