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" + """ +}