From 78bebd7269f2ffd021a96af98656c61f10440139 Mon Sep 17 00:00:00 2001
From: Laurent Modolo <laurent.modolo@ens-lyon.fr>
Date: Tue, 31 Jul 2018 10:58:25 +0200
Subject: [PATCH] Bowtie: update Bowtie.nf to match test

---
 src/nf_modules/Bowtie/bowtie.nf | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/nf_modules/Bowtie/bowtie.nf b/src/nf_modules/Bowtie/bowtie.nf
index 54d10da..d51ec4d 100644
--- a/src/nf_modules/Bowtie/bowtie.nf
+++ b/src/nf_modules/Bowtie/bowtie.nf
@@ -74,7 +74,7 @@ process mapping_fastq {
   script:
   index_id = index[0]
   for (index_file in index) {
-    if (index_file =~ /.*\.1\.ebwt/) {
+  if (index_file =~ /.*\.1\.ebwt/ && !(index_file =~ /.*\.rev\.1\.ebwt/)) {
         index_id = ( index_file =~ /(.*)\.1\.ebwt/)[0][1]
     }
   }
@@ -126,13 +126,13 @@ process mapping_fastq {
   script:
 index_id = index[0]
 for (index_file in index) {
-  if (index_file =~ /.*\.1\.ebwt/) {
+  if (index_file =~ /.*\.1\.ebwt/ && !(index_file =~ /.*\.rev\.1\.ebwt/)) {
       index_id = ( index_file =~ /(.*)\.1\.ebwt/)[0][1]
   }
 }
 """
 bowtie --best -v 3 -k 1 --sam -p ${task.cpus} ${index_id} \
--U ${reads} 2> \
+-q ${reads} 2> \
 ${reads.baseName}_bowtie_report.txt | \
 samtools view -Sb - > ${reads.baseName}.bam
 
-- 
GitLab