From 7b94a50751be9c59a7c83007dfc8a3ba77ca7647 Mon Sep 17 00:00:00 2001
From: Laurent Modolo <laurent.modolo@ens-lyon.fr>
Date: Thu, 29 Apr 2021 12:26:36 +0200
Subject: [PATCH] bwa: update index name

---
 src/nf_modules/bwa/main.nf | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/nf_modules/bwa/main.nf b/src/nf_modules/bwa/main.nf
index dec6886c..39ee8157 100644
--- a/src/nf_modules/bwa/main.nf
+++ b/src/nf_modules/bwa/main.nf
@@ -66,7 +66,7 @@ bwa_mem_R = "@RG\\tID:${library}\\tSM:${library}\\tLB:lib_${library}\\tPL:illumi
 bwa mem -t ${task.cpus} \
 ${params.mapping_fastq} \
 -R '${bwa_mem_R}' \
-${index} ${reads[0]} ${reads[1]} 2> \
+${index.baseName} ${reads[0]} ${reads[1]} 2> \
   ${file_prefix}_bwa_report.txt | \
   samtools view -@ ${task.cpus} -Sb - > ${file_prefix}.bam
 """
@@ -75,7 +75,7 @@ ${index} ${reads[0]} ${reads[1]} 2> \
 bwa mem -t ${task.cpus} \
 ${params.mapping_fastq} \
 -R '${bwa_mem_R}' \
-${index} ${reads} 2> \
+${index.baseName} ${reads} 2> \
   ${file_prefix}_bwa_report.txt | \
   samtools view -@ ${task.cpus} -Sb - > ${file_prefix}.bam
 """
-- 
GitLab