From 014698120c192b06a4560040b029a073b58684d2 Mon Sep 17 00:00:00 2001
From: nservant <nservant@curie.fr>
Date: Tue, 30 Apr 2019 09:56:31 +0200
Subject: [PATCH] add --skip options

---
 main.nf         | 8 ++++++++
 nextflow.config | 2 ++
 2 files changed, 10 insertions(+)

diff --git a/main.nf b/main.nf
index 5550fb1..4b975d0 100644
--- a/main.nf
+++ b/main.nf
@@ -75,6 +75,8 @@ def helpMessage() {
       -name                         	    Name for the pipeline run. If not specified, Nextflow will automatically generate a random mnemonic.
 
     Step options:
+      --skip_maps                           Skip generation of contact maps. Useful for capture-C
+      --skip_ice			    Skip ICE normalization
       --skip_cool			    Skip generation of cool files
       --skip_multiQC			    Skip MultiQC
 
@@ -720,6 +722,9 @@ process build_contact_maps{
    tag "$sample - $mres"
    publishDir "${params.outdir}/hic_results/matrix/raw", mode: 'copy'
 
+   when:
+      !params.skip_maps
+
    input:
       set val(sample), file(vpairs), val(mres) from all_valid_pairs.combine(map_res)
       file chrsize from chromosome_size.collect()
@@ -742,6 +747,9 @@ process run_ice{
    tag "$rmaps"
    publishDir "${params.outdir}/hic_results/matrix/iced", mode: 'copy'
 
+   when:
+      !params.skip_maps && !params.skip_ice
+
    input:
       file(rmaps) from raw_maps
       file "*.biases"
diff --git a/nextflow.config b/nextflow.config
index 32486aa..e80bebe 100644
--- a/nextflow.config
+++ b/nextflow.config
@@ -19,6 +19,8 @@ params {
   readPaths = false
   chromosome_size = false
   restriction_fragments = false
+  skip_maps = false
+  skip_ice = false
   skip_cool = false
   skip_multiqc = false
   dnase = false
-- 
GitLab