Quantcast
Channel: Post Feed
Viewing all articles
Browse latest Browse all 3231

Is There An Elegant Way To Extract Only The Properly-Paired Reads In A Sam/Bam File?

$
0
0

I know I should be filtering for the following tags: 99,163,83,147 and I know that samtools would work to get all the pairs. For example:samtools view -F 0x99 -b in.bam I was wondering if there was a more elegant way to do this than running samtools four times to filter for each tag. It also occured to me, I would probably have to sort the bam files afterward to ensure that the pairs were in the same order, which means I have to run the sort function 4 times as well.

I would appreciate knowing if there was a better way to do this.


Viewing all articles
Browse latest Browse all 3231

Trending Articles