Unconfigured Ad

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • dawe
    Senior Member
    • Apr 2009
    • 258

    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
  • Ben Langmead
    Senior Member
    • Sep 2008
    • 200

    #2
    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

    Comment

    • xinwu
      Member
      • Jul 2010
      • 33

      #3
      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.

      Comment

      • dariober
        Senior Member
        • May 2010
        • 311

        #4
        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

        Comment

        • Hunny
          Member
          • Apr 2011
          • 23

          #5
          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 Files

          Comment

          • Hunny
            Member
            • Apr 2011
            • 23

            #6
            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?

            Comment

            • carmeyeii
              Senior Member
              • Mar 2011
              • 137

              #7
              Would like to revisit this. Is it clear now that 255 means a top score alignment?

              Comment

              • carmeyeii
                Senior Member
                • Mar 2011
                • 137

                #8
                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.

                Comment

                • foxriverlin
                  Member
                  • Sep 2011
                  • 13

                  #9
                  Thanks carmeyeii. That is very helpful!

                  Comment

                  • apredeus
                    Senior Member
                    • Jul 2012
                    • 151

                    #10
                    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.

                    Comment

                    Latest Articles

                    Collapse

                    • SEQadmin2
                      Nine Things a Sample Prep Scientist Thinks About Before Sequencing
                      by SEQadmin2


                      I’m not a sequencing expert. I’m a purification scientist who uses NGS to evaluate workflows my group develops. With this perspective, we think about the sample first and the NGS workflow second. The sequencer is an exceptionally honest reporter, but it can only report on what you give it, so whether you get clean, interpretable data from an NGS workflow is largely determined before you begin.

                      Here are nine questions we think about, in roughly the order they matter, before...
                      06-18-2026, 07:11 AM
                    • SEQadmin2
                      From Collection to Sequencing: Why Sample Preparation and Preservation Define Sequencing Data
                      by SEQadmin2


                      Data variability is still an issue in sequencing technologies despite the advances in reproducibility and accuracy of these platforms. But the problem does not originate in the sequencing itself, but in the previous steps, before the sample reaches the sequencer.


                      The first step is collection, followed by preservation and sample preparation for analysis. Most scientists overlook those steps, but not being careful might just be skewing the experiment’s results.
                      ...
                      06-02-2026, 10:05 AM

                    ad_right_rmr

                    Collapse

                    News

                    Collapse

                    Topics Statistics Last Post
                    Started by SEQadmin2, 06-17-2026, 06:09 AM
                    0 responses
                    36 views
                    0 reactions
                    Last Post SEQadmin2  
                    Started by SEQadmin2, 06-09-2026, 11:58 AM
                    0 responses
                    99 views
                    0 reactions
                    Last Post SEQadmin2  
                    Started by SEQadmin2, 06-05-2026, 10:09 AM
                    0 responses
                    120 views
                    0 reactions
                    Last Post SEQadmin2  
                    Started by SEQadmin2, 06-04-2026, 08:59 AM
                    0 responses
                    113 views
                    0 reactions
                    Last Post SEQadmin2  
                    Working...