Unconfigured Ad

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • ramya1
    Junior Member
    • Mar 2013
    • 4

    Bwa mem is exiting with segmentation fault for large contigs (> 0.4Mbp)

    Hello all,

    I am using bwa mem to align contigs to a reference genome and I observed that it is exiting with an error message "Segmentation Fault". For example:

    [M::main_mem] read 1 sequences (405327 bp)...
    Segmentation fault

    Upon closer examination, I found that whenever the size of input sequence >=0.4 Mbp, I see this message. In bwa mem page (http://bio-bwa.sourceforge.net/bwa.shtml), it is mentioned that it can handle contigs upto 1Mbp. I am unable to figure out the source of this upper limit at 0.4Mbp. Is it specific to my computer or is there any parameter by which I can assign more memory to bwa?
    I am currently thinking of breaking contigs greater than 0.4Mbp into overlapping smaller contigs of size 399999. Is there any other way to go about it.

    Thanks all,
    Ramya
  • dpryan
    Devon Ryan
    • Jul 2011
    • 3478

    #2
    What happens to memory usage during this? Another cause might be just that bwa is trying to use more memory than you have.

    Comment

    • lindenb
      Senior Member
      • Apr 2010
      • 143

      #3
      cross posted: https://www.biostars.org/p/98534/

      Comment

      • ramya1
        Junior Member
        • Mar 2013
        • 4

        #4
        @dpryan I checked the memory usage during the few seconds before it exits with the error.
        The stats before running the process were:
        Cpu(s): 0.7%us, 0.1%sy, 0.0%ni, 99.1%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st
        Mem: 16446968k total, 4512156k used, 11934812k free, 138536k buffers
        Swap: 31249404k total, 1169612k used, 30079792k free, 1910296k cached

        The stats while running the process were:
        Cpu(s): 10.9%us, 0.3%sy, 0.0%ni, 88.7%id, 0.1%wa, 0.0%hi, 0.0%si, 0.0%st
        Mem: 16446968k total, 4606148k used, 11840820k free, 138592k buffers
        Swap: 31249404k total, 1169588k used, 30079816k free, 1910316k cached

        As you can see, there is not much of a difference in terms of memory usage.

        @lindenb I am sorry but was I not supposed to cross post. I just tried to get help from any quarter I could. If the two forums are equivalent (wrt the people I can reach out to), in future I shall restrict myself to one.

        I ran bwa-sw and it ran without giving me any errors, so this solves my problem for the time being. I am aligning contigs which are expected to be very similar to the reference sequence wise, differing mostly in chromosomal rearrangements. Thus, I expect both, bwa-sw and bwa-mem to do equally well, accuracy wise. Still I will run both for the same dataset to compare the two.

        Thanks,
        Ramya

        Comment

        • ramya1
          Junior Member
          • Mar 2013
          • 4

          #5
          Dear all,

          For completion purposes, I wish to report the solution to my problem. As it turns out, I was using bwa-0.7.0 version which is known to have bugs. Thus, on the sugestion of lh3-Alt (https://www.biostars.org/p/98534/#98886), I used the latest version i.e. bwa-0.7.8 and I did not get any segmentation faults.

          Thanks all for the help and time :-)
          Ramya

          Comment

          Latest Articles

          Collapse

          • 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
          • SEQadmin2
            From Collection to Sequencing: Why Sample Preparation and Preservation Define Sequencing Data
            by SEQadmin2


            Data variability is still an issue in sequencing technologies despite the advances in reproducibility and accuracy of these platforms. But the problem does not originate in the sequencing itself, but in the previous steps, before the sample reaches the sequencer.


            The first step is collection, followed by preservation and sample preparation for analysis. Most scientists overlook those steps, but not being careful might just be skewing the experiment’s results.
            ...
            06-02-2026, 10:05 AM

          ad_right_rmr

          Collapse

          News

          Collapse

          Topics Statistics Last Post
          Started by SEQadmin2, 06-17-2026, 06:09 AM
          0 responses
          26 views
          0 reactions
          Last Post SEQadmin2  
          Started by SEQadmin2, 06-09-2026, 11:58 AM
          0 responses
          43 views
          0 reactions
          Last Post SEQadmin2  
          Started by SEQadmin2, 06-05-2026, 10:09 AM
          0 responses
          48 views
          0 reactions
          Last Post SEQadmin2  
          Started by SEQadmin2, 06-04-2026, 08:59 AM
          0 responses
          49 views
          0 reactions
          Last Post SEQadmin2  
          Working...