[Biopython] endweight, endopen and endextend equivalent for Bio.Align.PairwiseAligner()
2
0
Entering edit mode
10 weeks ago

I'm playing around with different aligners in Biopython. I initially used NeedleCommandline from Bio.Emboss.Application to align two sequences (JX205496.1, JX469991.1). Using the following settings, my optimal alignment score becomes 257 (which is my sought score):

NeedleCommandline(asequence="aseq.faa", bsequence="bseq.faa", gapopen=10, gapextend=1, \
                  endweight = True, endopen = 10, endextend = 1, outfile = "needle.txt")

I'd like to replicate this result using PairwiseAligner() from Bio.Align. Setting up my aligner as below I get an optimal alignment score of 534:

aligner = Bio.Align.PairwiseAligner()
aligner.mode = 'global'
aligner.open_gap_score = -10
aligner.extend_gap_score = -1

I get the same score with NeedleCommandline if I exclude endweight = True, endopen = 10, endextend = 1. I've tried adjusting the aligner.query/target_end_gap/extend_score settings, but I'm unable to replicate the result from NeedleCommandline.

Any ideas what I'm doing wrong, or what Bio.Align.PairwiseAligner() settings that are equivalent to the ones I used with NeedleCommandline?

alignment Needle Biopython • 317 views
ADD COMMENT
0
Entering edit mode
10 weeks ago
Mensur Dlakic ★ 14k

Have you tried adding:

aligner.end_open_gap_score = -10
aligner.end_extend_gap_score = -1
ADD COMMENT
0
Entering edit mode
10 weeks ago

Yes I have, but that doesn't change the result. It looks like setting aligner.open_gap_score = -10 and aligner.extend_gap_score = -1 also sets the end_open and end_extend scores by default.

ADD COMMENT

Login before adding your answer.

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