Skip to content
Snippets Groups Projects
Commit 1814df72 authored by vvanoost's avatar vvanoost
Browse files

add filtering step of reads based on mapping quality >=2

parent 761517da
No related branches found
No related tags found
No related merge requests found
...@@ -230,6 +230,25 @@ fi ...@@ -230,6 +230,25 @@ fi
""" """
} }
/*
* filtering mapping quality >= 2
*/
process quality_filtered_bam {
tag "$bam.baseName"
cpus 2
input:
file bam from bam_files
output:
file "*_filtered.bam*" into filtered_bam_files
script:
"""
samtools view -hb -q 2 ${bam} > ${bam}_filtered.bam
"""
}
/* MultiQC */ /* MultiQC */
process multiqc { process multiqc {
...@@ -258,7 +277,7 @@ process sort_bam { ...@@ -258,7 +277,7 @@ process sort_bam {
cpus 4 cpus 4
publishDir "results/mapping_SE/bams/", mode: 'copy' publishDir "results/mapping_SE/bams/", mode: 'copy'
input: input:
file bam from bam_files file bam from filtered_bam_files
output: output:
file "*_sorted.bam" into sorted_bam_files file "*_sorted.bam" into sorted_bam_files
......
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