Seqanswers Leaderboard Ad

Collapse

Announcement

Collapse
No announcement yet.
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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.

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


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


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


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

          Comment


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


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

              Comment


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


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

                  Comment

                  Latest Articles

                  Collapse

                  • seqadmin
                    Essential Discoveries and Tools in Epitranscriptomics
                    by seqadmin




                    The field of epigenetics has traditionally concentrated more on DNA and how changes like methylation and phosphorylation of histones impact gene expression and regulation. However, our increased understanding of RNA modifications and their importance in cellular processes has led to a rise in epitranscriptomics research. “Epitranscriptomics brings together the concepts of epigenetics and gene expression,” explained Adrien Leger, PhD, Principal Research Scientist...
                    Yesterday, 07:01 AM
                  • seqadmin
                    Current Approaches to Protein Sequencing
                    by seqadmin


                    Proteins are often described as the workhorses of the cell, and identifying their sequences is key to understanding their role in biological processes and disease. Currently, the most common technique used to determine protein sequences is mass spectrometry. While still a valuable tool, mass spectrometry faces several limitations and requires a highly experienced scientist familiar with the equipment to operate it. Additionally, other proteomic methods, like affinity assays, are constrained...
                    04-04-2024, 04:25 PM

                  ad_right_rmr

                  Collapse

                  News

                  Collapse

                  Topics Statistics Last Post
                  Started by seqadmin, 04-11-2024, 12:08 PM
                  0 responses
                  59 views
                  0 likes
                  Last Post seqadmin  
                  Started by seqadmin, 04-10-2024, 10:19 PM
                  0 responses
                  57 views
                  0 likes
                  Last Post seqadmin  
                  Started by seqadmin, 04-10-2024, 09:21 AM
                  0 responses
                  48 views
                  0 likes
                  Last Post seqadmin  
                  Started by seqadmin, 04-04-2024, 09:00 AM
                  0 responses
                  55 views
                  0 likes
                  Last Post seqadmin  
                  Working...
                  X