1 package jalview.schemes;
\r
3 public class ScoreMatrix
\r
7 * reference to integer score matrix
\r
11 * 0 for Protein Score matrix. 1 for dna score matrix
\r
14 ScoreMatrix(String name, int[][] matrix, int type)
\r
16 this.matrix = matrix;
\r
20 public boolean isDNA()
\r
25 public boolean isProtein()
\r
30 public int[][] getMatrix()
\r
39 * @return score for substituting first char in A1 with first char in A2
\r
41 public int getPairwiseScore(String A1, String A2)
\r
43 return getPairwiseScore(A1.charAt(0), A2.charAt(0));
\r
46 public int getPairwiseScore(char c, char d)
\r
52 int a = (type == 0) ? ResidueProperties.aaIndex[c] :
\r
53 ResidueProperties.nucleotideIndex[c];
\r
54 int b = (type == 0) ? ResidueProperties.aaIndex[d] :
\r
55 ResidueProperties.nucleotideIndex[d];
\r
61 //System.out.println("Unknown residue in " + A1 + " " + A2);
\r