This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Filter BAM to keep only alignments at an interval, ignoring reads spliced over

Hi,

I am looking at a rare splicing event, and would like to keep only reads in a specific interval that have an alignment at that location. With a simple samtools view alignment.cram chr1:12345-12456 I also get all reads that are spliced across that interval (screenshot below). How do I get rid of reads that do not actually align at this location?

Bonus points if I can still keep the mates of the reads that align at this location...

enter image description here

samtools bam splicing

what's the gray section ? it's the read you want ? do you only want the reads that end at the splice event (single point location) ?

I want reads in a specific short interval, but if I do that with samtools view I also get reads that are spliced over that interval.

0 answers

No answers yet.

Log in to answer this question.