From 9cc39469f9c4d621d8d159b59b1a585179cf5025 Mon Sep 17 00:00:00 2001
From: Laurent Modolo <laurent@modolo.fr>
Date: Mon, 25 Jan 2021 17:35:21 +0100
Subject: [PATCH] bedtools: add bam_id val

---
 src/nf_modules/bedtools/main.nf | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/nf_modules/bedtools/main.nf b/src/nf_modules/bedtools/main.nf
index f55991eb..4d3e4e1f 100644
--- a/src/nf_modules/bedtools/main.nf
+++ b/src/nf_modules/bedtools/main.nf
@@ -24,14 +24,14 @@ bedtools getfasta -name \
 process bam_to_fastq_singleend {
   container = "${container_url}"
   label "big_mem_mono_cpus"
-  tag "${bam.baseName}"
+  tag "${bam_id}"
   publishDir "results/mapping/fastq/", mode: 'copy'
 
   input:
-  path bam
+  tuple val(bam_id), path(bam)
 
   output:
-  tuple val(bam.baseName), path("*.fastq"), emit: fastq
+  tuple val(bam_id), path("*.fastq"), emit: fastq
 
   script:
 """
@@ -43,11 +43,11 @@ bedtools bamtofastq \
 process bam_to_fastq_pairedend {
   container = "${container_url}"
   label "big_mem_mono_cpus"
-  tag "${bam.baseName}"
+  tag "${bam_id}"
   publishDir "results/mapping/fastq/", mode: 'copy'
 
   input:
-  path bam
+  tuple val(bam_id), path(bam)
 
   output:
   tuple val(bam.baseName), path("*.fastq"), emit: fastq
-- 
GitLab