feat: Add control flow for choosing haplotypers

This commit is contained in:
Thomas A. Christensen II 2023-09-26 08:27:22 -05:00
parent 9364225e74
commit b98a797701
Signed by: millironx
GPG key ID: 09335146883990B9
10 changed files with 64 additions and 0 deletions

View file

@ -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'
"""

View file

@ -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 ?: ''
"""

View file

@ -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}

View file

@ -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}

View file

@ -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 \\

View file

@ -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'
"""

View file

@ -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 \\

View file

@ -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 \\

View file

@ -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 \\

View file

@ -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 {