process { publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } withName: "test_fgbio_fastqtobam_paired_cram:FGBIO_FASTQTOBAM" { ext.prefix = {"${meta.id}.cram"} } withName: "test_fgbio_fastqtobam_paired_bam:FGBIO_FASTQTOBAM" { ext.prefix = {"${meta.id}.bam"} } withName: "test_fgbio_fastqtobam_paired_umi:FGBIO_FASTQTOBAM" { ext.args = "--read-structures +T 12M11S+T" } withName: "test_fgbio_fastqtobam_paired_custom_samplename:FGBIO_FASTQTOBAM" { ext.args = "--sample CustomSample --library CustomLibrary" } }