diff --git a/modules/cliquesnv/main.nf b/modules/cliquesnv/main.nf index f00d979..da197e7 100644 --- a/modules/cliquesnv/main.nf +++ b/modules/cliquesnv/main.nf @@ -1,6 +1,7 @@ process CLIQUESNV { tag "${prefix}" label 'process_high' + label 'cliquesnv' container 'quay.io/biocontainers/cliquesnv:2.0.3--hdfd78af_0' @@ -14,6 +15,9 @@ process CLIQUESNV { publishDir "results/${task.process}", mode: 'copy' + when: + task.ext.when == null || task.ext.when + script: def jmemstring = task.memory.toMega() + 'M' """ diff --git a/modules/haplink/haplotypes/main.nf b/modules/haplink/haplotypes/main.nf index e178112..5673af4 100644 --- a/modules/haplink/haplotypes/main.nf +++ b/modules/haplink/haplotypes/main.nf @@ -1,6 +1,7 @@ process HAPLINK_HAPLOTYPES { tag "${prefix}" label 'process_high' + label 'haplink' container 'quay.io/biocontainers/haplink:1.0.0--h031d066_0' @@ -13,6 +14,9 @@ process HAPLINK_HAPLOTYPES { publishDir "results/${task.process}", mode: 'copy' + when: + task.ext.when == null || task.ext.when + script: def ml_args = task.ext.ml_args ?: '' """ diff --git a/modules/haplink/sequences/main.nf b/modules/haplink/sequences/main.nf index 109b92f..fa1c76e 100644 --- a/modules/haplink/sequences/main.nf +++ b/modules/haplink/sequences/main.nf @@ -1,6 +1,7 @@ process HAPLINK_SEQUENCES { tag "${method}: ${prefix}" label 'process_single' + label 'haplink' container 'quay.io/biocontainers/haplink:1.0.0--h031d066_0' @@ -13,6 +14,9 @@ process HAPLINK_SEQUENCES { publishDir "results/${method}", mode: 'copy' + when: + task.ext.when == null || task.ext.when + script: """ export JULIA_NUM_THREADS=${task.cpus} diff --git a/modules/haplink/variants/main.nf b/modules/haplink/variants/main.nf index b4f7149..ec6e9c8 100644 --- a/modules/haplink/variants/main.nf +++ b/modules/haplink/variants/main.nf @@ -1,6 +1,7 @@ process HAPLINK_VARIANTS { tag "${prefix}" label 'process_medium' + label 'haplink' container 'quay.io/biocontainers/haplink:1.0.0--h031d066_0' @@ -13,6 +14,9 @@ process HAPLINK_VARIANTS { publishDir "results/${task.process}", mode: 'copy' + when: + task.ext.when == null || task.ext.when + script: """ export JULIA_NUM_THREADS=${task.cpus} diff --git a/modules/predicthaplo/main.nf b/modules/predicthaplo/main.nf index 2c14476..f403c0e 100644 --- a/modules/predicthaplo/main.nf +++ b/modules/predicthaplo/main.nf @@ -1,6 +1,7 @@ process PREDICTHAPLO { tag "${prefix}" label 'process_high' + label 'predicthaplo' container 'quay.io/biocontainers/predicthaplo:2.1.4--h9b88814_5' @@ -13,6 +14,9 @@ process PREDICTHAPLO { publishDir "results/${task.process}", mode: 'copy' + when: + task.ext.when == null || task.ext.when + script: """ predicthaplo \\ diff --git a/modules/quasirecomb/main.nf b/modules/quasirecomb/main.nf index 085122e..8e054cf 100644 --- a/modules/quasirecomb/main.nf +++ b/modules/quasirecomb/main.nf @@ -1,6 +1,7 @@ process QUASIRECOMB { tag "${prefix}" label 'process_high' + label 'quasirecomb' container 'quay.io/biocontainers/quasirecomb:1.2--hdfd78af_1' @@ -12,6 +13,9 @@ process QUASIRECOMB { publishDir "results/${task.process}", mode: 'copy' + when: + task.ext.when == null || task.ext.when + script: def jmemstring = task.memory.toMega() + 'M' """ diff --git a/modules/shorah/amplicon/main.nf b/modules/shorah/amplicon/main.nf index 171cf6b..c8ccf38 100644 --- a/modules/shorah/amplicon/main.nf +++ b/modules/shorah/amplicon/main.nf @@ -1,6 +1,7 @@ process SHORAH_AMPLICON { tag "${prefix}" label 'process_high' + label 'shorah' container 'quay.io/biocontainers/shorah:1.99.2--py38h73782ee_8' @@ -14,6 +15,9 @@ process SHORAH_AMPLICON { publishDir "results/${task.process}", mode: 'copy' + when: + task.ext.when == null || task.ext.when + script: """ shorah amplicon \\ diff --git a/modules/shorah/shotgun/main.nf b/modules/shorah/shotgun/main.nf index 9f2ece9..2b7aa86 100644 --- a/modules/shorah/shotgun/main.nf +++ b/modules/shorah/shotgun/main.nf @@ -1,6 +1,7 @@ process SHORAH_SHOTGUN { tag "${prefix}" label 'process_high' + label 'shorah' container 'quay.io/biocontainers/shorah:1.99.2--py38h73782ee_8' @@ -14,6 +15,9 @@ process SHORAH_SHOTGUN { publishDir "results/${task.process}", mode: 'copy' + when: + task.ext.when == null || task.ext.when + script: """ shorah shotgun \\ diff --git a/modules/viquas/main.nf b/modules/viquas/main.nf index ab467a3..ad19953 100644 --- a/modules/viquas/main.nf +++ b/modules/viquas/main.nf @@ -1,6 +1,7 @@ process VIQUAS { tag "${prefix}" label 'process_high' + label 'viquas' container 'code.millironx.com/millironx/haplotyper-battle-royale:viquas' @@ -13,6 +14,9 @@ process VIQUAS { publishDir "results/${task.process}", mode: 'copy' + when: + task.ext.when == null || task.ext.when + script: """ viquas \\ diff --git a/nextflow.config b/nextflow.config index 4e4c25c..98bf7b1 100644 --- a/nextflow.config +++ b/nextflow.config @@ -14,6 +14,15 @@ params { max_memory = '128.GB' max_cpus = 16 max_time = '240.h' + + // Haplotyper options + // By default, run all haplotypers + cliquesnv = true + haplink = true + predicthaplo = true + quasirecomb = true + shorah = true + viquas = true } process { @@ -53,6 +62,25 @@ process { --overlap-max 8000 \\ """ } + + withLabel: 'cliquesnv' { + ext.when = params.cliquesnv + } + withLabel: 'haplink' { + ext.when = params.haplink + } + withLabel: 'predicthaplo' { + ext.when = params.predicthaplo + } + withLabel: 'quasirecomb' { + ext.when = params.quasirecomb + } + withLabel: 'shorah' { + ext.when = params.shorah + } + withLabel: 'viquas' { + ext.when = params.viquas + } } try {