Difference of samtools depth count and samtools tview count
1
1
Entering edit mode
8.6 years ago
Yuu ▴ 10

Hi everyone,

There is a question that why samtools depth count is different with samtools tview count.

For example , I use "samtools depth -q 0 -Q 0 my.bam > my.depth" to get the depth of the sites,however the depth is smaller than I see through samtools tview.(I guess this different generated by secondary map.)

Is there a way that can get the same depth with samtools tview?

samtools depth samtools tview • 3.2k views
ADD COMMENT
0
Entering edit mode

See here: Does Samtools Tview Hide Pcr And Optical Duplicates?

And not to my knowledge, no - use another genome browser :(

ADD REPLY
0
Entering edit mode

Thanks,we can use pysam to get the same count.

ADD REPLY
1
Entering edit mode
8.5 years ago

samtools depth provides the exact depth for each position considering ALL reads in the bam file. when you don't SEE the same numbers in any particular viewer you have to take into account that those viewers usually apply some read filtering that alter read depth DISPLAYED, which does not necessarily reflect the raw depth. if you want to get the same numbers in both samtools depth and viewer then you'll have to remove any default filtering from the viewer (easier), or either apply the same filters to your bam file before extracting the coverage through samtools depth.

ADD COMMENT

Login before adding your answer.

Traffic: 1722 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