Unconfigured Ad

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • krobison
    Senior Member
    • Nov 2007
    • 734

    Why no multithreading for BWA sampe/samse?

    BWA in the align mode (generating the indices of reads on chromosomes) has multiple threads as an option but doesn't seem to have this for generating the actual alignments



    Is it generally I/O-bound (waiting on disk) when doing the SAM generation? Or is this just something on the to-do list?
  • lh3
    Senior Member
    • Feb 2008
    • 686

    #2
    To implement multi-threading, we need a lock-free hash table; otherwise the hash table will be frequently locked and I guess a lot of CPU time will be spent on frequent locking. More importantly, samse is much faster than aln; sampe is also faster especially for >50bp reads. Multithreading them will not help the wall clock speed greatly. Aln is the speed bottleneck, so it gets multithreaded.

    Comment

    • krobison
      Senior Member
      • Nov 2007
      • 734

      #3
      THANKS! That clears things up.

      Comment

      • miron
        Junior Member
        • Feb 2010
        • 2

        #4
        I've been spending today doing performance testing on Illumina reads - 36 bp per read.

        I am seeing the following performance:

        aln: 2900 reads per second per CPU core
        sampe: 3300 reads per second

        So with four cores, aln is 3 times faster than sampe. Are you seeing different performance?

        With these numbers, the performance is limited by sampe and implementing multithreading will be a big win.

        Comment

        • lh3
          Senior Member
          • Feb 2008
          • 686

          #5
          I guess sampe is 3300 read pairs per second. It is twice faster than aln in terms of #reads per CPU core. In addition, you will find sampe is even faster for 70bp reads which is becoming available to many labs. A 36bp read has many locations and bwa will consider all of them in pairing. 70bp has much fewer occurrences. That is also why bwa does not work well for 25bp SOLiD reads; sampe will be very slower.

          I know this issue from the very beginning, but implementing a thread-safe/lock-free hash table is not that easy. Thanks anyway.

          EDIT: what is this hash table for, in case someone is curious. The bottleneck in pairing is to convert suffix array coordinates to chromosomal coordinates especially for a highly repetitive read. Bwa uses a hash table to cache large SA intervals such that a large interval that has been converted to chromosome positions will not be converted again. This hash table is global, which adds difficulty to multithreading.
          Last edited by lh3; 02-19-2010, 08:23 PM.

          Comment

          • miron
            Junior Member
            • Feb 2010
            • 2

            #6
            The sampe figure is per read, not per pair. Are you seeing different numbers in your experience?

            Also, because sampe requires 3.5GB of RAM, it's not possible to run more than one on an 8GB machine where other things are going on.

            I do understand that there are challenges in implementation and that read lengths are probably going to continue increasing.

            Comment

            Latest Articles

            Collapse

            • GATTACAT
              Reply to Nine Things a Sample Prep Scientist Thinks About Before Sequencing
              by GATTACAT
              Love this - good data definitely starts from good input, and poor input can only give relatively poor data. I particularly like the mention of Nanodrop/absorbance based methods for quantification. It's such a toss up if you'll get an accurate reading or what amounts to a randomly generated number, and a lot of library/sequencing related issues can be traced back to poor quant.
              07-01-2026, 11:43 AM
            • SEQadmin2
              Nine Things a Sample Prep Scientist Thinks About Before Sequencing
              by SEQadmin2


              I’m not a sequencing expert. I’m a purification scientist who uses NGS to evaluate workflows my group develops. With this perspective, we think about the sample first and the NGS workflow second. The sequencer is an exceptionally honest reporter, but it can only report on what you give it, so whether you get clean, interpretable data from an NGS workflow is largely determined before you begin.

              Here are nine questions we think about, in roughly the order they matter, before...
              06-18-2026, 07:11 AM

            ad_right_rmr

            Collapse

            News

            Collapse

            Topics Statistics Last Post
            Started by SEQadmin2, 07-02-2026, 11:08 AM
            0 responses
            10 views
            0 reactions
            Last Post SEQadmin2  
            Started by SEQadmin2, 06-30-2026, 05:37 AM
            0 responses
            13 views
            0 reactions
            Last Post SEQadmin2  
            Started by SEQadmin2, 06-26-2026, 11:10 AM
            0 responses
            20 views
            0 reactions
            Last Post SEQadmin2  
            Started by SEQadmin2, 06-17-2026, 06:09 AM
            0 responses
            54 views
            0 reactions
            Last Post SEQadmin2  
            Working...