diff --git a/src/RNAseq_sen1D_bowtie2_SE.nf b/src/RNAseq_sen1D_bowtie2_SE.nf
index 70accab4cb2b9d4bac26cd7a8c1b71487b0c9f9f..76645ff4c9e6421ef2712c2eddcf180818189a61 100644
--- a/src/RNAseq_sen1D_bowtie2_SE.nf
+++ b/src/RNAseq_sen1D_bowtie2_SE.nf
@@ -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                                     */
 
 process multiqc {
@@ -258,7 +277,7 @@ process sort_bam {
   cpus 4
   publishDir "results/mapping_SE/bams/", mode: 'copy'
   input:
-    file bam from bam_files
+    file bam from filtered_bam_files
 
   output:
     file "*_sorted.bam" into sorted_bam_files