+ /**
+ * Test the percentage identity calculation for two sequences
+ */
+ @Test(groups = { "Functional" })
+ public void testPID_ungappedOnly()
+ {
+ // 5 identical, 2 gap-gap, 2 gap-residue, 1 mismatch
+ String seq1 = "a--b-cdefh";
+ String seq2 = "a---bcdefg";
+ int length = seq1.length();
+
+ /*
+ * As currently coded, 'ungappedOnly' ignores gap-residue but counts
+ * gap-gap. Is this a bug - should gap-gap also be ignored, giving a PID of
+ * 5/6?
+ *
+ * Note also there is no variant of the calculation that penalises
+ * gap-residue i.e. counts it as a mismatch. This would give a score of 5/8
+ * (if we ignore gap-gap) or 5/10 (if we count gap-gap as a match).
+ */