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 { process CLIQUESNV {
tag "${prefix}" tag "${prefix}"
label 'process_high' label 'process_high'
label 'cliquesnv'
container 'quay.io/biocontainers/cliquesnv:2.0.3--hdfd78af_0' container 'quay.io/biocontainers/cliquesnv:2.0.3--hdfd78af_0'
@ -14,6 +15,9 @@ process CLIQUESNV {
publishDir "results/${task.process}", mode: 'copy' publishDir "results/${task.process}", mode: 'copy'
when:
task.ext.when == null || task.ext.when
script: script:
def jmemstring = task.memory.toMega() + 'M' def jmemstring = task.memory.toMega() + 'M'
""" """

View file

@ -1,6 +1,7 @@
process HAPLINK_HAPLOTYPES { process HAPLINK_HAPLOTYPES {
tag "${prefix}" tag "${prefix}"
label 'process_high' label 'process_high'
label 'haplink'
container 'quay.io/biocontainers/haplink:1.0.0--h031d066_0' container 'quay.io/biocontainers/haplink:1.0.0--h031d066_0'
@ -13,6 +14,9 @@ process HAPLINK_HAPLOTYPES {
publishDir "results/${task.process}", mode: 'copy' publishDir "results/${task.process}", mode: 'copy'
when:
task.ext.when == null || task.ext.when
script: script:
def ml_args = task.ext.ml_args ?: '' def ml_args = task.ext.ml_args ?: ''
""" """

View file

@ -1,6 +1,7 @@
process HAPLINK_SEQUENCES { process HAPLINK_SEQUENCES {
tag "${method}: ${prefix}" tag "${method}: ${prefix}"
label 'process_single' label 'process_single'
label 'haplink'
container 'quay.io/biocontainers/haplink:1.0.0--h031d066_0' container 'quay.io/biocontainers/haplink:1.0.0--h031d066_0'
@ -13,6 +14,9 @@ process HAPLINK_SEQUENCES {
publishDir "results/${method}", mode: 'copy' publishDir "results/${method}", mode: 'copy'
when:
task.ext.when == null || task.ext.when
script: script:
""" """
export JULIA_NUM_THREADS=${task.cpus} export JULIA_NUM_THREADS=${task.cpus}

View file

@ -1,6 +1,7 @@
process HAPLINK_VARIANTS { process HAPLINK_VARIANTS {
tag "${prefix}" tag "${prefix}"
label 'process_medium' label 'process_medium'
label 'haplink'
container 'quay.io/biocontainers/haplink:1.0.0--h031d066_0' container 'quay.io/biocontainers/haplink:1.0.0--h031d066_0'
@ -13,6 +14,9 @@ process HAPLINK_VARIANTS {
publishDir "results/${task.process}", mode: 'copy' publishDir "results/${task.process}", mode: 'copy'
when:
task.ext.when == null || task.ext.when
script: script:
""" """
export JULIA_NUM_THREADS=${task.cpus} export JULIA_NUM_THREADS=${task.cpus}

View file

@ -1,6 +1,7 @@
process PREDICTHAPLO { process PREDICTHAPLO {
tag "${prefix}" tag "${prefix}"
label 'process_high' label 'process_high'
label 'predicthaplo'
container 'quay.io/biocontainers/predicthaplo:2.1.4--h9b88814_5' container 'quay.io/biocontainers/predicthaplo:2.1.4--h9b88814_5'
@ -13,6 +14,9 @@ process PREDICTHAPLO {
publishDir "results/${task.process}", mode: 'copy' publishDir "results/${task.process}", mode: 'copy'
when:
task.ext.when == null || task.ext.when
script: script:
""" """
predicthaplo \\ predicthaplo \\

View file

@ -1,6 +1,7 @@
process QUASIRECOMB { process QUASIRECOMB {
tag "${prefix}" tag "${prefix}"
label 'process_high' label 'process_high'
label 'quasirecomb'
container 'quay.io/biocontainers/quasirecomb:1.2--hdfd78af_1' container 'quay.io/biocontainers/quasirecomb:1.2--hdfd78af_1'
@ -12,6 +13,9 @@ process QUASIRECOMB {
publishDir "results/${task.process}", mode: 'copy' publishDir "results/${task.process}", mode: 'copy'
when:
task.ext.when == null || task.ext.when
script: script:
def jmemstring = task.memory.toMega() + 'M' def jmemstring = task.memory.toMega() + 'M'
""" """

View file

@ -1,6 +1,7 @@
process SHORAH_AMPLICON { process SHORAH_AMPLICON {
tag "${prefix}" tag "${prefix}"
label 'process_high' label 'process_high'
label 'shorah'
container 'quay.io/biocontainers/shorah:1.99.2--py38h73782ee_8' container 'quay.io/biocontainers/shorah:1.99.2--py38h73782ee_8'
@ -14,6 +15,9 @@ process SHORAH_AMPLICON {
publishDir "results/${task.process}", mode: 'copy' publishDir "results/${task.process}", mode: 'copy'
when:
task.ext.when == null || task.ext.when
script: script:
""" """
shorah amplicon \\ shorah amplicon \\

View file

@ -1,6 +1,7 @@
process SHORAH_SHOTGUN { process SHORAH_SHOTGUN {
tag "${prefix}" tag "${prefix}"
label 'process_high' label 'process_high'
label 'shorah'
container 'quay.io/biocontainers/shorah:1.99.2--py38h73782ee_8' container 'quay.io/biocontainers/shorah:1.99.2--py38h73782ee_8'
@ -14,6 +15,9 @@ process SHORAH_SHOTGUN {
publishDir "results/${task.process}", mode: 'copy' publishDir "results/${task.process}", mode: 'copy'
when:
task.ext.when == null || task.ext.when
script: script:
""" """
shorah shotgun \\ shorah shotgun \\

View file

@ -1,6 +1,7 @@
process VIQUAS { process VIQUAS {
tag "${prefix}" tag "${prefix}"
label 'process_high' label 'process_high'
label 'viquas'
container 'code.millironx.com/millironx/haplotyper-battle-royale:viquas' container 'code.millironx.com/millironx/haplotyper-battle-royale:viquas'
@ -13,6 +14,9 @@ process VIQUAS {
publishDir "results/${task.process}", mode: 'copy' publishDir "results/${task.process}", mode: 'copy'
when:
task.ext.when == null || task.ext.when
script: script:
""" """
viquas \\ viquas \\

View file

@ -14,6 +14,15 @@ params {
max_memory = '128.GB' max_memory = '128.GB'
max_cpus = 16 max_cpus = 16
max_time = '240.h' max_time = '240.h'
// Haplotyper options
// By default, run all haplotypers
cliquesnv = true
haplink = true
predicthaplo = true
quasirecomb = true
shorah = true
viquas = true
} }
process { process {
@ -53,6 +62,25 @@ process {
--overlap-max 8000 \\ --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 { try {