Unconfigured Ad

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • DrD2009
    Member
    • Oct 2009
    • 88

    Bowtie "Segmentation Error"

    Hello everyone.

    I have started the "meat" of my data analysis and I'm already running into some problems.

    I have Solexa (fq) data and I have attempted to align using Bowtie against the reference genome, only ~1% of the 5.8 million reads mapped to the genome. With this results I consulted the individual who sequenced our data to discover adapters were still attached. I used the fastx_clipper from the FastX Toolkit to remove the adapters and realign the data. The alignment processed for 9hrs, and did produce output, but the "-t" function did not list the % mapped and the % not mapped and the end of the run said "Segmentation Error".

    brandon@brandon-desktop:~/bowtie$ bowtie -p 4 -t -a indexes/tair8 ~/Desktop/s_1_old.fq ~/Desktop/s_1_old.map
    Time loading forward index: 00:00:00
    Time loading mirror index: 00:00:00
    Seeded quality full-index search: 09:17:53
    Time searching: 09:17:54
    Segmentation Error

    Does anyone know what that means? I've tried looking it up, but can't seem to find a reference to it anywhere.



    Thanks,
    Brandon
  • Ben Langmead
    Senior Member
    • Sep 2008
    • 200

    #2
    Hi Brandon,

    What version are you using? Do smaller examples (e.g using -u) also give the segmentation fault?

    Thanks,
    Ben

    Comment

    • DrD2009
      Member
      • Oct 2009
      • 88

      #3
      Ben,

      Thank you for getting back with me so quickly.

      Bowtie version: 0.12.3

      I didn't try the -u function previously, but have tried it with varying sizes and then ran the whole set. Running the full set caused the "Segmentation fault".

      brandon@brandon-desktop:~/bio/bowtie$ bowtie -p 3 -t -a -S -u 4000 indexes/tair8 ~/Desktop/s_1_old.fq ~/Desktop/s_1_old4.sam
      Time loading forward index: 00:00:01
      Time loading mirror index: 00:00:01
      Seeded quality full-index search: 00:02:00
      # reads processed: 4000
      # reads with at least one reported alignment: 3595 (89.88%)
      # reads that failed to align: 405 (10.12%)
      Reported 3559492 alignments to 1 output stream(s)
      Time searching: 00:02:03
      Overall time: 00:02:03

      brandon@brandon-desktop:~/bio/bowtie$ bowtie -p 3 -t -a -S -u 7000 indexes/tair8 ~/Desktop/s_1_old.fq ~/Desktop/s_1_old7.sam
      Time loading forward index: 00:00:00
      Time loading mirror index: 00:00:01
      Seeded quality full-index search: 02:16:49
      # reads processed: 7000
      # reads with at least one reported alignment: 6302 (90.03%)
      # reads that failed to align: 698 (9.97%)
      Reported 8799053 alignments to 1 output stream(s)
      Time searching: 02:16:50
      Overall time: 02:16:51

      brandon@brandon-desktop:~/bio/bowtie$ bowtie -p 4 -t -a -S indexes/tair8 ~/Desktop/s_1_old.fq ~/Desktop/s_1_old.sam
      Time loading forward index: 00:00:01
      Time loading mirror index: 00:00:00
      Seeded quality full-index search: 14:03:25
      Time searching: 14:03:26
      Overall time: 14:03:26
      Command: bowtie -p 4 -t -a -S indexes/tair8 /home/brandon/Desktop/s_1_old.fq /home/brandon/Desktop/s_1_old.sam
      [1]+ Killed bowtie -p 3 -t -a -S indexes/tair8 ~/Desktop/s_1_old.fq ~/Desktop/s_1.sam
      Segmentation fault

      Comment

      • DrD2009
        Member
        • Oct 2009
        • 88

        #4
        I experienced another problem today that I have not seen before.

        brandon@brandon-desktop:~/bio/bowtie$ bowtie -p 4 -t -a -S indexes/tair9 ~/Desktop/162_small_s1_080822.fq ~/Desktop/162_small_s1_080822.sam
        Time loading forward index: 00:00:01
        Time loading mirror index: 00:00:00
        terminate called after throwing an instance of 'std::bad_alloc'
        what(): std::bad_alloc
        Aborted


        I read into the "std::bad_alloc" and it has to deal with the allocation of memory. I've never seen this come up until now. What can I do to fix this? An alignment file was created, but I'm unsure of the percentage aligned, not aligned, etc.

        Thanks.

        Comment

        • manoj123
          Junior Member
          • Dec 2009
          • 2

          #5
          trying out --chunkmbs 256 parameter does any good?

          Comment

          • DrD2009
            Member
            • Oct 2009
            • 88

            #6
            manoj123,

            Thanks. I just read the Bowtie manual about that command and it looks like it should take care of my problem. I'm running the alignment now. *Fingers crossed*

            Comment

            • microphobe
              Junior Member
              • Sep 2009
              • 7

              #7
              I also had a persistent "segmentation fault" error in Bowtie at the same point in my data, regardless of which machine I used.

              The problem went away after I applied a pre-processing script that ensured uniform end-of-line markers, minimum read lengths, no empty lines, and also ensured that the length of the phred quality string equals the read length. This got rid of exactly 1 read from my dataset for whatever reason and it worked OK after that. Hope someone finds this helpful.

              Comment

              • badhikari
                Junior Member
                • Jan 2011
                • 4

                #8
                What script did you use? Was it from fastx tool kit or something you wrote?

                Comment

                • SEQond
                  Member
                  • Jul 2010
                  • 27

                  #9
                  I had the same error. I removed the -sam and used only bam as output and it worked without the segmentaton error. If later you need to convert the bam to sam there is always BEDTOOLS

                  Comment

                  • sirus7
                    Junior Member
                    • Aug 2013
                    • 3

                    #10
                    Hi everyone,

                    I recently performed small RNA sequencing on GA IIx. I did all my pre alignment using CASAVA v1.8, converting bcl to FASTQ file.

                    I used bowtie-0.12.7 to align my previously file that was pre aligned using CASAVA v1.7 but because i'm using CASAVA v1.8, bowtie-0.12.7 couldn't recognise my sequence.

                    I downloaded bowtie-1.0.0 but encountered segmentation fault as shown below.

                    I wrote a perl script as i'm aligning multiple samples to multiple small RNA index. Is there anything that i'm doing wrongly? I was also using the index built from previous version, could this be a reason?

                    running bowtie -p 12 /home/xiaohui/genome_ref/hg19/hg19/ucsc.hg19.fa.bowtie_genome -q /data/HK/s_18_sequence.txt.trim.L16 --phred33-quals -n 2 -y -nomaqround --al /data/HK/s_18_sequence.txt.trim.bowtie.hg19.n2.report --un /data/HK/s_18_sequence.txt.trim.bowtie.hg19.n2.unaligned.report > /data/HK/s_18_sequence.txt.trim.bowtie.hg19.n2.report.aligned

                    sh: line 1: 8854 Segmentation fault bowtie -p 12 /home/xiaohui/genome_ref/hg19/hg19/ucsc.hg19.fa.bowtie_genome -q /data/HK/s_18_sequence.txt.trim.L16 --phred33-quals -n 2 -y -nomaqround --al /data/HK/s_18_sequence.txt.trim.bowtie.hg19.n2.report --un /data/HK/s_18_sequence.txt.trim.bowtie.hg19.n2.unaligned.report > /data/HK/s_18_sequence.txt.trim.bowtie.hg19.n2.report.aligned

                    running bowtie -p 12 /home/xiaohui/genome_ref/miRNA/miRBase_hsa_Release19/miRBase_hsa_Release19 -q /data/HK/s_18_sequence.txt.trim.bowtie.hg19.n2.report --phred33-quals --best -n 0 -m 3 -y -nomaqround --al /data/HK/s_18_sequence.txt.trim.bowtie.miRBaseRelease19_mature.hsa.n0.report --un /data/HK/s_18_sequence.txt.trim.bowtie.miRBaseRelease19_mature.hsa.n0.report.unaligned > /data/HK/s_18_sequence.txt.trim.bowtie.miRBaseRelease19_mature.hsa.n0.report.aligned

                    Warning: Could not find any reads in "/data/HK/s_18_sequence.txt.trim.bowtie.hg19.n2.report"
                    # reads processed: 0
                    # reads with at least one reported alignment: 0 (0.00%)
                    # reads that failed to align: 0 (0.00%)
                    No alignments

                    running bowtie -p 12 /home/xiaohui/genome_ref/miRNA/miRBase_hsa_Release19_stemloop/miRBase_hsa_Release19_stemloop -q /data/HK/s_18_sequence.txt.trim.bowtie.miRBaseRelease19_mature.hsa.n0.report.unaligned --phred33-quals --best -n 0 -m 3 -y -nomaqround --al /data/HK/s_18_sequence.txt.trim.bowtie.miRNA_stemloop_MB19.n0.report --un /data/HK/s_18_sequence.txt.trim.bowtie.miRNA_stemloop_MB19.n0.report.unaligned > /data/HK/s_18_sequence.txt.trim.bowtie.miRNA_stemloop_MB19.n0.report.aligned

                    Warning: Could not open read file "/data/HK/s_18_sequence.txt.trim.bowtie.miRBaseRelease19_mature.hsa.n0.report.unaligned" for reading; skipping...
                    Command: bowtie -p 12 -q --phred33-quals --best -n 0 -m 3 -y -nomaqround --al /data/HK/s_18_sequence.txt.trim.bowtie.miRNA_stemloop_MB19.n0.report --un /data/HK/s_18_sequence.txt.trim.bowtie.miRNA_stemloop_MB19.n0.report.unaligned /home/xiaohui/genome_ref/miRNA/miRBase_hsa_Release19_stemloop/miRBase_hsa_Release19_stemloop /data/HK/s_18_sequence.txt.trim.bowtie.miRBaseRelease19_mature.hsa.n0.report.unaligned

                    running bowtie -p 12 /home/xiaohui/genome_ref/miRNA/tRNA_Genes_hg19_gtrnadb/hg19-tRNAs -q /data/HK/s_18_sequence.txt.trim.bowtie.miRNA_stemloop_MB19.n0.report.unaligned --phred33-quals --best -n 0 -m 3 -y -nomaqround --al /data/HK/s_18_sequence.txt.trim.bowtie.tRNA_Genes_hg19.n0.report --un /data/HK/s_18_sequence.txt.trim.bowtie.tRNA_Genes_hg19.n0.report.unaligned > /data/HK/s_18_sequence.txt.trim.bowtie.tRNA_Genes_hg19.n0.report.aligned

                    Comment

                    • dpryan
                      Devon Ryan
                      • Jul 2011
                      • 3478

                      #11
                      @Sirus7: Your problem will likely go away if you specify the command as listed in the bowtie manual: bowtie [options]* <ebwt> {-1 <m1> -2 <m2> | --12 <r> | <s>} [<hit>]

                      So, in your first example, try:

                      Code:
                      bowtie -p 12 -q --phred33-quals -n 2 -y -nomaqround --al /data/HK/s_18_sequence.txt.trim.bowtie.hg19.n2.report --un /data/HK/s_18_sequence.txt.trim.bowtie.hg19.n2.unaligned.report /home/xiaohui/genome_ref/hg19/hg19/ucsc.hg19.fa.bowtie_genome /data/HK/s_18_sequence.txt.trim.L16 > /data/HK/s_18_sequence.txt.trim.bowtie.hg19.n2.report.aligned

                      Comment

                      • sirus7
                        Junior Member
                        • Aug 2013
                        • 3

                        #12
                        Hi Dpryan,

                        Thanks for the fast response.

                        I've tried doing that before. The result was bowtie couldn't locate the Bowtie index as shown below. Is it because i'm running bowtie-1.0.0 on a bowtie-0.12.7 builted index


                        running bowtie -p 12 -n 2 -y -nomaqround --al /home/xiaohui/genome_ref/hg19/hg19/ucsc.hg19.fa.bowtie_genome -q /data/HK/s_18_sequence.txt.trim.L16 --phred33-quals /data/HK/s_18_sequence.txt.trim.bowtie.hg19.n2.report --un /data/HK/s_18_sequence.txt.trim.bowtie.hg19.n2.unaligned.report > /data/HK/s_18_sequence.txt.trim.bowtie.hg19.n2.report.aligned

                        Could not locate a Bowtie index corresponding to basename "/data/HK/s_18_sequence.txt.trim.L16"
                        Command: bowtie -p 12 -n 2 -y -nomaqround --al /home/xiaohui/genome_ref/hg19/hg19/ucsc.hg19.fa.bowtie_genome -q --phred33-quals --un /data/HK/s_18_sequence.txt.trim.bowtie.hg19.n2.unaligned.report /data/HK/s_18_sequence.txt.trim.L16 /data/HK/s_18_sequence.txt.trim.bowtie.hg19.n2.report

                        running bowtie -p 12 --phred33-quals --best -n 0 -m 3 -y -nomaqround --al /home/xiaohui/genome_ref/miRNA/miRBase_hsa_Release19/miRBase_hsa_Release19 -q /data/HK/s_18_sequence.txt.trim.bowtie.hg19.n2.report /data/HK/s_18_sequence.txt.trim.bowtie.miRBaseRelease19_mature.hsa.n0.report --un /data/HK/s_18_sequence.txt.trim.bowtie.miRBaseRelease19_mature.hsa.n0.report.unaligned > /data/HK/s_18_sequence.txt.trim.bowtie.miRBaseRelease19_mature.hsa.n0.report.aligned

                        Could not locate a Bowtie index corresponding to basename "/data/HK/s_18_sequence.txt.trim.bowtie.hg19.n2.report"
                        Command: bowtie -p 12 --phred33-quals --best -n 0 -m 3 -y -nomaqround --al /home/xiaohui/genome_ref/miRNA/miRBase_hsa_Release19/miRBase_hsa_Release19 -q --un /data/HK/s_18_sequence.txt.trim.bowtie.miRBaseRelease19_mature.hsa.n0.report.unaligned /data/HK/s_18_sequence.txt.trim.bowtie.hg19.n2.report /data/HK/s_18_sequence.txt.trim.bowtie.miRBaseRelease19_mature.hsa.n0.report

                        running bowtie -p 12 --phred33-quals --best -n 0 -m 3 -y -nomaqround --al /home/xiaohui/genome_ref/miRNA/miRBase_hsa_Release19_stemloop/miRBase_hsa_Release19_stemloop -q /data/HK/s_18_sequence.txt.trim.bowtie.miRBaseRelease19_mature.hsa.n0.report.unaligned /data/HK/s_18_sequence.txt.trim.bowtie.miRNA_stemloop_MB19.n0.report --un /data/HK/s_18_sequence.txt.trim.bowtie.miRNA_stemloop_MB19.n0.report.unaligned > /data/HK/s_18_sequence.txt.trim.bowtie.miRNA_stemloop_MB19.n0.report.aligned

                        Could not locate a Bowtie index corresponding to basename "/data/HK/s_18_sequence.txt.trim.bowtie.miRBaseRelease19_mature.hsa.n0.report.unaligned"
                        Command: bowtie -p 12 --phred33-quals --best -n 0 -m 3 -y -nomaqround --al /home/xiaohui/genome_ref/miRNA/miRBase_hsa_Release19_stemloop/miRBase_hsa_Release19_stemloop -q --un /data/HK/s_18_sequence.txt.trim.bowtie.miRNA_stemloop_MB19.n0.report.unaligned /data/HK/s_18_sequence.txt.trim.bowtie.miRBaseRelease19_mature.hsa.n0.report.unaligned /data/HK/s_18_sequence.txt.trim.bowtie.miRNA_stemloop_MB19.n0.report

                        running bowtie -p 12 --phred33-quals --best -n 0 -m 3 -y -nomaqround --al /home/xiaohui/genome_ref/miRNA/tRNA_Genes_hg19_gtrnadb/hg19-tRNAs -q /data/HK/s_18_sequence.txt.trim.bowtie.miRNA_stemloop_MB19.n0.report.unaligned /data/HK/s_18_sequence.txt.trim.bowtie.tRNA_Genes_hg19.n0.report --un /data/HK/s_18_sequence.txt.trim.bowtie.tRNA_Genes_hg19.n0.report.unaligned > /data/HK/s_18_sequence.txt.trim.bowtie.tRNA_Genes_hg19.n0.report.aligned

                        Comment

                        • dpryan
                          Devon Ryan
                          • Jul 2011
                          • 3478

                          #13
                          Originally posted by sirus7 View Post
                          Hi Dpryan,

                          Thanks for the fast response.

                          I've tried doing that before. The result was bowtie couldn't locate the Bowtie index as shown below. Is it because i'm running bowtie-1.0.0 on a bowtie-0.12.7 builted index


                          running bowtie -p 12 -n 2 -y -nomaqround --al /home/xiaohui/genome_ref/hg19/hg19/ucsc.hg19.fa.bowtie_genome -q /data/HK/s_18_sequence.txt.trim.L16 --phred33-quals /data/HK/s_18_sequence.txt.trim.bowtie.hg19.n2.report --un /data/HK/s_18_sequence.txt.trim.bowtie.hg19.n2.unaligned.report > /data/HK/s_18_sequence.txt.trim.bowtie.hg19.n2.report.aligned

                          Could not locate a Bowtie index corresponding to basename "/data/HK/s_18_sequence.txt.trim.L16"
                          Command: bowtie -p 12 -n 2 -y -nomaqround --al /home/xiaohui/genome_ref/hg19/hg19/ucsc.hg19.fa.bowtie_genome -q --phred33-quals --un /data/HK/s_18_sequence.txt.trim.bowtie.hg19.n2.unaligned.report /data/HK/s_18_sequence.txt.trim.L16 /data/HK/s_18_sequence.txt.trim.bowtie.hg19.n2.report
                          This isn't the right order, read my post above (don't put the fastq file after "-q"!). Also you can leave out "-q" and "--phred33-quals", they're the defaults. Furthermore, you're telling bowtie to overwrite the genome index, that's a really bad idea.

                          The various other instances you posted have similar problems, often placing "--un" or "--al" in the wrong place. Please read both my post and the bowtie manual and your life will be much easier. Also, when you run into problems like this, the logical course of action is:

                          1) Stop using a script. Do you get the same error if you manually type the command? You will in this case, but otherwise it could be an error in the script itself and you wouldn't be able to diagnose the problem.
                          2) Make the smallest possible command that does not produce an error. That will be:
                          Code:
                           bowtie /home/xiaohui/genome_ref/hg19/hg19/ucsc.hg19.fa.bowtie_genome /data/HK/s_18_sequence.txt.trim.L16
                          If you type that command (and your index wasn't already overwritten by your previous attempts), you'll probably get a bunch of alignments printed to the screen.
                          3) Once you have a small working command, add more options one at a time. All options should come directly after the word "bowtie" above. Do NOT try to put them between the index and the reads or otherwise intersperse them. If you get an error, the odds are very high that you put things in the wrong place.
                          4) Only once all of the above works, should you try to script things.

                          BTW, you really should have at least tried to copy and paste in the command that I originally posted, it likely would have worked.

                          You'll also want to eventually add the "-S" option to output in SAM format, since that's the format expected by everything these days.

                          Edit: it should be "--nomaqround", not "-nomaqround"...I missed that.
                          Last edited by dpryan; 08-12-2013, 04:57 AM. Reason: Missed the "-nomaqround" issue

                          Comment

                          • sirus7
                            Junior Member
                            • Aug 2013
                            • 3

                            #14
                            Sorry dpryan, I was too quick at jumping into a wrong conclusion, thinking that I have tried that code before. Will try your code without the script the next time. Sorry.

                            Comment

                            Latest Articles

                            Collapse

                            • 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
                            • SEQadmin2
                              Single-Cell Sequencing at an Inflection Point: Early Impacts of New Platforms and Emerging Trends
                              by SEQadmin2


                              With the launch of new single-cell sequencing platforms in 2026, the field stands at an exciting inflection point. This article surveys the most impactful advances in the field and discusses how they’re reshaping research in cancer, immunology, and beyond.


                              Introduction

                              Single-cell sequencing technologies have undergone remarkable advances over the past decade, transitioning from low-throughput experimental approaches to highly scalable platforms capable of...
                              05-22-2026, 06:42 AM
                            • SEQadmin2
                              Environmental Genomics in the Age of NGS: From Microbes to Conservation Strategies
                              by SEQadmin2

                              Studying ecosystems means dealing with complex, multi-species communities that are hard to observe at scale. This complexity, however, hides many important questions to be answered, from how biogeochemical cycles work and how climate change can affect species distribution to how conservation strategies can work best.


                              Genomics, particularly since the expansion of NGS, has transformed ecosystem ecology. By sequencing environmental DNA, we can now assess biodiversity without direct...
                              05-06-2026, 09:04 AM

                            ad_right_rmr

                            Collapse

                            News

                            Collapse

                            Topics Statistics Last Post
                            Started by SEQadmin2, Yesterday, 08:59 AM
                            0 responses
                            14 views
                            0 reactions
                            Last Post SEQadmin2  
                            Started by SEQadmin2, 06-02-2026, 12:03 PM
                            0 responses
                            22 views
                            0 reactions
                            Last Post SEQadmin2  
                            Started by SEQadmin2, 06-02-2026, 11:40 AM
                            0 responses
                            19 views
                            0 reactions
                            Last Post SEQadmin2  
                            Started by SEQadmin2, 05-28-2026, 11:40 AM
                            0 responses
                            32 views
                            0 reactions
                            Last Post SEQadmin2  
                            Working...