Entering edit mode
7 months ago
WouterDeCoster
47k
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...
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.
see also : Extract paired-end reads with one end falls within a given region from a bam file ; Remove reads from bam file that partially covers a region ; Is it possible to remove reads from BAM which match the reference at a position