Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

flagstats not equivalent to samtools #141

Closed
drmjc opened this issue May 10, 2015 · 1 comment
Closed

flagstats not equivalent to samtools #141

drmjc opened this issue May 10, 2015 · 1 comment

Comments

@drmjc
Copy link

drmjc commented May 10, 2015

Hi,
thanks for putting together an excellent toolkit, the multithreading is a real win!

I ran samtools flagstat, and then sambamba flagstat, and noticed that they handle secondary alignments differently. It seems sambamba doesn't account for secondary alignments, and then overestimates 'paired in sequencing' by the number of 'secondary's; likewise the sum of differences in read1, read2 = the number of 'secondary's.

Would you consider either documenting this on the readthedocs page, or be able to look in to making these behave the same?

samtools output

25678848 + 0 in total (QC-passed reads + QC-failed reads)
9066 + 0 secondary
0 + 0 supplimentary
0 + 0 duplicates
25606121 + 0 mapped (99.72%:-nan%)
25669782 + 0 paired in sequencing
12834891 + 0 read1
12834891 + 0 read2
25455674 + 0 properly paired (99.17%:-nan%)
25525802 + 0 with itself and mate mapped
71253 + 0 singletons (0.28%:-nan%)
32460 + 0 with mate mapped to a different chr
22265 + 0 with mate mapped to a different chr (mapQ>=5)

sambamba output

25678848 + 0 in total (QC-passed reads + QC-failed reads)
0 + 0 duplicates
25606121 + 0 mapped (99.72%:-nan%)
25678848 + 0 paired in sequencing
12839056 + 0 read1
12839792 + 0 read2
25460539 + 0 properly paired (99.15%:-nan%)
25534779 + 0 with itself and mate mapped
71342 + 0 singletons (0.28%:-nan%)
37768 + 0 with mate mapped to a different chr
24202 + 0 with mate mapped to a different chr (mapQ>=5)
@lomereiter
Copy link
Contributor

Hi,
Thanks for pointing this out. I found the two samtools commits where the behaviour was changed, will make it identical in sambamba shortly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants