Biopython pairwise2 alignment: is one_alignment the best alignment?
1
0
Entering edit mode
6.1 years ago
Chip ▴ 130

I started using pairwise2.align function from Biopyton with the one_alignment set to True. I was wondering if that single alignment returned is the best one. With Smith-Waterman it should be but I'm not sure if that's what's been implemented.

Biopython alignment • 4.8k views
ADD COMMENT
4
Entering edit mode
6.1 years ago
rayoub ▴ 110

There may be multiple pairwise alignments that have the same optimal score with respect to gap penalty and match scoring. The function just returns the first it finds during the traceback of the dynamic programming matrix rather than returning all of them.

From the following link, several paragraphs down, you will find this quote:

"Our variable alignments now contains a list of alignments (at least one) which have the same optimal score for the given conditions."

http://biopython.org/DIST/docs/tutorial/Tutorial.html#htoc86

More concretely, you can check the source code. The function you are interested in is _recover_alignments, where the parameter one_alignment_only is put to use.

http://biopython.org/DIST/docs/api/Bio.pairwise2-pysrc.html

ADD COMMENT

Login before adding your answer.

Traffic: 2094 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6