Unconfigured Ad

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

    #1

    BWA - Error in Run Time

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

    Code:
    bwa index -a bwtsw hg19.fa
    Now I am trying to find alignment using command:

    Code:
    $ ./bwa aln hg.fa SRR493081_1.fastq > aln_sa.sai
    [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
    [bwa_aln] fail to locate the index
    [main] Version: 0.6.2-r126
    [main] CMD: ./bwa aln hg.fa SRR493081_1.fastq
    [main] Real time: 0.000 sec; CPU: 0.010 sec
    However, gives above error. Can anybody helps me why is this giving such error.
  • Applemelon
    Junior Member
    • Jun 2012
    • 4

    #2
    According to your statement,
    this commond
    $ ./bwa aln hg.fa SRR493081_1.fastq > aln_sa.sai

    should be

    $ ./bwa aln hg19.fa SRR493081_1.fastq > aln_sa.sai

    Because hg.fa is different with hg19.fa, bwa can't find the index.

    Comment

    • kellywilliams
      Junior Member
      • Oct 2010
      • 8

      #3
      I have a similar problem and cannot get bwa alignment to work.

      I completed the index successfully
      Code:
      $ bwa index -a bwtsw -p hg19 hg19.fa
      bwa_index] Pack FASTA... 27.96 sec
      [bwa_index] Construct BWT for the packed sequence...
      [BWTIncCreate] textLength=6274322528, availableWord=453484340
      [BWTIncConstructFromPacked] 10 iterations done. 100000000 characters processed.
      [BWTIncConstructFromPacked] 20 iterations done. 200000000 characters processed.
      .
      .
      .
      [BWTIncConstructFromPacked] 690 iterations done. 6264217232 characters processed.
      [bwt_gen] Finished constructing BWT in 695 iterations.
      [bwa_index] 3556.44 seconds elapse.
      [bwa_index] Update BWT... 21.30 sec
      [bwa_index] Pack forward-only FASTA... 18.66 sec
      [bwa_index] Construct SA from BWT and Occ... 1118.66 sec
      [main] Version: 0.7.5a-r405
      [main] CMD: bwa index -a bwtsw -p hg19 hg19.fa
      [main] Real time: 4768.228 sec; CPU: 4743.022 sec
      then when I attempted the alignment:

      Code:
      $ bwa aln -q 28 -t 12 hg19.fa sample1_1.fastq.gz > sample1_1.sai
      [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
      [bwa_aln] fail to locate the index
      Even when I use the absolute path i get :
      Code:
      $ bwa aln -q 28 -t 12 /NGSsoftware/hg19.fa 8-A182_1.fastq.gz > 8-A182_1.sai
      [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
      [bwa_aln] fail to locate the index
      I was wondering if there were permission problems but even after changing permissions of to all users rwx it still will not work.

      Any suggestions? I am using Mac OSX 10.8.4 with Xcode installed.

      Comment

      • GenoMax
        Senior Member
        • Feb 2008
        • 7142

        #4
        Since you used "-p hg19" as the prefix for the output database you need to include that as the prefix for the database.

        Try the following:

        Code:
        $ bwa aln -q 28 -t 12 /NGSsoftware/hg19 8-A182_1.fastq.gz > 8-A182_1.sai

        Comment

        • kellywilliams
          Junior Member
          • Oct 2010
          • 8

          #5
          Originally posted by GenoMax View Post
          Since you used "-p hg19" as the prefix for the output database you need to include that as the prefix for the database.

          Try the following:

          Code:
          $ bwa aln -q 28 -t 12 /NGSsoftware/hg19 8-A182_1.fastq.gz > 8-A182_1.sai
          Thank you GenoMax, this worked perfectly until I tried to perform bwa sampe:

          Code:
          $ bwa sampe –r '@RG\tID:sample8\tLB:sample8\tSM:sample8\tPL:ILLUMINA' /NGSsoftware/hg19  8-A182_1.sai  8-A182_2.sai 8-A182_1.fastq.gz 8-A182_2.fastq.gz 8-A182.sam
          [bwa_sai2sam_pe] fail to locate the index
          If I remove the -r argument, bwa sampe will run, but I wish to have the read groups added.

          Comment

          • GenoMax
            Senior Member
            • Feb 2008
            • 7142

            #6
            Can you post a listing of the files in the /NGSsoftware directory?

            Code:
            $ ls -l /NGSsoftware/hg19*

            Comment

            • kellywilliams
              Junior Member
              • Oct 2010
              • 8

              #7
              Here are the files

              Code:
              $ ls -l /NGSsoftware/hg19*
              -rw-r--r--  1 kwilliams  wheel        6693  5 Sep 13:38 /NGSsoftware/hg19.amb
              -rw-r--r--  1 kwilliams  wheel        3635  5 Sep 13:38 /NGSsoftware/hg19.ann
              -rw-r--r--  1 kwilliams  wheel  3101804844  5 Sep 13:38 /NGSsoftware/hg19.bwt
              -rw-r--r--  1 kwilliams  wheel  3163842112  5 Sep 08:06 /NGSsoftware/hg19.fa
              -rw-r--r--  1 kwilliams  wheel   775451187  5 Sep 13:38 /NGSsoftware/hg19.pac
              -rw-r--r--  1 kwilliams  wheel  1550902424  5 Sep 13:57 /NGSsoftware/hg19.sa

              Comment

              • kellywilliams
                Junior Member
                • Oct 2010
                • 8

                #8
                Hi, just wondering if anyone has insight into the problem above regarding read groups and bwa?
                Many thanks.

                Comment

                • GenoMax
                  Senior Member
                  • Feb 2008
                  • 7142

                  #9
                  Have you tried to run the command with double quotes (") instead of single?

                  Code:
                  $ bwa sampe –r "@RG\tID:sample8\tLB:sample8\tSM:sample8\tPL:ILLUMINA" /NGSsoftware/hg19  8-A182_1.sai  8-A182_2.sai 8-A182_1.fastq.gz 8-A182_2.fastq.gz 8-A182.sam
                  It is confusing that you chose to use "hg19" as your prefix name for the indexes.
                  Last edited by GenoMax; 09-15-2013, 02:07 PM.

                  Comment

                  • kellywilliams
                    Junior Member
                    • Oct 2010
                    • 8

                    #10
                    Yes, that also comes up with
                    Code:
                    [bwa_sai2sam_pe] fail to locate the index

                    Comment

                    • GenoMax
                      Senior Member
                      • Feb 2008
                      • 7142

                      #11
                      Should have asked this before. Are you using a Mac? Did you compile bwa yourself?

                      Comment

                      • kellywilliams
                        Junior Member
                        • Oct 2010
                        • 8

                        #12
                        Yes I am using a mac. I have Xcode installed and compiled bwa using Homebrew.

                        Comment

                        • GenoMax
                          Senior Member
                          • Feb 2008
                          • 7142

                          #13
                          There were some problems with bwa on a Mac in past (http://seqanswers.com/forums/showthread.php?t=24133). I am not sure if those persist/are still relevant. Perhaps someone else who is currently running the latest bwa (0.7.5) on Mac can confirm.

                          What version of OS X (and Xcode) are you running?

                          Comment

                          Latest Articles

                          Collapse

                          • 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
                          • 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, Today, 02:55 AM
                          0 responses
                          5 views
                          0 reactions
                          Last Post SEQadmin2  
                          Started by SEQadmin2, 07-24-2026, 12:17 PM
                          0 responses
                          11 views
                          0 reactions
                          Last Post SEQadmin2  
                          Started by SEQadmin2, 07-23-2026, 11:41 AM
                          0 responses
                          11 views
                          0 reactions
                          Last Post SEQadmin2  
                          Started by SEQadmin2, 07-20-2026, 11:10 AM
                          0 responses
                          24 views
                          0 reactions
                          Last Post SEQadmin2  
                          Working...