From 88b5f2d5e55b68e36e2ee172ff74b55576205a6c Mon Sep 17 00:00:00 2001
From: Laurent Modolo <laurent.modolo@ens-lyon.fr>
Date: Thu, 18 Feb 2021 11:55:11 +0100
Subject: [PATCH] macs2: fix macs call cmd

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

diff --git a/src/nf_modules/macs2/main.nf b/src/nf_modules/macs2/main.nf
index fddb3807..d5306e5b 100644
--- a/src/nf_modules/macs2/main.nf
+++ b/src/nf_modules/macs2/main.nf
@@ -19,7 +19,7 @@ process peak_calling {
   script:
 /* remove --nomodel option for real dataset */
 """
-macs3 callpeak \
+macs2 callpeak \
   --treatment ${bam_ip} \
   --call-summits \
   --control ${bam_control} \
@@ -27,9 +27,9 @@ macs3 callpeak \
   --mfold params.macs_mfold[0] params.macs_mfold[1]
   --name ${bam_ip.simpleName} \
   --gsize ${params.macs_gsize} 2> \
-  ${bam_ip.simpleName}_macs3_report.txt
+  ${bam_ip.simpleName}_macs2_report.txt
 
-if grep -q "ERROR" ${bam_ip.simpleName}_macs3_report.txt; then
+if grep -q "ERROR" ${bam_ip.simpleName}_macs2_report.txt; then
   echo "MACS3 error"
   exit 1
 fi
@@ -55,7 +55,7 @@ awk '{print \$1"\t"\$2"\t"\$3"\t.\t+\t"\$4}' ${bg_ip} > \
   ${bg_ip.simpleName}.bed
 awk '{print \$1"\t"\$2"\t"\$3"\t.\t+\t"\$4}' ${bg_control} > \
   ${bg_control.simpleName}.bed
-macs3 callpeak \
+macs2 callpeak \
   --treatment ${bg_ip.simpleName}.bed \
   --call-summits \
   --control ${bg_control.simpleName}.bed \
@@ -63,9 +63,9 @@ macs3 callpeak \
   --mfold params.macs_mfold[0] params.macs_mfold[1]
   --name ${bg_ip.simpleName} \
   --gsize ${params.macs_gsize} 2> \
-  ${bg_ip.simpleName}_macs3_report.txt
+  ${bg_ip.simpleName}_macs2_report.txt
 
-if grep -q "ERROR" ${bg_ip.simpleName}_macs3_report.txt; then
+if grep -q "ERROR" ${bg_ip.simpleName}_macs2_report.txt; then
   echo "MACS3 error"
   exit 1
 fi
-- 
GitLab