1 package jalview.schemes;
\r
3 public class ScoreMatrix {
\r
6 * reference to integer score matrix
\r
10 * 0 for Protein Score matrix. 1 for dna score matrix
\r
13 ScoreMatrix(String name, int[][] matrix, int type) {
\r
17 public boolean isDNA() {
\r
20 public boolean isProtein() {
\r
23 public int[][] getMatrix() {
\r
30 * @return score for substituting first char in A1 with first char in A2
\r
32 public int getPairwiseScore(String A1, String A2)
\r
34 return getPairwiseScore(A1.charAt(0),A2.charAt(0));
\r
36 public int getPairwiseScore(char c, char d) {
\r
41 int a = (type==0) ? ResidueProperties.aaIndex[c] : ResidueProperties.nucleotideIndex[c];
\r
42 int b = (type==0) ? ResidueProperties.aaIndex[d] : ResidueProperties.nucleotideIndex[d];
\r
48 //System.out.println("Unknown residue in " + A1 + " " + A2);
\r