Entering edit mode
9.0 years ago
JameB11
▴
10
How can I get the number of mapped reads for a particular region?
samtools view -c -F 4 my.bam
gives me count in the entire bam file but I can't just add -r Chr1:0:1000
to get reads in that region only.
Just to confirm, the number of lines in a BAM file give the info on the number of reads it has? Apologies, I am completely new to this area.
Pls check the link in updated answer.
Just confirming that for any given region, they both should give the same number?