Counting reads at a specific location
0
1
Entering edit mode
8.6 years ago

I have bam files and want to extract the reads that overlap the region provided e.g. I used the following:

samtools view -f 0x02   file_sorted.bam chr3:186749777-186749777 > chr3_reads.txt

is this the most accurate way or some other more specific method is available. I have a mutation in the above location and want exactly all reads that overlap this location

Thanks

sequencing • 2.7k views
ADD COMMENT
0
Entering edit mode

You also need -F 12 because unmapped reads can be in a proper pair.

Other than that, this is not a question of accuracy. For operations like this, samtools and all other tool will be 100% accurate. The question is do you want to include reads which over lap the region boundry? What about pairs where 1 read is in the region and 1 is outside so the whole fragment overlaps the boundry? I cant remember what samtools does by default, but it doesn't matter because you have to be the one to decide first how you want it done, then find the appropriate tool :)

ADD REPLY

Login before adding your answer.

Traffic: 2380 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6