Corrected the local alignment calculation. And when we are computing the distance matrix convert the simmilarity value to distance.