Seqanswers Leaderboard Ad

Collapse

Announcement

Collapse
No announcement yet.
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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

  • #2
    Hi Brandon,

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

    Thanks,
    Ben

    Comment


    • #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


      • #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


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

          Comment


          • #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


            • #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


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

                Comment


                • #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


                  • #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


                    • #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


                      • #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


                        • #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


                          • #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

                            • seqadmin
                              Strategies for Sequencing Challenging Samples
                              by seqadmin


                              Despite advancements in sequencing platforms and related sample preparation technologies, certain sample types continue to present significant challenges that can compromise sequencing results. Pedro Echave, Senior Manager of the Global Business Segment at Revvity, explained that the success of a sequencing experiment ultimately depends on the amount and integrity of the nucleic acid template (RNA or DNA) obtained from a sample. “The better the quality of the nucleic acid isolated...
                              03-22-2024, 06:39 AM
                            • seqadmin
                              Techniques and Challenges in Conservation Genomics
                              by seqadmin



                              The field of conservation genomics centers on applying genomics technologies in support of conservation efforts and the preservation of biodiversity. This article features interviews with two researchers who showcase their innovative work and highlight the current state and future of conservation genomics.

                              Avian Conservation
                              Matthew DeSaix, a recent doctoral graduate from Kristen Ruegg’s lab at The University of Colorado, shared that most of his research...
                              03-08-2024, 10:41 AM

                            ad_right_rmr

                            Collapse

                            News

                            Collapse

                            Topics Statistics Last Post
                            Started by seqadmin, Yesterday, 06:37 PM
                            0 responses
                            8 views
                            0 likes
                            Last Post seqadmin  
                            Started by seqadmin, Yesterday, 06:07 PM
                            0 responses
                            8 views
                            0 likes
                            Last Post seqadmin  
                            Started by seqadmin, 03-22-2024, 10:03 AM
                            0 responses
                            49 views
                            0 likes
                            Last Post seqadmin  
                            Started by seqadmin, 03-21-2024, 07:32 AM
                            0 responses
                            66 views
                            0 likes
                            Last Post seqadmin  
                            Working...
                            X