From 2829d515336a3a96300b11f1ad32020506a9a3ba Mon Sep 17 00:00:00 2001 From: "Thomas A. Christensen II" <25492070+MillironX@users.noreply.github.com> Date: Sat, 23 Sep 2023 15:21:26 -0500 Subject: [PATCH] refactor: Move HAPLINK_VARIANTS module to its own folder --- main.nf | 24 +----------------------- modules/haplink/variants/main.nf | 22 ++++++++++++++++++++++ 2 files changed, 23 insertions(+), 23 deletions(-) create mode 100644 modules/haplink/variants/main.nf diff --git a/main.nf b/main.nf index 58335df..69acadb 100755 --- a/main.nf +++ b/main.nf @@ -1,5 +1,6 @@ #!/usr/bin/env nextflow +include { HAPLINK_VARIANTS } from './modules/haplink/variants' include { VIQUAS } from './modules/viquas' workflow { @@ -195,29 +196,6 @@ process SHORAH_SHOTGUN { """ } -process HAPLINK_VARIANTS { - cpus 2 - memory '12.GB' - - input: - tuple val(prefix), path(bam), path(bai) - path reference - - output: - tuple val(prefix), path("*.vcf") - - publishDir "results", mode: 'copy' - - script: - """ - export JULIA_NUM_THREADS=${task.cpus} - haplink variants \\ - "${reference}" \\ - "${bam}" \\ - > "${prefix}.vcf" - """ -} - process HAPLINK_RAW_HAPLOTYPES { cpus 2 memory '12.GB' diff --git a/modules/haplink/variants/main.nf b/modules/haplink/variants/main.nf new file mode 100644 index 0000000..8e2c48f --- /dev/null +++ b/modules/haplink/variants/main.nf @@ -0,0 +1,22 @@ +process HAPLINK_VARIANTS { + cpus 2 + memory '12.GB' + + input: + tuple val(prefix), path(bam), path(bai) + path reference + + output: + tuple val(prefix), path("*.vcf") + + publishDir "results", mode: 'copy' + + script: + """ + export JULIA_NUM_THREADS=${task.cpus} + haplink variants \\ + "${reference}" \\ + "${bam}" \\ + > "${prefix}.vcf" + """ +}