Unconfigured Ad

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • jesstilla
    Junior Member
    • Oct 2013
    • 7

    #1

    different number of sequences in a paired end alignement with Bowtie2?

    Hello,

    I am very new to using Bowtie2, and would love some help!

    I am hoping to do a paired end alignment. I had the same number of sequences in each file originally. First, I did a quality trim using FASTX to remove low quality sequence at the end. Then, when I try to do my paired end alignment, I get an error message saying that I had a different number of sequences in the two files. I'm guessing that perhaps one (or more) of my sequences was of a low quality all the way through and removed altogether...?

    What is the best way around this problem? Is there an option in Bowtie2 to deal with an unequal number of sequences?

    Thanks so much!
  • dpryan
    Devon Ryan
    • Jul 2011
    • 3478

    #2
    Just use a different read trimmer, for example trimmomatic or trim_galore. Fastx tools are known to cause problems like this.

    Comment

    • westerman
      Rick Westerman
      • Jun 2008
      • 1104

      #3
      Originally posted by jesstilla View Post
      What is the best way around this problem? Is there an option in Bowtie2 to deal with an unequal number of sequences?
      dpryan has the correct ultimate solution -- don't use fastx directly because it destroys any pairing. However in answer to your specific question above the answer is "No, not if you want to consider your sequences as pairs." On the other hand if you wish to treat your reads as single ends then you can use the '-U' parameter to input the reads to bowtie2.

      Comment

      • SES
        Senior Member
        • Mar 2010
        • 275

        #4
        Originally posted by jesstilla View Post
        What is the best way around this problem? Is there an option in Bowtie2 to deal with an unequal number of sequences?
        For the first question, you need to sync your read pairs and to your second question, I don't think so. The solution is to re-pair your reads and there are a number of posts on seqanswers about that topic. The other comments about using a different trimmer are ways to avoid this in the future (prinseq keeps pairs also), but that doesn't solve your current problem. Retrimming your reads with another tool because they are out of sync seems like a silly approach to me because you've already spent time trimming. Just sync your paired reads now and then you'll be able to use the read pairs and the singletons created by trimming.

        Comment

        • jesstilla
          Junior Member
          • Oct 2013
          • 7

          #5
          Thanks so much for getting back to me!

          I used Trimmomatic to trim my sequences, and I unfortunately had the same problem when I tried to use Bowtie2 afterward. The error message says "fewer reads in file specified with -2 than in file specified with -1 terminate called after throwing an instance of 'int' bowtie2-align died with signal 6 (ABRT) (core dumped)"

          I'm not sure what I'm doing wrong, but I included the arguments I used in case anything jumps out at you.

          For Trimmomatic:
          bsub java -jar /cluster/tufts/dopmanlab/Jessie2/nexteraJLM/Trimmomatic-0.32/trimmomatic-0.32.jar PE -phred33 Sample_ACB5.R1.fastq Sample_ACB5.R2.fastq ACB5_trim_pairfor_prac.fastq ACB5_trim_pairrev_prac.fastq ACB5_trim_unpairfor_prac.fastq ACB5_trim_unpairrev.fastq TRAILING:30

          For Bowtie2:
          bsub -o <output file> -e <error file> /cluster/tufts/ngsp/ngsp/bowtie2-2.1.0/bowtie2 --very-sensitive --phred33 --no-unal -x <name of reference> -1 <forward file> -2 <reverse file> -I 300 -X 550 -S <SAM output file>

          Thanks a bunch!

          Comment

          • Brian Bushnell
            Super Moderator
            • Jan 2014
            • 2709

            #6
            Hmmm.... did you check to make sure they had the same number of reads before trimming?

            Comment

            • jesstilla
              Junior Member
              • Oct 2013
              • 7

              #7
              Well, Bowtie2 will do the alignment when I use the untrimmed files, so I assumed that there were the same number of sequences in each file...

              Comment

              • Brian Bushnell
                Super Moderator
                • Jan 2014
                • 2709

                #8
                In Linux, you can do:
                wc -l Sample_ACB5.R1.fastq Sample_ACB5.R2.fastq

                And it will tell you how many lines there are in each of them. But I'm not sure what you're doing with giving trimmomatic 6 files at once. I've not used it, but normally if you want a program to understand that data is paired, you can only give it 2 files at a time.

                Comment

                • SES
                  Senior Member
                  • Mar 2010
                  • 275

                  #9
                  Originally posted by jesstilla View Post
                  Well, Bowtie2 will do the alignment when I use the untrimmed files, so I assumed that there were the same number of sequences in each file...
                  You are probably correct in that case, though it's odd you had a problem after trimming with a program that is aware of the paired reads. I would take the same approach as suggested above, which is check the read counts in each file before and after trimming. It may be that the command is not correct, but I'm not a trimmomatic user so I can't say. I think the best approach would probably be to check read numbers and then start investigating further.

                  Comment

                  • jesstilla
                    Junior Member
                    • Oct 2013
                    • 7

                    #10
                    I figured it out! There was a misordering of the output files in the trimmomatic script. Thanks to everyone for your help!

                    Comment

                    • westerman
                      Rick Westerman
                      • Jun 2008
                      • 1104

                      #11
                      Originally posted by Brian Bushnell View Post
                      In Linux, you can do:
                      wc -l Sample_ACB5.R1.fastq Sample_ACB5.R2.fastq

                      And it will tell you how many lines there are in each of them. But I'm not sure what you're doing with giving trimmomatic 6 files at once. I've not used it, but normally if you want a program to understand that data is paired, you can only give it 2 files at a time.
                      Brian. You *really* need to use Trimmomatic at some point. Indeed Trimmomatic requires 6 files -- two input and four output.

                      Comment

                      • Brian Bushnell
                        Super Moderator
                        • Jan 2014
                        • 2709

                        #12
                        Originally posted by westerman View Post
                        Brian. You *really* need to use Trimmomatic at some point. Indeed Trimmomatic requires 6 files -- two input and four output.
                        Haha, silly me. I guess that makes sense. For some reason everyone at JGI uses interleaved files for everything.

                        Comment

                        Latest Articles

                        Collapse

                        • SEQadmin2
                          Multiomic Liquid Biopsy: What DNA/RNA Panels Reveal That DNA Alone Can’t
                          by SEQadmin2



                          Tumors contain complex mixtures of cell populations that evolve in response to treatment and host-specific factors. Tissue biopsies provide only static snapshots of a tumor’s state. But what if we could follow that evolution over time using a minimally invasive technique?

                          Liquid biopsies can detect tumor-derived material circulating in the bloodstream, providing a way to study treatment response, detect emerging resistance, and discover new biomarkers. Circulating
                          ...
                          10-14-2026, 09:55 AM
                        • SEQadmin2
                          New Genomics Technologies Take Aim at Long-Standing Limits
                          by SEQadmin2


                          Researchers using sequencing and genomics tools often have to make trade-offs. They can choose between speed or scale, short reads or long-range information, or targeted panels or a view of the whole transcriptome. New technologies that have been released this year are built to address those tough choices.

                          We asked six companies the same four questions to learn about their latest products. The new technologies bring a lot to the table, including rethinking sequencing
                          ...
                          09-28-2026, 10:25 AM

                        ad_right_rmr

                        Collapse

                        News

                        Collapse

                        Topics Statistics Last Post
                        Started by SEQadmin2, 10-22-2026, 11:13 AM
                        0 responses
                        26 views
                        0 reactions
                        Last Post SEQadmin2  
                        Started by SEQadmin2, 10-22-2026, 10:48 AM
                        0 responses
                        20 views
                        0 reactions
                        Last Post SEQadmin2  
                        Started by SEQadmin2, 10-15-2026, 10:52 AM
                        0 responses
                        36 views
                        0 reactions
                        Last Post SEQadmin2  
                        Started by SEQadmin2, 10-14-2026, 05:39 AM
                        0 responses
                        43 views
                        0 reactions
                        Last Post SEQadmin2  
                        Working...