From c0e43f4df66d6c8a743dcd52177bc66bf152c095 Mon Sep 17 00:00:00 2001 From: Thiseas Christos Lamnidis Date: Mon, 18 Mar 2024 11:13:32 +0100 Subject: [PATCH 1/3] add LB and seqType to RGs. Update ID field to include sample id --- conf/modules.config | 40 +++++++++++++++++++++++++--------------- 1 file changed, 25 insertions(+), 15 deletions(-) diff --git a/conf/modules.config b/conf/modules.config index 6af54e23a..a9e0307f4 100644 --- a/conf/modules.config +++ b/conf/modules.config @@ -403,7 +403,11 @@ process { withName: 'BWA_SAMSE|BWA_SAMPE' { tag = { "${meta.id_index}|${meta.sample_id}_${meta.library_id}_L${meta.lane}" } - ext.args = { "-r '@RG\\tID:ILLUMINA-${meta.library_id}\\tSM:${meta.sample_id}\\tPL:illumina\\tPU:ILLUMINA-${meta.library_id}-${meta.strandedness}'" } + ext.args = { + se_pe_string = meta.single_end ? "SE" : "PE" + [ + "-r '@RG\\tID:ILLUMINA-${meta.sample_id}_${meta.library_id}\\tSM:${meta.sample_id}\\tLB:${meta.library_id}\\tPL:illumina\\tPU:ILLUMINA-${meta.library_id}-${meta.strandedness}_stranded-${se_pe_string}'" + ].join(' ').trim() } ext.prefix = { "${meta.sample_id}_${meta.library_id}_L${meta.lane}_${meta.reference}" } publishDir = [ enabled: false @@ -431,10 +435,12 @@ 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}", - "-R '@RG\\tID:ILLUMINA-${meta.library_id}\\tSM:${meta.sample_id}\\tPL:illumina\\tPU:ILLUMINA-${meta.library_id}-${meta.strandedness}'" + ext.args = { + se_pe_string = meta.single_end ? "SE" : "PE" + [ + "-k ${params.mapping_bwamem_k}", + "-r ${params.mapping_bwamem_r}", + "-R '@RG\\tID:ILLUMINA-${meta.sample_id}_${meta.library_id}\\tSM:${meta.sample_id}\\tLB:${meta.library_id}\\tPL:illumina\\tPU:ILLUMINA-${meta.library_id}-${meta.strandedness}_stranded-${se_pe_string}'" ].join(' ').trim() } ext.prefix = { "${meta.sample_id}_${meta.library_id}_L${meta.lane}_${meta.reference}" } publishDir = [ @@ -444,16 +450,20 @@ process { withName: BOWTIE2_ALIGN { tag = { "${meta.reference}|${meta.sample_id}_${meta.library_id}_L${meta.lane}" } - ext.args = {[ "-N ${params.mapping_bowtie2_n}", - "-L ${params.mapping_bowtie2_l}", - "--trim5 ${params.mapping_bowtie2_trim5}", - "--trim3 ${params.mapping_bowtie2_trim3}", - "--maxins ${params.mapping_bowtie2_maxins}", - "--rg-id ILLUMINA-${meta.library_id}", - "--rg SM:${meta.sample_id}", - "--rg PL:illumina", - "--rg PU:ILLUMINA-${meta.library_id}-${meta.strandedness}", - "${params.mapping_bowtie2_alignmode}" == 'local' ? "--local --${params.mapping_bowtie2_sensitivity}-local" : ( "${params.mapping_bowtie2_alignmode}" == 'end-to-end' ? "--end-to-end --${params.mapping_bowtie2_sensitivity}" : "" ) + ext.args = { + se_pe_string = meta.single_end ? "SE" : "PE" + [ + "-N ${params.mapping_bowtie2_n}", + "-L ${params.mapping_bowtie2_l}", + "--trim5 ${params.mapping_bowtie2_trim5}", + "--trim3 ${params.mapping_bowtie2_trim3}", + "--maxins ${params.mapping_bowtie2_maxins}", + "--rg-id ILLUMINA-${meta.library_id}", + "--rg SM:${meta.sample_id}", + "--rg LB:${meta.library_id}", + "--rg PL:illumina", + "--rg PU:ILLUMINA-${meta.sample_id}_${meta.library_id}-${meta.strandedness}_stranded-${se_pe_string}", + "${params.mapping_bowtie2_alignmode}" == 'local' ? "--local --${params.mapping_bowtie2_sensitivity}-local" : ( "${params.mapping_bowtie2_alignmode}" == 'end-to-end' ? "--end-to-end --${params.mapping_bowtie2_sensitivity}" : "" ) ].join(' ').trim()} ext.prefix = { "${meta.sample_id}_${meta.library_id}_L${meta.lane}_${meta.reference}" } publishDir = [ From 4628ba296348983cbdaaf57908eff9f77e3a2370 Mon Sep 17 00:00:00 2001 From: Thiseas Christos Lamnidis Date: Mon, 18 Mar 2024 11:17:11 +0100 Subject: [PATCH 2/3] random commit to restart CI --- conf/modules.config | 1 + 1 file changed, 1 insertion(+) diff --git a/conf/modules.config b/conf/modules.config index a9e0307f4..a5f6ba23d 100644 --- a/conf/modules.config +++ b/conf/modules.config @@ -401,6 +401,7 @@ process { ] } + withName: 'BWA_SAMSE|BWA_SAMPE' { tag = { "${meta.id_index}|${meta.sample_id}_${meta.library_id}_L${meta.lane}" } ext.args = { From 33e858b6e990924d5a8f421addc4df9c107875e3 Mon Sep 17 00:00:00 2001 From: Thiseas Christos Lamnidis Date: Mon, 18 Mar 2024 11:17:20 +0100 Subject: [PATCH 3/3] Revert "random commit to restart CI" This reverts commit 4628ba296348983cbdaaf57908eff9f77e3a2370. --- conf/modules.config | 1 - 1 file changed, 1 deletion(-) diff --git a/conf/modules.config b/conf/modules.config index a5f6ba23d..a9e0307f4 100644 --- a/conf/modules.config +++ b/conf/modules.config @@ -401,7 +401,6 @@ process { ] } - withName: 'BWA_SAMSE|BWA_SAMPE' { tag = { "${meta.id_index}|${meta.sample_id}_${meta.library_id}_L${meta.lane}" } ext.args = {