There are gaps where mismatches should be in pairwise alignment (Biopython-pairwise2)
1
0
Entering edit mode
9 weeks ago
Mustafa ▴ 10

Hi! I'm trying to do a pairwise alignment. As I explained in my previous post, I'm trying to filter the sequences by their alignment scores or end values. However, there is one thing that I can not understand in the results of alignments. There are gaps where mismatches should be and because of this, I am not able to filter the sequences by their length or score since it would be unreliable filtering.

Does anyone have any idea how can I solve this problem?

biopython pairwise2 alignment • 420 views
0
Entering edit mode

What version of Biopython are you using? Pairwise2 was completely reimplemented in more recent versions (I think 1.78 and above if memory serves).

You're also using the globalxx method by the looks of your previous post. This might not be the optimal algorithm for your purposes, and as Mensur mentioned, you might need to customise your scoring method.

2
Entering edit mode
9 weeks ago
Mensur Dlakic ★ 20k

If there are gaps where mismatches should be, that means that a gap is cheaper than a mismatch. Adjusting the scoring scheme should fix it.

0
Entering edit mode

Thank you! That worked.