Is it possible to extract paired-end reads that map to a specific interval ( from a bam file ). I tried with intersectBed :
intersectBed -abam align.bam -b interval.gff3 -wa > result.bam
here's the result :
But I only want reads that map to the feature in bold blue (one of the paired reads is enough). For example, I don't want the reads that map either side of this feature (red arrow).
Is it possible with intersectbed or an other program ?