Seqanswers Leaderboard Ad

Collapse

Announcement

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

  • BWA - Why giving only one match per read ?

    I am doing experiments with BWA and BowTie. Now, I am finding alignments using command:


    ./bwa aln -n 0 -k 41 database.fa SRR4493095_1.fastq > aln_sa.sai

    and

    ./bwa samse database .fa aln_sa.sai SRR4493095_1.fastq > out_sa.sam

    However, while BowTie gives 123 number of matches for 100 reads, BWA gives just 100 number of matches (one for each, does not reporting if match in another position found). Can anybody help me why is this happening and how to solve this ? I give -n 0 option because, I want to find matching allowing no mismatch.

    Thanks in advance.

  • #2
    Originally posted by Arupsss View Post
    I am doing experiments with BWA and BowTie.
    Hi, could you please post your bowtie command, as well, for completeness?
    Why did you set -k to 41?
    How long are your reads?

    Comment


    • #3
      Originally posted by sdvie View Post
      Hi, could you please post your bowtie command, as well, for completeness?
      Here it is:

      ./bowtie -a -v 0 database SRR4493095_1.fastq out.txt

      Comment


      • #4
        Are you well aware of the options you are using in bwa?
        I am highlighting the ones that you are using or that you might consider using (from bwa 0.6.1):

        Code:
        bwa aln [options] <prefix> <in.fq>
        Options: [B]-n NUM    max #diff (int) or missing prob under 0.02 err rate (float) [0.04][/B]
                 -o INT    maximum number or fraction of gap opens [1]
                 -e INT    maximum number of gap extensions, -1 for disabling long gaps [-1]
                 -i INT    do not put an indel within INT bp towards the ends [5]
                 -d INT    maximum occurrences for extending a long deletion [10]
                 [B]-l INT    seed length [32][/B]
                 [B]-k INT    maximum differences in the seed [2][/B]
                 -m INT    maximum entries in the queue [2000000]
                 -t INT    number of threads [1]
                 -M INT    mismatch penalty [3]
                 -O INT    gap open penalty [11]
                 -E INT    gap extension penalty [4]
                 -R INT    stop searching when there are >INT equally best hits [30]
                 -q INT    quality threshold for read trimming down to 35bp [0]
                 -f FILE   file to write output to instead of stdout
                 -B INT    length of barcode
                 -c        input sequences are in the color space
                 -L        log-scaled gap penalty for long deletions
                 [B]-N        non-iterative mode: search for all n-difference hits (slooow)[/B]
                 -I        the input is in the Illumina 1.3+ FASTQ-like format
                 -b        the input read file is in the BAM format
                 -0        use single-end reads only (effective with -b)
                 -1        use the 1st read in a pair (effective with -b)
                 -2        use the 2nd read in a pair (effective with -b)
        hope that helps,
        cheers,
        Sophia

        Comment


        • #5
          Thanks. But, from the above,you mean to use N option ? Because, I use only n and k options, not others.

          Comment


          • #6
            Originally posted by Arupsss View Post
            Thanks. But, from the above,you mean to use N option ? Because, I use only n and k options, not others.
            yes.
            And -k indicates the number of mismatches in the seed, and therefore, 41 is an unusual value for that. Why did you set it to 41?

            see here:
            BWA manual

            cheers

            Comment


            • #7
              Originally posted by Arupsss View Post
              I am doing experiments with BWA and BowTie. Now, I am finding alignments using command:


              ./bwa aln -n 0 -k 41 database.fa SRR4493095_1.fastq > aln_sa.sai

              and

              ./bwa samse database .fa aln_sa.sai SRR4493095_1.fastq > out_sa.sam

              However, while BowTie gives 123 number of matches for 100 reads, BWA gives just 100 number of matches (one for each, does not reporting if match in another position found). Can anybody help me why is this happening and how to solve this ? I give -n 0 option because, I want to find matching allowing no mismatch.

              Thanks in advance.
              That's how bwa works. It only returns on position when a read maps multiple times, it just picks one randomly. However, one of the tags in the .sam entry will contain the other positions where the read mapped equally well.

              Comment

              Latest Articles

              Collapse

              • seqadmin
                Recent Developments in Metagenomics
                by seqadmin





                Metagenomics has improved the way researchers study microorganisms across diverse environments. Historically, studying microorganisms relied on culturing them in the lab, a method that limits the investigation of many species since most are unculturable1. Metagenomics overcomes these issues by allowing the study of microorganisms regardless of their ability to be cultured or the environments they inhabit. Over time, the field has evolved, especially with the advent...
                09-23-2024, 06:35 AM
              • seqadmin
                Understanding Genetic Influence on Infectious Disease
                by seqadmin




                During the COVID-19 pandemic, scientists observed that while some individuals experienced severe illness when infected with SARS-CoV-2, others were barely affected. These disparities left researchers and clinicians wondering what causes the wide variations in response to viral infections and what role genetics plays.

                Jean-Laurent Casanova, M.D., Ph.D., Professor at Rockefeller University, is a leading expert in this crossover between genetics and infectious...
                09-09-2024, 10:59 AM

              ad_right_rmr

              Collapse

              News

              Collapse

              Topics Statistics Last Post
              Started by seqadmin, 10-02-2024, 04:51 AM
              0 responses
              13 views
              0 likes
              Last Post seqadmin  
              Started by seqadmin, 10-01-2024, 07:10 AM
              0 responses
              21 views
              0 likes
              Last Post seqadmin  
              Started by seqadmin, 09-30-2024, 08:33 AM
              0 responses
              25 views
              0 likes
              Last Post seqadmin  
              Started by seqadmin, 09-26-2024, 12:57 PM
              0 responses
              18 views
              0 likes
              Last Post seqadmin  
              Working...
              X