From 47500bc9867d93d3b67f5358621da90552baf905 Mon Sep 17 00:00:00 2001 From: "Thomas A. Christensen II" <25492070+MillironX@users.noreply.github.com> Date: Sat, 23 Sep 2023 16:20:44 -0500 Subject: [PATCH] feat: Add new HAPLINK_HAPLOTYPES module --- modules/haplink/haplotypes/main.nf | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 modules/haplink/haplotypes/main.nf diff --git a/modules/haplink/haplotypes/main.nf b/modules/haplink/haplotypes/main.nf new file mode 100644 index 0000000..e4b96e8 --- /dev/null +++ b/modules/haplink/haplotypes/main.nf @@ -0,0 +1,28 @@ +process HAPLINK_HAPLOTYPES { + tag "${prefix}" + label 'process_high' + + container 'quay.io/biocontainers/haplink:1.0.0--h031d066_0' + + input: + tuple val(prefix), path(bam), path(bai) + path reference + + output: + tuple val(prefix), path("*.yaml") + + publishDir "results/${task.process}", mode: 'copy' + + 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" + """ +}