refactor: Move HAPLINK_SEQUENCES module to its own file

This commit is contained in:
Thomas A. Christensen II 2023-09-23 16:26:25 -05:00
parent 52ca8f1528
commit 5162f649d8
Signed by: millironx
GPG key ID: 09335146883990B9
2 changed files with 24 additions and 24 deletions

25
main.nf
View file

@ -3,6 +3,7 @@
include { EFETCH } from './modules/efetch'
include { HAPLINK_HAPLOTYPES as HAPLINK_ML_HAPLOTYPES } from './modules/haplink/haplotypes'
include { HAPLINK_HAPLOTYPES as HAPLINK_RAW_HAPLOTYPES } from './modules/haplink/haplotypes'
include { HAPLINK_SEQUENCES } from './modules/haplink/sequences'
include { HAPLINK_VARIANTS } from './modules/haplink/variants'
include { MINIMAP2 } from './modules/minimap2'
include { NANOFILT } form './modules/nanofilt'
@ -74,27 +75,3 @@ workflow {
ch_reference
)
}
process HAPLINK_SEQUENCES {
cpus 1
memory '6.GB'
input:
tuple val(prefix), val(method), path(yaml)
path reference
output:
tuple val(prefix), val(method), path("*.fasta")
publishDir "results/${method}-haplotypes", mode: 'copy'
script:
"""
export JULIA_NUM_THREADS=${task.cpus}
haplink sequences \\
"${reference}" \\
"${yaml}" \\
--prefix "${prefix}" \\
> "${prefix}.fasta"
"""
}

View file

@ -0,0 +1,23 @@
process HAPLINK_SEQUENCES {
cpus 1
memory '6.GB'
input:
tuple val(prefix), val(method), path(yaml)
path reference
output:
tuple val(prefix), val(method), path("*.fasta")
publishDir "results/${method}-haplotypes", mode: 'copy'
script:
"""
export JULIA_NUM_THREADS=${task.cpus}
haplink sequences \\
"${reference}" \\
"${yaml}" \\
--prefix "${prefix}" \\
> "${prefix}.fasta"
"""
}