haplotyper-battle-royale/modules/minimap2/main.nf

33 lines
771 B
Text

process MINIMAP2 {
tag "${prefix}"
label 'process_medium'
container 'quay.io/biocontainers/mulled-v2-66534bcbb7031a148b13e2ad42583020b9cd25c4:1679e915ddb9d6b4abda91880c4b48857d471bd8-0'
input:
tuple val(prefix), path(reads)
path reference
publishDir "results", mode: 'copy'
output:
tuple val(prefix), path("*.bam"), path("*.bam.bai")
script:
"""
minimap2 \\
-x map-ont \\
--MD \\
--eqx \\
-t ${task.cpus} \\
-a \\
"${reference}" \\
"${reads}" \\
| samtools sort \\
| samtools view \\
-@ ${task.cpus} \\
-b \\
-h \\
-o "${prefix}.bam"
samtools index "${prefix}.bam"
"""
}