Unconfigured Ad

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • totalnew
    Member
    • Apr 2009
    • 46

    BWA questions

    Hi,

    I have few questions about bwa,

    1. Is it necessary to generate a bunch of files when I do the indexing, I know .bwt, may be useful for alignment, but files like .pac are not being used somewhere, right?

    2. for the amb and ann files, I know they represent the n_holes and n_seqs elements, but how to read them.

    3. If I want to compare the results with Maq, which output file contains the error rate, or other stats.

    thanks
  • totalnew
    Member
    • Apr 2009
    • 46

    #2
    I got the sam file by running against human genome, and generate the bam file by samtools, but it display nothing if I use the command of :

    samtools tview aln.bam chr1.fasta

    Is it because the bam file is too large?

    thanks

    Comment

    • lh3
      Senior Member
      • Feb 2008
      • 686

      #3
      1. all files are necessary.

      3. bwa does alignment but does not give stats. You need to parse the result.

      About samtools, in the manual page, you will find this sentence "Note that if the region showed on the screen contains no mapped reads, a blank screen will be seen." Sorry for the confusion.

      Comment

      • ElMichael
        Member
        • Jun 2009
        • 31

        #4
        Hi,
        How could I use option "div" for constructing BWT index? I've installed libdivsufsort, however, when I ran
        bwa index -a div
        I got an error message "[bwt_pac2bwt] libdivsufsort is not compiled in. Abort!"

        thanks

        Comment

        • totalnew
          Member
          • Apr 2009
          • 46

          #5
          Hi, EIMichael

          I never used div option, I guess you should use the right command syntax: bwa index -a div xxx.fasta, right?

          You may need to make sure you have enough memory since Divsufsort lib requires large memory in order to do BWT, and -a div doesn't work for long genomes. On the other side, you probably need to put the divsufsort.h file in the same directory that you do the indexing. This is just a guess, since _DIVBWT should be defined in the source code, however I didn't find out where it was defined, so I have no idea if div really works.

          Comment

          • ElMichael
            Member
            • Jun 2009
            • 31

            #6
            totalnew, thanks for your reply!
            Originally posted by totalnew View Post
            I guess you should use the right command syntax: bwa index -a div xxx.fasta, right?
            Yes, sorry, I simply didn't write the command's ending in my previous post.

            You may need to make sure you have enough memory since Divsufsort lib requires large memory in order to do BWT, and -a div doesn't work for long genomes.
            I use 16 GB RAM. Btw, I thought that only -a is has this restriction for long genomes?

            On the other side, you probably need to put the divsufsort.h file in the same directory that you do the indexing.
            I put it, but it didn't help. Anyway, thanks for your advice.

            Comment

            • totalnew
              Member
              • Apr 2009
              • 46

              #7
              Acutally, I have the same question about div, I checked the source code of bwa, -a div doesn't work for long genomes for sure. As I mentioned earlier, in the source code,

              #ifdef _DIVBWT
              divbwt...
              #else
              "libdivsufsort is not compiled in."


              But I am failed to find where _DIVBWT was defined, so I am not sure how div works. If you could figure that out, let me know, thanks.

              Comment

              • totalnew
                Member
                • Apr 2009
                • 46

                #8
                I have a question about mapping quality. Now I have a sam file, the MAPQ field is all 255 (255 applied on the assumption that the alignment is highly accurate). When I calculate MAPQ, should I do it as bwa does:

                23 - (4.343* log(255) +0.5 )

                Or how can I accurately get MAPQ during alignment?

                Comment

                • nilshomer
                  Nils Homer
                  • Nov 2008
                  • 1283

                  #9
                  Originally posted by totalnew View Post
                  I have a question about mapping quality. Now I have a sam file, the MAPQ field is all 255 (255 applied on the assumption that the alignment is highly accurate). When I calculate MAPQ, should I do it as bwa does:

                  23 - (4.343* log(255) +0.5 )

                  Or how can I accurately get MAPQ during alignment?
                  The mapping quality should depend on the sensitivity of your aligner settings (tolerant up to how many mismatches?), quality of the reads, etc. MAQ's supplemental materials has a thorough discussion.

                  Comment

                  • totalnew
                    Member
                    • Apr 2009
                    • 46

                    #10
                    I have another question about bwa output. I am processing the c-elegans libs. The read length is 42. During the process of generating suffix array, the maximum edit distance should be automatically chosen for different read lengths unless the max_Diff is specified by option -n INT.

                    [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 will come up with above list, so I assume that 42 reads will have the max_diff = 3 or 4. But the sam file I got has the read with NM:i:5 in TAG field which means edit distance is 5. But the max_diff has been fixed to 3 or 4, why that happened? (This is a PE lib)

                    thanks
                    Last edited by totalnew; 07-09-2009, 03:57 PM.

                    Comment

                    • totalnew
                      Member
                      • Apr 2009
                      • 46

                      #11
                      Any answers for above question? Thank you.

                      Comment

                      • ech
                        Junior Member
                        • Jul 2009
                        • 7

                        #12
                        solid reads support?

                        Is there a plan for solid reads support?

                        Comment

                        • nilshomer
                          Nils Homer
                          • Nov 2008
                          • 1283

                          #13
                          Originally posted by ech View Post
                          Is there a plan for solid reads support?
                          SOLiD reads are supported by BWQ as well as aligners including BFAST, Corona-lite, MAQ, and SHRiMP.

                          Comment

                          • joa_ds
                            Member
                            • Dec 2008
                            • 52

                            #14
                            I happen to have some problems using BWA ... I really need to index short reads (i.e. 16S RNA).

                            I understand i need to install the additional package. So I installed it, but still an error.

                            Code:
                            [root@athos libdivsufsort-2.0.0]# make install
                            [ 44%] Built target divsufsort
                            [ 55%] Built target bwt
                            [ 66%] Built target mksary
                            [ 77%] Built target sasearch
                            [ 88%] Built target suftest
                            [100%] Built target unbwt
                            Install the project...
                            -- Install configuration: "Release"
                            -- Installing /usr/local/lib/pkgconfig/libdivsufsort.pc
                            -- Installing /usr/local/include/divsufsort.h
                            -- Installing /usr/local/lib/libdivsufsort.so.3.0.0
                            [root@athos libdivsufsort-2.0.0]# exit
                            exit
                            [joachim@athos antarctica]$ cd bwa/bwa-0.5.8a
                            [joachim@athos bwa-0.5.8a]$ ./bwa index -a div ../../16S_references.fasta
                            [bwa_index] Pack FASTA... 0.04 sec
                            [bwa_index] Reverse the packed sequence... 0.01 sec
                            [bwa_index] Construct BWT for the packed sequence...
                            [bwt_pac2bwt] libdivsufsort is not compiled in. Abort!
                            Aborted
                            which file needs to be in which directory?

                            Comment

                            • lh3
                              Senior Member
                              • Feb 2008
                              • 686

                              #15
                              just use "-a is"

                              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, 07-24-2026, 12:17 PM
                              0 responses
                              34 views
                              0 reactions
                              Last Post SEQadmin2  
                              Started by SEQadmin2, 07-23-2026, 11:41 AM
                              0 responses
                              25 views
                              0 reactions
                              Last Post SEQadmin2  
                              Started by SEQadmin2, 07-20-2026, 11:10 AM
                              0 responses
                              217 views
                              0 reactions
                              Last Post SEQadmin2  
                              Started by SEQadmin2, 07-13-2026, 10:26 AM
                              0 responses
                              80 views
                              0 reactions
                              Last Post SEQadmin2  
                              Working...