Unconfigured Ad

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • jjpurwar
    Junior Member
    • Jun 2011
    • 9

    mapping quality score in tophat sam file

    Hello all,


    I have been trying to work with the sam output file that I received from tophat. My input file was an RNA-sequencing single end 36 bp run using Illumina GA2 with C. elegans data.

    A sample of the sam file from tophat I am looking at:

    HWUSI-EAS1795_0102:5:116:16624:12048#0 256 I 2821 0 16M * 0 0 GCTGGGTCTGAACTCT IIIIIIIIIIBGGGGI NM:i:2 NH:i:14 CC:Z:= CP:i:13533166 HI:i:0
    HWUSI-EAS1795_0102:5:103:16153:10159#0 256 I 2916 0 17M * 0 0 GTCAATTCTGCGACATG HHHHHHHHHHHHEHHHH NM:i:0 NH:i:6 CC:Z:= CP:i:13533261 HI:i:0
    HWUSI-EAS1795_0102:5:111:9819:1338#0 0 I 2916 0 17M * 0 0 GTCAATTCTGCGACATG IIIIIIIIIIIIIIIII NM:i:0 NH:i:6 CC:Z:= CP:i:13533261 HI:i:0
    HWUSI-EAS1795_0102:5:24:5025:14685#0 272 I 2946 0 19M * 0 0 CGAAAGTAACCCGAATACC IIIIIIGIIHIIIIIHIHI NM:i:0 NH:i:6 CC:Z:= CP:i:13533291 HI:i:0
    HWUSI-EAS1795_0102:5:70:18860:13966#0 272 I 2946 0 19M * 0 0 CGAAAGTAACCCGAATACC GGGGHHGHHGGDGGGGFGG NM:i:0 NH:i:6 CC:Z:= CP:i:13533291 HI:i:0
    HWUSI-EAS1795_0102:5:85:1866:10941#0 272 I 2946 0 19M * 0 0 CGAAAGTAACCCGAATACC GIIIIIIIIIIIIIIGIII NM:i:0 NH:i:6 CC:Z:= CP:i:13533291 HI:i:0
    HWUSI-EAS1795_0102:5:86:8520:16181#0 256 I 2962 0 21M * 0 0 ACCGACAAAAGAAGAGGAACG HHHHHHHHHHDFDDFGFGGFE NM:i:0 NH:i:7 CC:Z:= CP:i:13533307 HI:i:0
    HWUSI-EAS1795_0102:5:5:11293:13799#0 256 I 2970 0 30M * 0 0 AAGAAGAGGAACGCCAACTTTGGATAGACG HHFHHHHHHHEGGGGHHHHHHHGHHHHHGH NM:i:0 NH:i:7 CC:Z:= CP:i:13533315 HI:i:0
    HWUSI-EAS1795_0102:5:120:17838:10446#0 256 I 2975 0 36M * 0 0 GAGGAACGCCAACTTTGGATAGACGCTCTAGGGGCT IHIIBEIIIIIIIIHIIG@IEHEEIIIFIBGIIIEH NM:i:0 NH:i:7 CC:Z:= CP:i:13533320 HI:i:0
    HWUSI-EAS1795_0102:5:4:7318:17553#0 256 I 2990 0 36M * 0 0 TGGATAGACGCTCTAGGGGCTGATTTTGGTCGGAAA GHHHHGEHHEHHHHHHGHHGEG>GEGGGE@EDDFEE NM:i:0 NH:i:7 CC:Z:= CP:i:13533335 HI:i:0

    The fifth column seems to report the mapping quality score. The only scores I am coming across in my sam file is 0, 1 or 255. This seems off to me since I have a match in the 6th column... am I interpreting this incorrectly?

    I did an alignment with novoalign with the exact same input file and here is a sample of the sam file I am looking at:

    HWUSI-EAS1795_0102:5:120:17501:21319#0/1 4 * 0 0 * * 0 0 TGGCGA IIIIII PG:Z:novoalign ZS:Z:QC
    HWUSI-EAS1795_0102:5:120:17879:21320#0/1 4 * 0 0 * * 0 0 TGAGATC HGHHHHH PG:Z:novoalign ZS:Z:QC
    HWUSI-EAS1795_0102:5:120:2546:21319#0/1 4 * 0 0 * * 0 0 TGAAGATGCGACATACCCGCAGCTAGAC IIIIIIIIIIIIIIIIIIHIIGIHIGGG PG:Z:novoalign ZS:Z:NM
    HWUSI-EAS1795_0102:5:120:17450:21318#0/1 0 chrI 15064402 77 26M * 0 0 AACTGGGCCTCCAGTTGGTACGTCTG HHHHHHDHHHHHHEHHHHHHHHHHHH PG:Z:novoalign AS:i:0 UQ:i:0 NM:i:0 MD:Z:26
    HWUSI-EAS1795_0102:5:120:18252:21315#0/1 4 * 0 0 * * 0 0 CCCCGG IIIIHI PG:Z:novoalign ZS:Z:QC
    HWUSI-EAS1795_0102:5:120:17255:21323#0/1 4 * 0 0 * * 0 0 CGGCGGAGGTCGCGGGTTCG GGEGGEGEG@GGGDGHDHH@ PG:Z:novoalign ZS:Z:NM
    HWUSI-EAS1795_0102:5:120:19739:21305#0/1 4 * 0 0 * * 0 0 GTGAGCGGTCGAGACCTGGATTGACAAG IIHIHIHHHIGGIIIIIIDIIGGHIIDG PG:Z:novoalign ZS:Z:NM
    HWUSI-EAS1795_0102:5:120:7089:21322#0/1 4 * 0 0 * * 0 0 TGAGCTAAACCGTACTAATGATCGAGGGCTTACCAT IIIIIIIIIIIIIIIIIHIIEIIIIIIIIIIIIIIG PG:Z:novoalign ZS:Z:NM
    HWUSI-EAS1795_0102:5:120:18560:21325#0/1 0 chrI 15066796 48 21M * 0 0 ATAGAATAATGTAGGTAAGGG FFFFE<GGGGGG?GGGDGGGG PG:Z:novoalign AS:i:0 UQ:i:0 NM:i:0 MD:Z:21
    HWUSI-EAS1795_0102:5:120:18280:21316#0/1 0 chrI 15065492 43 20M * 0 0 GTCTTGAAACACGGATTGCG GGGGGGDGGGHGHGGHHHDH PG:Z:novoalign AS:i:0 UQ:i:0 NM:i:0 MD:Z:20
    HWUSI-EAS1795_0102:5:120:17770:21316#0/1 0 chrI 15063143 3 36M * 0 0 TATGGTTGCAAAGCTGAAACTTAAAGAAATTGACGG BB?BBCFEFEGG@BDF8FEFGGG@GDGED;F8FEC2 PG:Z:novoalign AS:i:0 UQ:i:0 NM:i:0 MD:Z:36 ZS:Z:R ZN:i:2

    In this case, looking at column number 5, I clearly have scores that are ranging from 3 to 77... depending on the quality of my alignment...

    My concern is that I am using a program to toss out poor quality alignments which is using a value of 30 or greater for mapping quality as a filter. Clearly, none of my tophat alignments are passing that filter except for the ones with a 255 (unknown) score.
    Am I missing something here? If the tophat mapping quality scores are indeed correct - What can I do to filter out poor quality alignments from my tophat output?

    Thanks for your help!
  • maubp
    Peter (Biopython etc)
    • Jul 2009
    • 1544

    #2
    Originally posted by jjpurwar View Post
    I have been trying to work with the sam output file that I received from tophat. My input file was an RNA-sequencing single end 36 bp run using Illumina GA2 with C. elegans data.
    Whenever the is something funny going on with quality scores, the first thing I try to check is what kind of FASTQ encoding did you start with (Sanger, old Solexa, or Illumina). And did you tell tophat this, or just trust the default was appropriate?

    Comment

    • jjpurwar
      Junior Member
      • Jun 2011
      • 9

      #3
      Hi, so I did specify the --solexa1.3-quals as my option. I dont take for granted the default option.
      I did check with tophat regarding this matter - turns out that they dont take mapping qualities into account. This is worrisome - since you might want to throw out poor quality alignments. But I guess thats the trade off since tophat is a really fast aligner....

      Comment

      • jjpurwar
        Junior Member
        • Jun 2011
        • 9

        #4
        Hi, so I did specify the --solexa1.3-quals as my option. I dont take for granted the default option.
        I did check with tophat regarding this matter - turns out that they dont take mapping qualities into account. This is worrisome - since you might want to throw out poor quality alignments. But I guess thats the trade off since tophat is a really fast aligner....

        Comment

        • maubp
          Peter (Biopython etc)
          • Jul 2009
          • 1544

          #5
          Tophat may not look at the qualities, but it does write them out in the SAM/BAM file. This is important because if Tophat misunderstood the input FASTQ encoding, they will be wrong in the SAM/BAM.

          It would be worth double checking a couple of reads - compare the input quality (which you say used the Solexa/Illumina 1.3 style, meaning PHRED with offset 64) and the SAM/BAM quality (which should be Sanger style, meaning PHRED with offset 33).

          [Given Tophat doesn't look at the read qualities, this is a separate issue to your original query about the mapping qualities]

          Comment

          • kwatts59
            Member
            • Apr 2011
            • 46

            #6
            I believe the read quality is the column after the sequence. For example, the quality for the read "GCTGGGTCTGAACTCT" is "IIIIIIIIIIBGGGGI" where
            "B" represents a Phred quality score of 33 (Assuming Sanger scoring)
            "G" represents a Phred quality score of 38
            "I" represents a Phred quality score of 40
            To convert the letter to the Phred, just take the ASCII representation and subtract 33.

            Comment

            Latest Articles

            Collapse

            • mylaser
              Reply to Advanced Sequencing Platforms Tackle Neuroscience’s Toughest Genomics Problems
              by mylaser
              Kheloyar – Everything You Need to Know About Kheloyaar Login and Kheoyar Id
              If you are looking for an online gaming platform that offers a user-friendly experience, Kheloyar has become a name that many users search for. Whether you're interested in creating a new account, accessing your dashboard through Kheloyaar Login, or learning how to obtain a Kheoyar Id, understanding the platform's features and account process is essential.
              This guide explains everything you need to know about...
              Today, 01:13 AM
            • SEQadmin2
              Advanced Sequencing Platforms Tackle Neuroscience’s Toughest Genomics Problems
              by SEQadmin2



              Genomics studies in neuroscience face a special challenge due to the brain’s complexity and scarcity of samples. Mapping changes in cell type and state using conventional next-generation sequencing methods remains challenging. Advances in technologies like single-cell sequencing, spatial transcriptomics, and long-read sequencing have opened the door to deeper studies of the brain and diseases like Alzheimer’s, amyotrophic lateral sclerosis (ALS), and schizophrenia.
              ...
              07-09-2026, 11:10 AM
            • SEQadmin2
              Cancer Drug Resistance: The Lingering Barrier to Rising Survival
              by SEQadmin2



              Cancer survival rates have significantly increased in the last few decades in the United States, reaching a combined 70% 5-year survival rate by 2021. Behind this number, there are years of research to find new therapies, drug targets, and early detection methods. But there is one core challenge that keeps slowing down these advances, and it’s about drug resistance.

              There is no single reason why many patients don’t respond to treatment as expected. Cancer is...
              07-08-2026, 05:17 AM

            ad_right_rmr

            Collapse

            News

            Collapse

            Topics Statistics Last Post
            Started by SEQadmin2, 07-09-2026, 10:04 AM
            0 responses
            17 views
            0 reactions
            Last Post SEQadmin2  
            Started by SEQadmin2, 07-08-2026, 10:08 AM
            0 responses
            10 views
            0 reactions
            Last Post SEQadmin2  
            Started by SEQadmin2, 07-07-2026, 11:05 AM
            0 responses
            22 views
            0 reactions
            Last Post SEQadmin2  
            Started by SEQadmin2, 07-02-2026, 11:08 AM
            0 responses
            31 views
            0 reactions
            Last Post SEQadmin2  
            Working...