From cecad35749c9af5ecb99b063c9a9f4f2e35456d9 Mon Sep 17 00:00:00 2001
From: Laurent Modolo <laurent@modolo.fr>
Date: Fri, 22 Jan 2021 13:12:03 +0100
Subject: [PATCH] nf_module: set index to be the 2nd input for mapping

---
 src/nf_modules/bowtie2/main.nf  | 4 ++--
 src/nf_modules/kallisto/main.nf | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/nf_modules/bowtie2/main.nf b/src/nf_modules/bowtie2/main.nf
index d96b1214..e17e7f24 100644
--- a/src/nf_modules/bowtie2/main.nf
+++ b/src/nf_modules/bowtie2/main.nf
@@ -35,8 +35,8 @@ process mapping_fastq_pairedend {
   publishDir "results/mapping/bams/", mode: 'copy'
 
   input:
+  path index
   tuple val(pair_id), path(reads)
-  path index.collect()
 
   output:
   tuple val(pair_id), path("*.bam"), emit: bam
@@ -74,8 +74,8 @@ process mapping_fastq_singleend {
   publishDir "results/mapping/bams/", mode: 'copy'
 
   input:
+  path index
   tuple val(file_id), path(reads)
-  path index.collect()
 
   output:
   set file_id, "*.bam", emit: bam
diff --git a/src/nf_modules/kallisto/main.nf b/src/nf_modules/kallisto/main.nf
index a2dc3d70..5b0a150f 100644
--- a/src/nf_modules/kallisto/main.nf
+++ b/src/nf_modules/kallisto/main.nf
@@ -29,8 +29,8 @@ process mapping_fastq_pairedend {
   publishDir "results/mapping/counts/", mode: 'copy'
 
   input:
+  path index
   tuple val(pair_id), path(reads)
-  path index.collect()
 
   output:
   path "${pair_id}", emit: counts
@@ -53,8 +53,8 @@ process mapping_fastq_singleend {
   publishDir "results/mapping/counts/", mode: 'copy'
 
   input:
+  path index
   tuple val(file_id), path(reads)
-  path index.collect()
 
   output:
   path "${pair_id}", emit: counts
-- 
GitLab