About Resulting Alignment Of The Pairwise2 Module Of Biopython
1
0
Entering edit mode
12.3 years ago
Rein07 • 0

I am currently working on the pairwise2 module.

I am wondering if the resulting alignments of pairwise2 module is in any specific order.

For exmaple

alignments=pairwise2.align.globalxx(str(seqA),str(seqB))

Is the list of alignments sorting in ascending order or descending order of score?

Or sorted by something else?

biopython pairwise • 3.1k views
ADD COMMENT
2
Entering edit mode
12.3 years ago

Looking at the [?]source code[?], it uses _find_start function (line 281) to first find all the starting points with respective scores. It finds the best score by finding the max score of the starting positions using the native max() function (line 285), suggesting there is no order to the array.

It then reports the alignments from the start positions using the _recover_alignments function (line 303). _recover_alignments uses _clean_alignments to further process the results. It doesn't look like at any point they sort according to score.

It looks like the alignments are sorted according to the _find_start function which pretty much just looks for starting positions in order of the score matrix rows and columns.

So the short answer is that the alignments are not in any practical order. But the more definitive way to check is to just give it a couple of sample sequences and print the results to see if there is any discernible order.

ADD COMMENT
0
Entering edit mode

Thank you very much!

ADD REPLY

Login before adding your answer.

Traffic: 2362 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