Unconfigured Ad

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Arupsss
    Member
    • May 2011
    • 44

    #1

    BWA - XM tag Question

    I have installed BWA. And build index of hg19 using command:

    bwa index -a bwtsw hg19.fa

    Now I find alignment using command:

    ./bwa aln hg19.fa SRR4493095_1.fastq > aln_sa.sai

    However, I want to find alignments allowing 1 or 2 mismatches.

    From BWA home page, I found, I have to use XM tag.

    But, can't get how to use that means what should be the command.

    Can anybody please help me on this ?

    Thanks.
    Last edited by Arupsss; 06-28-2012, 06:51 AM.
  • Arupsss
    Member
    • May 2011
    • 44

    #2
    Another point is that, in some places I found - n 0/1/2 this tag gives specified number of mismatch. However, can't understand whether is that true or not. Little bit confusing because some places told to use XM (but don't specify how) some places told to use - n 0/1/2 .

    Comment

    • xied75
      Senior Member
      • Feb 2012
      • 129

      #3
      You misunderstood the XM tag, XM IS a TAG in the output of BWA SAMPE/SAMSE step (which is a SAM file).

      -n IS a switch (or options/parameters) when you run BWA, there are many switches you can give.

      With default values for these (i.e. don't use them at all) you already can have 1 or 2 mismatches.

      Comment

      • Arupsss
        Member
        • May 2011
        • 44

        #4
        Originally posted by xied75 View Post
        You misunderstood the XM tag, XM IS a TAG in the output of BWA SAMPE/SAMSE step (which is a SAM file).

        -n IS a switch (or options/parameters) when you run BWA, there are many switches you can give.

        With default values for these (i.e. don't use them at all) you already can have 1 or 2 mismatches.
        Thanks for reply:

        Actually, I am comparing, BWA vs BowTie. For, BowTie, I can specify output allowing mismatch by command

        ./bowtie --all -v 0 hg19 SRR4930952.fastq SRR4930952.txt (v specify number of mismatch).

        I want same command to compare with BWA ( it's paper say's, it allows).

        So, what command should I give to find exact matches and allowing 1/2 mismatches (I am using 150 bp read).

        Comment

        • xied75
          Senior Member
          • Feb 2012
          • 129

          #5
          -k and/or -n. -k is mismatch in seed, -n is overall, not sure what combination you need with your 150bp read.

          Comment

          • Arupsss
            Member
            • May 2011
            • 44

            #6
            Originally posted by xied75 View Post
            -k and/or -n. -k is mismatch in seed, -n is overall, not sure what combination you need with your 150bp read.
            I have no restrictions in maximum edit distance in the seed.

            Can you inform me: what does this - n option means.

            It says:

            -n NUM Maximum edit distance if the value is INT, or the fraction of missing alignments given 2% uniform base error rate if FLOAT. In the latter case, the maximum edit distance is automatically chosen for different read lengths. [0.04]

            So, if I run in default setting for 150 bps read, it allows 6 mismatches ?

            And for allowing no mismatches:

            I have to set - n 0.

            For 2 mismatches for 150 bps,

            I have to set - n 2.

            Is this correct ?
            Last edited by Arupsss; 06-28-2012, 07:49 AM.

            Comment

            • xied75
              Senior Member
              • Feb 2012
              • 129

              #7
              Yes, -n 0 for all match, -n 2 for 2 mismatches.

              Comment

              • Arupsss
                Member
                • May 2011
                • 44

                #8
                Originally posted by xied75 View Post
                Yes, -n 0 for all match, -n 2 for 2 mismatches.
                Thanks a lot. This I want to make sure. And by default:

                it gives

                [bwa_aln] 17bp reads: max_diff = 2
                [bwa_aln] 38bp reads: max_diff = 3
                [bwa_aln] 64bp reads: max_diff = 4
                [bwa_aln] 93bp reads: max_diff = 5
                [bwa_aln] 124bp reads: max_diff = 6
                [bwa_aln] 157bp reads: max_diff = 7
                [bwa_aln] 190bp reads: max_diff = 8
                [bwa_aln] 225bp reads: max_diff = 9

                mismatches ? True ?

                Comment

                • xied75
                  Senior Member
                  • Feb 2012
                  • 129

                  #9
                  Yes that's the default output you see when there is no -n used.

                  Comment

                  Latest Articles

                  Collapse

                  • SEQadmin2
                    Beyond CRISPR/Cas9: Understand, Choose, and Use the Right Genome Editing Tool
                    by SEQadmin2



                    CRISPR/Cas9 sparked the gene editing revolution for both research and therapeutics.1 But this system still showed severe issues that limited its applications. The most prominent were the heavy reliance on PAM sequences, delivery limitations, double-stranded breaks that prompt unintended edits and cell death, and editing inefficiency (both in targeting and in knock-in reliability).

                    Despite this, “CRISPR helped turn genome editing from a specialized technique into
                    ...
                    07-31-2026, 11:01 AM
                  • SEQadmin2
                    Proteomic Platforms: How to Choose the Right Analytical Strategy to Improve Detection and Clinical Applications
                    by SEQadmin2


                    Proteomics platforms are evolving rapidly, with advances in mass spectrometry and affinity-based approaches expanding what researchers can detect and at what scale. As the field moves toward deeper proteome coverage and clinical applications, scientists face an increasingly complex landscape of tools. This article will explore how researchers are navigating these choices to find the right platform for their work.

                    The systematic characterization of the human proteome has
                    ...
                    07-20-2026, 11:48 AM

                  ad_right_rmr

                  Collapse

                  News

                  Collapse

                  Topics Statistics Last Post
                  Started by SEQadmin2, 08-11-2026, 10:35 AM
                  0 responses
                  11 views
                  0 reactions
                  Last Post SEQadmin2  
                  Started by SEQadmin2, 08-06-2026, 07:41 AM
                  0 responses
                  30 views
                  0 reactions
                  Last Post SEQadmin2  
                  Started by SEQadmin2, 08-03-2026, 10:13 AM
                  0 responses
                  48 views
                  0 reactions
                  Last Post SEQadmin2  
                  Started by SEQadmin2, 07-31-2026, 02:55 AM
                  0 responses
                  48 views
                  0 reactions
                  Last Post SEQadmin2  
                  Working...