Question: unexpected bowtie2 unpaired alignment behavior
0
gravatar for mark.rose
5.0 years ago by
mark.rose30
United States
mark.rose30 wrote:

Hello

Seemingly according to the manual, bowtie2 will attempt to align paired-end reads first as pairs but then as unpaired reads if necessary.  If this is so, can someone explain the following.  (Note, I expect one unpaired alignment)

Thanks

Mark

[rosema1@demeter bowtie2]$ bowtie2 -x 12274_pmi.fa  --local -N 0 -L 25 -p 1 -1 s_2_1_25_PMI.fq -2 s_2_2_25_PMI.fq -S s_2_1and2_25_PMI.fq-vs-12274_pmi.fa.sam -I 0 -X 750   --score-min G,5,0 -i S,1,0
278 reads; of these:
  278 (100.00%) were paired; of these:
    278 (100.00%) aligned concordantly 0 times
    0 (0.00%) aligned concordantly exactly 1 time
    0 (0.00%) aligned concordantly >1 times
    ----
    278 pairs aligned concordantly 0 times; of these:
      0 (0.00%) aligned discordantly 1 time
    ----
    278 pairs aligned 0 times concordantly or discordantly; of these:
      556 mates make up the pairs; of these:
        556 (100.00%) aligned 0 times
        0 (0.00%) aligned exactly 1 time
        0 (0.00%) aligned >1 times
0.00% overall alignment rate


[rosema1@demeter bowtie2]$ bowtie2 -x 12274_pmi.fa  --local -N 0 -L 25 -p 1 -U s_2_1_25_PMI.fq,s_2_2_25_PMI.fq -S s_2_1_25_PMI.fq-and-s_2_2_25_PMI.fq-vs-12274_pmi.fa.sam -I 0 -X 750   --score-min G,5,0 -i S,1,0
556 reads; of these:
  556 (100.00%) were unpaired; of these:
    555 (99.82%) aligned 0 times
    0 (0.00%) aligned exactly 1 time
    1 (0.18%) aligned >1 times
0.18% overall alignment rate

 

alignment • 2.8k views
ADD COMMENTlink modified 12 weeks ago by maxwhjohn198880 • written 5.0 years ago by mark.rose30

One possibility is that this is just due to random seeding. It sometimes happens that if you rearrange the reads in a file that you'll then get slightly different results, due presumably to that.

ADD REPLYlink written 5.0 years ago by Devon Ryan91k

If due to a random process, would you expect repeated execution of the tool would sometimes find this alignment? I have executed these commands several times but always get the same answer. Note there are only 552 paired-end reads in this test dataset. 

ADD REPLYlink written 5.0 years ago by mark.rose30

Hello mark.rose!

It appears that your post has been cross-posted to another site: SEQanswers.

This is typically not recommended as it runs the risk of annoying people in both communities.

ADD REPLYlink modified 5.0 years ago • written 5.0 years ago by Devon Ryan91k
If due to a random process, would you expect repeated execution of the tool would sometimes find this alignment? I have executed these commands several times but always get the same answer. Note there are only 552 paired-end reads in this test dataset.
ADD REPLYlink written 5.0 years ago by mark.rose30

It'd only change if you used the --non-deterministic argument.
 

ADD REPLYlink written 5.0 years ago by Devon Ryan91k

Just now I tried the paired end alignment 10 times with and without the --non-deterministic flag. No difference. The expected single end alignment is never found unless I align in single end mode and then it is found every time.

ADD REPLYlink written 5.0 years ago by mark.rose30
Just now I tried the paired end alignment 10 times with and without the --non-deterministic flag. No difference. The expected single end alignment is never found unless I align in single end mode and then it is found every time.
ADD REPLYlink written 5.0 years ago by mark.rose30

Sounds like a bug then. You might submit a bug report.

ADD REPLYlink written 5.0 years ago by Devon Ryan91k

Anyone have any other ideas.  No response from bug list.

ADD REPLYlink written 5.0 years ago by mark.rose30

It can take quite a while to hear back after submitting a bug report for bowtie2 (weeks easily). You can always just use s different aligner if this is really important to you.

ADD REPLYlink written 5.0 years ago by Devon Ryan91k

So it seems from the several other still unanswered posts there.  As for another aligner, you will note from my command line I am attempting something a bit unusual.  I trying to find hits in (100bp) reads that consist, at a minimum, of 25bp of contiguous identity.  The entire rest of the read need not match.  Not all aligners appear able to do this.  Bowtie2 (and Bowtie1) can do this (as least in single end mode).  Blast can do this but I have billions of reads so it would be slow going.  Any suggestions of aligners capable of this?

ADD REPLYlink written 5.0 years ago by mark.rose30

For what it's worth, you could use pretty much any aligner if you're willing to do a bit of post-processing. This could be done conveniently with a simple python script using pysam (or C using HTSlib). I could help you write such a script if you need it.

ADD REPLYlink modified 5.0 years ago • written 5.0 years ago by Devon Ryan91k
2
gravatar for maxwhjohn1988
12 weeks ago by
maxwhjohn198880 wrote:

Sorry to bump such a very old post, but I hit a similar problem a few months ago, which cost me a huge amount of time and tears thinking that my data were somehow to blame.

If this is the same problem as I experienced (it looks similar), it's due to a bug in older versions of Bowtie2 which corrupts the index (but doesn't report it) when it encounters a sequence in the reference which is composed entirely of Ns. The bug was reported and fixed in the newest version of Bowtie2.

This post reports the problem https://github.com/BenLangmead/bowtie2/issues/192. Long story short - if you have this problem, check if your Bowtie2 is up to date. If not, consider installing the newest version.

ADD COMMENTlink written 12 weeks ago by maxwhjohn198880
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1529 users visited in the last hour