[Biopython-dev] [Biopython - Bug #2776] Bio.pairwise2 returns non-optimal alignment in at least some cases

redmine at redmine.open-bio.org redmine at redmine.open-bio.org
Mon Jan 28 22:20:54 UTC 2013


Issue #2776 has been updated by Peter Cock.


In the opinion of Bryan Lunt, comment on another issue on Github:
https://github.com/biopython/biopython/pull/149

"Bug" 2776 is not a bug, it is a feature.

I hand-edited a datafile for EMBOSS programs and tried the EMBOSS "needle" program with (a homomorphism of) the same sequences. It behaves the same as pairwise2.

The point is that for there to be gaps they have to be flanked by matches, except on the ends, so what the original bug report asks for is not something these algorithms will ever produce anyway.
----------------------------------------
Bug #2776: Bio.pairwise2 returns non-optimal alignment in at least some cases
https://redmine.open-bio.org/issues/2776

Author: Klaus Kopec
Status: New
Priority: Normal
Assignee: Biopython Dev Mailing List
Category: Main Distribution
Target version: 1.49
URL: 


At least in some cases, Bio.pairwise2 returns an alignment that is not the one with the highest score for the input parameters. This occurs in localXX and globalXX.

Yet, I only encountered the problem with large mismatch values (which I use as I need mismatch free alignments).

simple example (the bug also occured for longer sequences):
>>> sequence1 = 'GKG'
>>> sequence2 = 'GWG'
>>> A = pairwise2.align.globalms(sequence1, sequence2, 5, -100, -5, -5)[0]
>>> A[0]
'GKG--'
>>> A[1]
'--GWG'
>>> A[2]
-15.0

whereas
'GK-G'
'G-WG'

would get a score of 0


System: Kubuntu 8.10 64Bit, Python 2.6.1, Biopython 1.49 (my pairwise2.py is identical to the current CVS version of it)


-- 
You have received this notification because you have either subscribed to it, or are involved in it.
To change your notification preferences, please click here and login: http://redmine.open-bio.org




More information about the Biopython-dev mailing list