This is a test version of Biostars. For the public version, visit https://www.biostars.org.
There are gaps where mismatches should be in pairwise alignment (Biopython-pairwise2)

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?

Thank you for your help!

biopython pairwise2 alignment

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.

1 answer

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.

Thank you! That worked.

Log in to answer this question.