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?



Source link