Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
24 lines (18 sloc) 497 Bytes
import numpy as np
import cython_align
from blosum62 import *
from numpy import argmin
from fasta import readFASTA
# this is an implementation of the needleman-wunsch algorithm
# and it should handle the affine gap situation
def mismatch_penalty(A,B):
if A!=B:
return -blosum62[A+B]
else:
return -blosum62[A+B]
s=readFASTA("rosalind_laff.txt")
A=s.values()[0]
B=s.values()[1]
print A,B
score=cython_align.build_dp_array(A,B,10,1,mismatch_penalty)
print score
You can’t perform that action at this time.