bedtools icon indicating copy to clipboard operation
bedtools copied to clipboard

Intersect not working on alignments with MAPQ = 0

Open Dave217 opened this issue 5 years ago • 0 comments

Hello,

I'm trying to filter out reads that map to a specific area using bowtie2 and bedtools intersect (moving reads not mapping to the region to a new file). This works, except for any reads with a MAPQ score of 0 are not filtered out (included in the new file), even though they are overlapping the region of interest. I don't know if this is intended behaviour, or usually not relevant because one would throw out reads that map that poorly. The reads with poor alignment quality are due to several localized mutations on the DNA template but these alignments are definitely real and correct.

The command I'm using is: bedtools intersect -a name.bam -b filter.bed -v -F .7 > name_filtered.bam

Is intersect ignoring these alignments because of the poor MAPQ, and if so is there a way to prevent that? In the bedtools documentation for other tools, there's a -q option to only operate on alignments of a specific quality, but that doesn't seem to exist for intersect. Or am I just missing it?

I'm new to this so if I can provide any additional info to help, please let me know. Likewise, sorry if I'm not understanding something, but I couldn't find anything on google about this.

Thanks very much,

Dave

Dave217 avatar Oct 24 '18 23:10 Dave217