Question: samtools flagstat result is different from samtools view result
0
gravatar for Louis Kok
3.5 years ago by
Louis Kok10
Singapore
Louis Kok10 wrote:

Hi All. I wonder if anyone of you have inconsistent mapping result generated by samtools flagstat and samtools view command?

My samtools flagstat output is as below:

3217 + 0 in total (QC-passed reads + QC-failed reads)
0 + 0 duplicates
2788 + 0 mapped (86.66%:nan%)
393 + 0 read1
393 + 0 read2
480 + 0 properly paired (61.07%:nan%)
480 + 0 with itself and mate mapped
148 + 0 singletons (18.83%:nan%)
0 + 0 with mate mapped to a different chr
0 + 0 with mate mapped to a different chr (mapQ>=5)

The total mapped reads number is 2788. However, when I did samtools view and do a read count on those mapped to reference, the number was 2936. I wonder why the number is different in this case.

samtools • 2.0k views
ADD COMMENTlink modified 4 months ago by macielrodriguez220 • written 3.5 years ago by Louis Kok10
> 3217 + 0 in total (QC-passed reads + QC-failed reads)

What represents the number 3217? The total number of reads analized?

ADD REPLYlink written 4 months ago by macielrodriguez220

What you mean by analyzed? It means in this file there are 3217 reads.

ADD REPLYlink written 4 months ago by ATpoint23k

Sorry for the mistake and thank you for the answer. I was a little confused with my own results of flagstat:

6060680 + 0 in total (QC-passed reads + QC-failed reads)
0 + 0 duplicates
6051340 + 0 mapped (99.85%:-nan%)
6060680 + 0 paired in sequencing
3032920 + 0 read1
3027760 + 0 read2
5669320 + 0 properly paired (93.54%:-nan%)
6042000 + 0 with itself and mate mapped
9340 + 0 singletons (0.15%:-nan%)
257886 + 0 with mate mapped to a different chr
28511 + 0 with mate mapped to a different chr (mapQ>=5)
ADD REPLYlink modified 4 months ago • written 4 months ago by macielrodriguez220
5
gravatar for Dan D
3.5 years ago by
Dan D6.8k
Tennessee
Dan D6.8k wrote:

samtools flagstat splits out the reads which mapped as a pair (2,788) vs those which mapped only as singletons (148).

2,788 + 148 = 2,936.

ADD COMMENTlink modified 3.5 years ago • written 3.5 years ago by Dan D6.8k

Thanks Dan for the explanation. For the number of reads mapped, would you take in consideration of singletons as well?

ADD REPLYlink written 3.5 years ago by Louis Kok10
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1960 users visited in the last hour