From a12e9229cc323959eb49b1be866f3b9be5eb400b Mon Sep 17 00:00:00 2001 From: Laurent Modolo <laurent@modolo.fr> Date: Fri, 22 Jan 2021 14:32:46 +0100 Subject: [PATCH] nf_modules: masc2 add DSL2 --- src/nf_modules/macs2/main.nf | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 src/nf_modules/macs2/main.nf diff --git a/src/nf_modules/macs2/main.nf b/src/nf_modules/macs2/main.nf new file mode 100644 index 00000000..9748cdc6 --- /dev/null +++ b/src/nf_modules/macs2/main.nf @@ -0,0 +1,35 @@ +version = "2.1.2" +container_url = "lbmc/macs2:${version}" + +process peak_calling { + container = "${container_url}" + label "big_mem_multi_cpus" + tag "${file_id}" + publishDir "results/peak_calling/${file_id}", mode: 'copy' + + input: + tuple val(file_id), path(bam_ip), path(bam_control) + + output: + path "*", emit: peak + path "*_report.txt", emit: report + + script: +/* remove --nomodel option for real dataset */ +""" +macs2 callpeak \ + --treatment ${file_ip} \ + --call-summits "True"\ + --control ${file_control} \ + --keep-dup "auto" \ + --name ${file_id} \ + --gsize ${params.genome_size} 2> \ + ${file_ip}_macs2_report.txt + +if grep -q "ERROR" ${file_ip}_macs2_report.txt; then + echo "MACS2 error" + exit 1 +fi +""" +} + -- GitLab