Where and how do you set match and mismatch score before doing alignment

May 4, 2011 at 11:41 PM

I know we can set GapOpenCost or GapExtensionCost etc. to aligner, for example:

Bio.Algorithms.MUMmer.MUMmerAligner myMummer = new Bio.Algorithms.MUMmer.MUMmerAligner ();
SimilarityMatrix mySimMatrix =  new SimilarityMatrix(SimilarityMatrix.StandardSimilarityMatrix.Blosum50);
myMummer .GapOpenCost = -1;
myMummer.SimilarityMatrix = mySimMatrix;

//now perform the alignment

Where and how do you actually set MatchScore and MisMatchScore before doing alignment?  A code snippet would be quite useful.  Thank you

May 5, 2011 at 3:17 PM

Hi Chris, and thanks for your post.

One of our developers have suggested the following, hope it helps:

Match and Mismatch scores are properties of  similarity matrices and not aligners. It is used only with DiagonalSimilarityMatrix. Other similarity matrices have their own standard and well defined scores(which are called as BLOSUM50 etc…)

 So if one has to use custom scores, he can always go ahead and use a DSM which has a constructor which takes Match and Mismatch scores and assign this SM to any aligner.


public DiagonalSimilarityMatrix(int matchValue, int mismatchValue)


Please let us know if this resolves your question.


The MBF Team