SEQanswers

Go Back   SEQanswers > Bioinformatics > Bioinformatics



Similar Threads
Thread Thread Starter Forum Replies Last Post
quality problem when mapping with gMap lixiangru Bioinformatics 1 11-16-2011 06:40 PM
mapping quality score in tophat sam file jjpurwar Bioinformatics 5 06-22-2011 11:55 AM
Different MAPPING QUALITY/PER-BASE QUALITY SCORE m_elena_bioinfo Bioinformatics 2 09-02-2010 09:00 AM
Interpretation of BWA mapping quality christophpale Bioinformatics 0 07-21-2010 03:15 AM
bwa mapping quality totalnew Bioinformatics 6 05-21-2010 04:50 AM

Reply
 
Thread Tools
Old 11-17-2009, 04:12 AM   #1
dawe
Senior Member
 
Location: 4530'25.22"N / 915'53.00"E

Join Date: Apr 2009
Posts: 258
Default Bowtie mapping quality in SAM

Hi, how do you interpret the quality of the alignment in SAM files generated by bowtie? I only see values being 0 or 255 (for unmapped and mapped sequences), is this just me?

d
dawe is offline   Reply With Quote
Old 11-17-2009, 05:07 AM   #2
Ben Langmead
Senior Member
 
Location: Baltimore, MD

Join Date: Sep 2008
Posts: 200
Default

Quote:
Originally Posted by dawe View Post
Hi, how do you interpret the quality of the alignment in SAM files generated by bowtie? I only see values being 0 or 255 (for unmapped and mapped sequences), is this just me?

d
Bowtie doesn't calculate Maq-like mapping quality values, so (per the SAM spec) it prints 255 there if the read aligns or 0 otherwise.

Ben
Ben Langmead is offline   Reply With Quote
Old 11-30-2010, 05:44 PM   #3
xinwu
Member
 
Location: Beijing

Join Date: Jul 2010
Posts: 33
Default

Ben,
So, does Bowtie give its own mapping quality values somewhere or it does not report any mapping quality values at all? As the manual said, --best option can report best-worst order alignments, how can I measure the level between a better alignment to a worse alignment without mapping quality? Thanks.
xinwu is offline   Reply With Quote
Old 12-01-2010, 01:07 AM   #4
dariober
Senior Member
 
Location: Cambridge, UK

Join Date: May 2010
Posts: 311
Default

Quote:
Originally Posted by xinwu View Post
Ben,
So, does Bowtie give its own mapping quality values somewhere or it does not report any mapping quality values at all? As the manual said, --best option can report best-worst order alignments, how can I measure the level between a better alignment to a worse alignment without mapping quality? Thanks.
I'm also interested in this question...

Dario
dariober is offline   Reply With Quote
Old 05-24-2011, 07:52 PM   #5
Hunny
Member
 
Location: Beijing, China

Join Date: Apr 2011
Posts: 23
Default

Quote:
Originally Posted by dawe View Post
Hi, how do you interpret the quality of the alignment in SAM files generated by bowtie? I only see values being 0 or 255 (for unmapped and mapped sequences), is this just me?

d
Hi,

I have the same problem when aligning reads using Tophat.

The values in my sam file generated by tophat range from 0 to 255, which is different from your example.

I look up the field interpretation for the quality value by reading The SAM Format Speci cation, which tells me that in the attached snapshot.

The value ranges from 0 to +∞ with that the zero represents the highest probability of mapping wrong and +∞ is for the lowest probability of mapping wrong, according to the formula given in the document. The range 0~+∞ could be normalized into 0~255, right?

But why does the document tell that the value 255 indicates that the mapping quality is not available? I have an inverse answer to it.

I am wondering if I have made a mistake of understanding.

Hope someone could help me.

Thanks in advance,
Attached Images
File Type: png sam.png (15.2 KB, 60 views)
Hunny is offline   Reply With Quote
Old 05-24-2011, 09:19 PM   #6
Hunny
Member
 
Location: Beijing, China

Join Date: Apr 2011
Posts: 23
Default

Quote:
Originally Posted by Hunny View Post
Hi,

I have the same problem when aligning reads using Tophat.

The values in my sam file generated by tophat range from 0 to 255, which is different from your example.

I look up the field interpretation for the quality value by reading The SAM Format Speci cation, which tells me that in the attached snapshot.

The value ranges from 0 to +∞ with that the zero represents the highest probability of mapping wrong and +∞ is for the lowest probability of mapping wrong, according to the formula given in the document. The range 0~+∞ could be normalized into 0~255, right?

But why does the document tell that the value 255 indicates that the mapping quality is not available? I have an inverse answer to it.

I am wondering if I have made a mistake of understanding.

Hope someone could help me.

Thanks in advance,
Well, many facts manifest that the higher the value, the better the alignment with 255 of its maximum. So, I guess "mapping quality is not available" means the value 255 is meaningless for such a perfect alignment, right?
Hunny is offline   Reply With Quote
Old 12-19-2012, 03:54 PM   #7
carmeyeii
Senior Member
 
Location: Mexico

Join Date: Mar 2011
Posts: 137
Default

Would like to revisit this. Is it clear now that 255 means a top score alignment?
carmeyeii is offline   Reply With Quote
Old 12-19-2012, 03:56 PM   #8
carmeyeii
Senior Member
 
Location: Mexico

Join Date: Mar 2011
Posts: 137
Default

Found this elsewhere on the web>

Tophat/bowtie don’t report mapping quality values that are as meaningful as BWA, but there is some information in the mapping quality values tophat reports. Tophat yields 4 distinct values for its mapping quality values (you can do a “unique” count on the mapping quality field of any SAM file from tophat to verify this):



255 = unique mapping

3 = maps to 2 locations in the target

2 = maps to 3 locations

1 = maps to 4-9 locations

0 = maps to 10 or more locations.



Except for the 255 case, the simple rule that was encoded by the authors is the usual phred quality scale:



MapQ = -10 log10(P)



Where P = probability that this mapping is NOT the correct one. The authors ignore the number of mismatches in this calculation and simply assume that if it maps to 2 locations then P = 0.5, 3 locations implies P = 2/3, 4 locations => P = 3/4 etc.



As you can clearly see, then MapQ = -10 log10(0.5) = 3; -10 log10(2/3) = 1.76 (rounds to 2);

-10 log10(3/4) = 1.25 (rounds to 1), etc.
carmeyeii is offline   Reply With Quote
Old 04-29-2013, 11:24 AM   #9
foxriverlin
Member
 
Location: Ames, Iowa

Join Date: Sep 2011
Posts: 13
Default

Thanks carmeyeii. That is very helpful!
foxriverlin is offline   Reply With Quote
Old 10-14-2015, 10:06 AM   #10
apredeus
Senior Member
 
Location: Bioinformatics Institute, SPb

Join Date: Jul 2012
Posts: 151
Default

BWA or bowtie2 report actual mapping qualities, which can be very useful, especially if you are analyzing ChIP-Seq or do SNP calling. Bowtie does not.
apredeus is offline   Reply With Quote
Reply

Tags
bowtie, phred, quality, sam

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off




All times are GMT -8. The time now is 04:54 PM.


Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2019, vBulletin Solutions, Inc.
Single Sign On provided by vBSSO