From 9f7c81b715e901b05257c551cc39eb25ffb38801 Mon Sep 17 00:00:00 2001
From: Laurent Modolo <laurent.modolo@ens-lyon.fr>
Date: Thu, 7 Oct 2021 14:04:20 +0200
Subject: [PATCH] ucsc: fix var name in bigwig_to_wig

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

diff --git a/src/nf_modules/ucsc/main.nf b/src/nf_modules/ucsc/main.nf
index 7eccd022..899157f9 100644
--- a/src/nf_modules/ucsc/main.nf
+++ b/src/nf_modules/ucsc/main.nf
@@ -42,7 +42,7 @@ process bigwig_to_wig {
   }
 
   input:
-  tuple val(file_id) path(bg)
+  tuple val(file_id) path(bw)
 
   output:
   tuple val(file_id), path("*.wig"), emit: wig
@@ -50,9 +50,9 @@ process bigwig_to_wig {
   script:
 """
 bigWigToBedGraph ${params.bigwig_to_wig} \
-  ${bg} \
+  ${bw} \
   ${bg.simpleName}.bg
-awk '{if(NR>1) {if(\$1!=lastChrom){printf("variableStep chrom=%s\\n",\$1);lastChrom=\$1;}print \$2,\$4}}' ${bg.simpleName}.bg > ${bg.simpleName}.wig
+awk '{if(NR>1) {if(\$1!=lastChrom){printf("variableStep chrom=%s\\n",\$1);lastChrom=\$1;}print \$2,\$4}}' ${bw.simpleName}.bg > ${bw.simpleName}.wig
 """
 }
 
-- 
GitLab