JAL-2397 PCA gap cost uses last column of score matrix
[jalview.git] / test / jalview / schemes / ScoreMatrixTest.java
index 99af601..e15dd41 100644 (file)
@@ -143,26 +143,25 @@ public class ScoreMatrixTest
     }
     /*
      * verify expected BLOSUM dot product scores
-     * Note: gap is treated like 'X' [22] in the matrix
      */
     // F.F + K.K + L.L = 6 + 5 + 4 = 15
     assertEquals(pairwise.getValue(0, 0), 15d);
-    // R.R + X.X + D.D = 5 + -1 + 6 = 10
-    assertEquals(pairwise.getValue(1, 1), 10d);
+    // R.R + -.- + D.D = 5 + 1 + 6 = 12
+    assertEquals(pairwise.getValue(1, 1), 12d);
     // Q.Q + I.I + A.A = 5 + 4 + 4 = 13
     assertEquals(pairwise.getValue(2, 2), 13d);
     // G.G + W.W + C.C = 6 + 11 + 9 = 26
     assertEquals(pairwise.getValue(3, 3), 26d);
-    // F.R + K.X + L.D = -3 + -1 + -3 = -8
-    assertEquals(pairwise.getValue(0, 1), -8d);
+    // F.R + K.- + L.D = -3 + -4 + -4 = -11
+    assertEquals(pairwise.getValue(0, 1), -11d);
     // F.Q + K.I + L.A = -3 + -3 + -1 = -7
     assertEquals(pairwise.getValue(0, 2), -7d);
     // F.G + K.W + L.C = -3 + -3 + -1 = -7
     assertEquals(pairwise.getValue(0, 3), -7d);
-    // R.Q + X.I + D.A = 1 + -1 + -2 = -2
-    assertEquals(pairwise.getValue(1, 2), -2d);
-    // R.G + X.W + D.C = -2 + -2 + -3 = -7
-    assertEquals(pairwise.getValue(1, 3), -7d);
+    // R.Q + -.I + D.A = 1 + -4 + -2 = -5
+    assertEquals(pairwise.getValue(1, 2), -5d);
+    // R.G + -.W + D.C = -2 + -4 + -3 = -9
+    assertEquals(pairwise.getValue(1, 3), -9d);
     // Q.G + I.W + A.C = -2 + -3 + 0 = -5
     assertEquals(pairwise.getValue(2, 3), -5d);
   }