Skip to content
Snippets Groups Projects
Unverified Commit de331fa7 authored by Laurent Modolo's avatar Laurent Modolo
Browse files

samtools: nf_module add mapped and unmapped filter

parent ce4c569e
No related branches found
No related tags found
No related merge requests found
......@@ -18,6 +18,41 @@ samtools view -@ ${task.cpus} -hb ${bam} -L ${bed} > ${file_id}_filtered.bam
"""
}
process filter_bam_mapped {
container = "${container_url}"
label "big_mem_multi_cpus"
tag "$file_id"
input:
tuple val(file_id), path(bam)
path bed
output:
tuple val(file_id), path("*_filtered.bam"), emit: bam
script:
"""
samtools view -@ ${task.cpus} -F 4 -hb ${bam} -L ${bed} > ${file_id}_mapped.bam
"""
}
process filter_bam_unmapped {
container = "${container_url}"
label "big_mem_multi_cpus"
tag "$file_id"
input:
tuple val(file_id), path(bam)
path bed
output:
tuple val(file_id), path("*_filtered.bam"), emit: bam
script:
"""
samtools view -@ ${task.cpus} -f 4 -hb ${bam} > ${file_id}_unmapped.bam
"""
}
process index_bam {
container = "${container_url}"
label "big_mem_mono_cpus"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment