Seqanswers Leaderboard Ad

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • rgregor
    Member
    • Jun 2010
    • 11

    bowtie SAM mapq field

    I am trying to find out how bowtie mapq field is computed:

    From the bowtie manual:

    If an alignment is non-repetitive (according to -m, --strata and other options) set the MAPQ (mapping quality) field to this value. See the SAM Spec for details about the MAPQ field Default: 255.

    If i map data with, for example, -m 10, i am allowing up to 10 multiple hits per read. How is the reported SAM mapq number connected with the number of multiple hits of an alignment? If a read has a single hit (from the manual), mapq = 255. If a read has 5 multiple hits, mapq=?

    SAM documentation doesn't tell me anything more (only that it is phread-scaled):

    MAPping Quality (phred-scaled posterior probability that the mapping position of this read is incorrect)

    In the end i would like to do something like this:

    samtools view -q 100 result.sam (filter out results with mapq <100)

    tnx for any help,
    Gregor
  • carmeyeii
    Senior Member
    • Mar 2011
    • 137

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

    • carmeyeii
      Senior Member
      • Mar 2011
      • 137

      #3
      I think it is safe to say that bowtie does the same.

      Comment

      Latest Articles

      Collapse

      • seqadmin
        Pathogen Surveillance with Advanced Genomic Tools
        by seqadmin




        The COVID-19 pandemic highlighted the need for proactive pathogen surveillance systems. As ongoing threats like avian influenza and newly emerging infections continue to pose risks, researchers are working to improve how quickly and accurately pathogens can be identified and tracked. In a recent SEQanswers webinar, two experts discussed how next-generation sequencing (NGS) and machine learning are shaping efforts to monitor viral variation and trace the origins of infectious...
        03-24-2025, 11:48 AM
      • seqadmin
        New Genomics Tools and Methods Shared at AGBT 2025
        by seqadmin


        This year’s Advances in Genome Biology and Technology (AGBT) General Meeting commemorated the 25th anniversary of the event at its original venue on Marco Island, Florida. While this year’s event didn’t include high-profile musical performances, the industry announcements and cutting-edge research still drew the attention of leading scientists.

        The Headliner
        The biggest announcement was Roche stepping back into the sequencing platform market. In the years since...
        03-03-2025, 01:39 PM

      ad_right_rmr

      Collapse

      News

      Collapse

      Topics Statistics Last Post
      Started by seqadmin, 03-20-2025, 05:03 AM
      0 responses
      46 views
      0 reactions
      Last Post seqadmin  
      Started by seqadmin, 03-19-2025, 07:27 AM
      0 responses
      56 views
      0 reactions
      Last Post seqadmin  
      Started by seqadmin, 03-18-2025, 12:50 PM
      0 responses
      46 views
      0 reactions
      Last Post seqadmin  
      Started by seqadmin, 03-03-2025, 01:15 PM
      0 responses
      196 views
      0 reactions
      Last Post seqadmin  
      Working...