Hi all, hoping someone can help with a nit-picky question!
When bedtools intersect
is provided with a BAM file generated from paired-end reads as the query file (-a option), does it look for an intersection of the individual reads with the reference sequences or does it use the inserts?
e.g. for these paired entries in my BAM (converted to SAM, raw seq omitted) file, would it look for intersections with the feature [1,298,531 to 1,298,889] (i.e. the insert) or with [1,298,531 to 1,298,681] and [1,298,739 to 1,298,889] (i.e. the individual mates). The difference being whether annotations falling within the 'unknown' insert region will count as having been intersected or not.
A00877:614:HWGW7DSXY:1:2331:23204:15123 163 chr1A 1298531 42 150M = 1298739 358
A00877:614:HWGW7DSXY:1:2331:23204:15123 83 chr1A 1298739 42 150M = 1298531 -358
Hope I'm making sense!
Hi Lieven, thanks for your answer! Yes, that was my interpretation when I read that part of the manual too, but I just wasn't sure. Nice to get a second opinion on the matter. I'm going to leave the question open for now in case anyone else would like to weigh in, but will give your response an an upvote. Thanks again!