I have a really basic question regarding how to filter out rRNA reads from my paired end RNA-seq data. Essentially I would like to filter out any read pair aligning within a bed file of rRNA coordinates, which I am doing using "bedtools intersect" with the -v flag. This works fine and I get rid of all reads aligning within this region, yet the issue lies in that if only one of the reads of a pair lies within this interval, then it only filters out the one that is within the interval and retains the other end.
Does anyone know of any tool that does either: a) removes both reads if at least one of them lies within an interval; or b) removes "orphan" reads for which its pair is not present in the bam file. Unfortunately, the FLAG field can't be used since the reads are actually properly paired at the time of aligning.