hi I have used following command to calculate depth of target regions in my bed file
samtools depth -ab target_interval.bed 12345XX.bam > sample_depth.txt
And I used following command to see how many reads are mapping to particular region
samtools view -c 12345XX.bam chr1:111212724-111212724
This command gave output as : 4
I checked the same region region in the sample_depth.txt. But the output there is 2
What is the difference between the above methods? Why does it give two different outputs?