haplotyper-battle-royale/modules/haplink/haplotypes/main.nf

33 lines
695 B
Text
Raw Normal View History

process HAPLINK_HAPLOTYPES {
tag "${prefix}"
label 'process_high'
label 'haplink'
container 'ghcr.io/ksumngs/haplink.jl:1.0.0'
input:
tuple val(prefix), path(bam), path(bai), path(vcf)
path reference
output:
tuple val(prefix), path("*.yaml")
publishDir "${params.outdir}/${task.process}", mode: 'copy'
when:
task.ext.when == null || task.ext.when
script:
def ml_args = task.ext.ml_args ?: ''
"""
export JULIA_NUM_THREADS=${task.cpus}
haplink haplotypes \\
"${reference}" \\
"${vcf}" \\
"${bam}" \\
--frequency 0.01 \\
${ml_args} \\
> "${prefix}.yaml"
"""
}