I am using python to doing multiple sequence alignment.for evaluate the alignment I use Weighted sum of pairs score (WSP) for three sequences seq1, seq2 and seq3, as we know the score is calculate as follows: first calculate the score of (seq1,seq2), and score of(seq1,seq3) and score of (seq2,seq3)
WSP=score(seq1,seq2)+score(seq1,seq3)+score(seq2,seq3)
python code:
def wsp():
w=1
dis=sum_distance(seq1,seq2,seq3)
wsp=w*dis
return wsp
now, I want to use a fasta file which contains many sequences.how can I calculate the WSP score for all sequences in a fasta file.
where sum_distance is a function to calculate distances between sequences
seq1='AG-GT' seq2='AG-GT and seq3='ACT-T'
the WSP function for the three sequences score gives 8. – user3216969