Unconfigured Ad

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • wjeck
    Member
    • Mar 2009
    • 39

    #1

    Strange Results After maq2sam-long

    Hi all,

    I've been working with bwa, maq and samtools for a few weeks now, and my PI just came across an unusual result which now has me worried about my results. I started off my workflow by running MAQ on a data set and matching against a restricted chromosomal region of hg18. I now have output with an example as follows:

    HWUSI-EAS211R_5:2:6:90:1384 131 chr9_22054888_22134171 1 99 35M * 0 172 ATCCTTGGAGTTGTGAGGATTTAATGCAATTGTCT WWWWWWWWWWWWWWWWWVWWWWWWWUWWWVUUUUT MF:i:18 AM:i:99 SM:i:99 NM:i:1 UQ:i:30 H0:i:1 H1:i:0

    My question is this: what is going on with the tags NM, H0 and H1 (in bold above). NM:i:1 should mean that the read has one mismatch to the genome, which seems to be true if I blat back to the reference. However H0:i:1 should mean that there is an exact match to the genome, and H1:i:1 should mean that there are no matches with distance 1 from the reference. Am I misinterpreting the tags or is this really inconsistent? If it is inconsistent, where is the bug (MAQ or maq2sam-long) and how can I fix it?

    --Will
  • totalnew
    Member
    • Apr 2009
    • 46

    #2
    Tags NM, H0 and H1 are quite confusing, I discuss it in this thread, please take a look,
    Discussion of next-gen sequencing related bioinformatics: resources, algorithms, open source efforts, etc


    The read you listed above could be interpreted in two ways:
    NM:i:1 H0:1:1 H1:i:0
    1. Unique mapping has 1 mismatch, the number of hit with no mismatch is 1, the number of hit with 1 mismatch is 0. NM field contradicts H0 field.

    2. Unique mapping has 1 mismatch, the number of hits of best hit is 1, the number of suboptimal hits with 1 more mismatch is 0. This is explainable.

    However, I 've come across this as well:
    MF:i:32 AM:i:47 NM:i:2 UQ:i:60 H0:i:0 H1:i:1

    According to the second explanation, H0 should be 1, and the best hit has 2 mismatches. I may not consent this is a bug of maq or maq2sam-long, but the ambiguous definition of tags.

    Comment

    • wjeck
      Member
      • Mar 2009
      • 39

      #3
      I agree that this is abiguous, but looking at the documentation is even more concerning. NM, by this definition, should refer to the particular alignment being reported not just to unique alignments. In this case the H1:i:0 tag is a misreport, because it implies that there are no reads with 1-difference from the reference, but simultaneously is itself reporting a read 1-difference from the reference.

      See: http://samtools.sourceforge.net/SAM1.pdf - page 7

      Comment

      • totalnew
        Member
        • Apr 2009
        • 46

        #4
        It still mixed me up, I thought NM (edit distance) is more or less similar to "number of mismatches of the best hit" defined in MAQ manual. I ever parsed the maq output (.map) file, the distribution of field "number of mismatches of the best hit" I count is exactly same as the distribution I count for NM tag from the sam file converted by same map file.

        Comment

        • wjeck
          Member
          • Mar 2009
          • 39

          #5
          Yea I am getting the same result. I think that's because maq2sam-long is returning only the best hit when it outputs in SAM format, so NM is equal to the number of matches in the best hit AND that hit. Clearly NM is consistent with the entire rest of the line. However H1:i and H0:i are not, and I believe need fixing in maq2sam-long or in maq (but probably not in maq)

          Comment

          Latest Articles

          Collapse

          • kinpict.com
            Reply to 16S/ITS Profiling vs. Shotgun Metagenomics: What Changes in Your Workflow?
            by kinpict.com
            The part about this topic feels surprisingly grounded, and the details on the page is the bit that made me slow down. I’d keep <a href="https://kinpict.com/">ai family photo generator</a> bookmarked for later.
            Today, 06:37 PM
          • SEQadmin2
            16S/ITS Profiling vs. Shotgun Metagenomics: What Changes in Your Workflow?
            by SEQadmin2





            NGS has revolutionized clinical microbiology by offering new ways to identify and surveil pathogens without prior knowledge of the target. One popular approach is 16S rRNA and ITS amplicon sequencing, which targets specific microbial markers. But studies are increasingly incorporating shotgun metagenomics, a technique that sequences all DNA from a sample without targeting specific microbial markers. This approach allows more detailed taxonomic classification,...
            10-30-2026, 06:46 AM

          ad_right_rmr

          Collapse

          News

          Collapse

          Topics Statistics Last Post
          Started by SEQadmin2, 11-12-2026, 07:59 AM
          0 responses
          28 views
          0 reactions
          Last Post SEQadmin2  
          Started by SEQadmin2, 11-05-2026, 09:25 AM
          0 responses
          35 views
          0 reactions
          Last Post SEQadmin2  
          Started by SEQadmin2, 11-03-2026, 11:54 AM
          2 responses
          56 views
          0 reactions
          Last Post kinpict.com  
          Started by SEQadmin2, 10-28-2026, 09:57 AM
          0 responses
          175 views
          0 reactions
          Last Post SEQadmin2  
          Working...