Why the file unmapped.bam, from tophat has all reads with mapq =/> 30?
1
0
Entering edit mode
8.7 years ago
tiago211287 ★ 1.4k

Used the samstat tool (http://samstat.sourceforge.net/) for seeing the mapq scores of my alignment;

First, I used with the accepted_hits.bam, and found some reads classified as unmapped. And, I thought strange. Shouldn't the accepted hits contain only mapped reads?

Second, When I use the samstat against unmapped reads.bam, all reads are 30 + mapq scored.

Can someone explain this to me?

samstat tophat mapq • 3.2k views
ADD COMMENT
0
Entering edit mode

Can you post the output of

samtools view unmapped.bam | cut -f5 | sort | uniq -c
ADD REPLY
0
Entering edit mode
[tiagocastro@tucunare test]$ samtools view unmapped.bam | cut -f5 | sort | uniq -c
756288 255
ADD REPLY
0
Entering edit mode

I found strange that my accepted_hits has unmapped reads. Also, The unmapped.bam has 30+ mapq.

image: screenshot

ADD REPLY
4
Entering edit mode
8.7 years ago

As the following command gave you 756288 255, this indicates all the reads in unmapped.bam have mapping quality of 255, which indicates that the mapping quality could not be assigned to them, hence they are all can be considered as unmapped. If you run the same command on accepted_hits.bam, you should see MAPQ of 0,1,3,50.

samtools view unmapped.bam | cut -f5 | sort | uniq -c

You can also run the following command and see if all the reads have reference name as *. This also indicates the reads mapped to no chromosomes.

samtools view unmapped.bam | cut -f3 | sort | uniq -c
ADD COMMENT
0
Entering edit mode

No need to sort in the second command.

ADD REPLY
0
Entering edit mode

Can you tell me how can be possible that, all MAPQ in all bases of all reads be the same? like this plot on the samstat are saying?

Saw here that "The counts and proportions should be almost invariant across read positions"

ADD REPLY
0
Entering edit mode

More one thing, shouldn't the accepted_hits.bam have 0 unmapped reads? Must have something wrong with my alignment. as you can see here:

There are 0.5% unmapped reads on the accepted_hits.bam: http://s28.postimg.org/wunusnl71/Untitled.png)

ADD REPLY
1
Entering edit mode

It should have 0 unmapped reads. If you run the command mentioned:

samtools view accepted_hits.bam | cut -f5 | sort | uniq -c

you should not see any reads with MAPQ 255. I never used any software for these calculations. I use only samtools with various flags.

ADD REPLY
0
Entering edit mode

MAPQ is not for all bases. its for read. All unmapped reads in tophat output will have MAPQ of 255, which indicates that the MAPQ can not be calculated for them.

ADD REPLY

Login before adding your answer.

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