X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=test%2Fjalview%2Futil%2FComparisonTest.java;h=6f6841ddefecc1ae87fd9c816ff3f995fd6e9f6d;hb=5bad8435fd8ef2481b42814d876c12d4f52f0620;hp=f95587940f15ad6a904b928cc3fa9fc278649f87;hpb=5f4e1e4c330b045e9c8bce28ee132a0fca3834d8;p=jalview.git diff --git a/test/jalview/util/ComparisonTest.java b/test/jalview/util/ComparisonTest.java index f955879..6f6841d 100644 --- a/test/jalview/util/ComparisonTest.java +++ b/test/jalview/util/ComparisonTest.java @@ -115,7 +115,7 @@ public class ComparisonTest @Test(groups = { "Functional" }) public void testPID_includingGaps() { - String seq1 = "ABCDEF"; + String seq1 = "ABCDEFG"; // extra length here is ignored String seq2 = "abcdef"; assertEquals("identical", 100f, Comparison.PID(seq1, seq2), 0.001f); @@ -129,12 +129,14 @@ public class ComparisonTest int length = seq1.length(); // match gap-residue, match gap-gap: 9/10 identical + // TODO should gap-gap be included in a PID score? JAL-791 assertEquals(90f, Comparison.PID(seq1, seq2, 0, length, true, false), 0.001f); // overloaded version of the method signature above: assertEquals(90f, Comparison.PID(seq1, seq2), 0.001f); // don't match gap-residue, match gap-gap: 7/10 identical + // TODO should gap-gap be included in a PID score? assertEquals(70f, Comparison.PID(seq1, seq2, 0, length, false, false), 0.001f); } @@ -163,7 +165,8 @@ public class ComparisonTest public void testPID_ungappedOnly() { // 5 identical, 2 gap-gap, 2 gap-residue, 1 mismatch - String seq1 = "a--b-cdefh"; + // the extra length of seq1 is ignored + String seq1 = "a--b-cdefhr"; String seq2 = "a---bcdefg"; int length = seq1.length();