Samtools Flagstat Output
1
4
Entering edit mode
12.4 years ago
Nitram ▴ 60

For past two hours I tried to browse around for samtools flagstat output information, unfortunately could not find much related to my problem - this is my samtool flagstat output for single end reads - does anyone think that the tophat alignment did not work well. Please let me know. Any possible replies would be greatly appreciated. Thanks in advance.

$ samtools flagstat accepted_hits.bam

18109074 + 0 in total (QC-passed reads + QC-failed reads) 0 + 0 duplicates 18109074 + 0 mapped (100.00%:nan%) 0 + 0 paired in sequencing 0 + 0 read1 0 + 0 read2 0 + 0 properly paired (nan%:nan%) 0 + 0 with itself and mate mapped 0 + 0 singletons (nan%:nan%) 0 + 0 with mate mapped to a different chr 0 + 0 with mate mapped to a different chr (mapQ>=5)

samtools • 12k views
ADD COMMENT
3
Entering edit mode
12.4 years ago
Wen.Huang ★ 1.2k

your output actually says all were mapped. I am pretty sure that top hat only outputs mapped reads. you need to compare the number to the input file.

ADD COMMENT
1
Entering edit mode

It has to be multi-reads.

try

samtools view accepted_hits.bam | cut -f1 | sort | uniq | wc -l

this should give you the count of unique reads

ADD REPLY
1
Entering edit mode

It has to be multi-reads. try "samtools view accepted_hits.bam | cut -f1 | sort | uniq | wc -l" this should give you the count of unique reads

ADD REPLY
0
Entering edit mode

Thanks so much for your reply. My input fastq file has only 17,264,285 reads, then how could the number of mapped reads (~18,109,074) be higher.

ADD REPLY
0
Entering edit mode

Is it possible that bowtie is outputting repetative reads multiple times? samtools flagstat would not try to account for this.

ADD REPLY
0
Entering edit mode

Thanks so much. It helped !

ADD REPLY

Login before adding your answer.

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