From b6cf17ee055bb0aa9adc366eda7569511000f516 Mon Sep 17 00:00:00 2001 From: Thiseas Christos Lamnidis Date: Wed, 7 Feb 2024 16:45:13 +0100 Subject: [PATCH] Added RG tag info to BWA mem command --- conf/modules.config | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/conf/modules.config b/conf/modules.config index ea1d8d927..98e8e9238 100644 --- a/conf/modules.config +++ b/conf/modules.config @@ -431,7 +431,11 @@ process { withName: BWA_MEM { tag = { "${meta.reference}|${meta.sample_id}_${meta.library_id}_L${meta.lane}" } - ext.args = { "-k ${params.mapping_bwamem_k} -r ${params.mapping_bwamem_r}" } + ext.args = {[ + "-k ${params.mapping_bwamem_k}", + "-r ${params.mapping_bwamem_r}", + "-R '@RG\\tID:ILLUMINA-${meta.library_id}\\tSM:${meta.sample_id}\\tPL:illumina\\tPU:ILLUMINA-${meta.library_id}-${meta.strandedness}'" + ].join(' ').trim() } ext.prefix = { "${meta.sample_id}_${meta.library_id}_L${meta.lane}_${meta.reference}" } publishDir = [ enabled: false