JAL-653 updating 'align as' tests to match latest tweaks to algorithm
authorgmungoc <g.m.carstairs@dundee.ac.uk>
Tue, 5 Jan 2016 13:40:12 +0000 (13:40 +0000)
committergmungoc <g.m.carstairs@dundee.ac.uk>
Tue, 5 Jan 2016 13:40:12 +0000 (13:40 +0000)
test/jalview/analysis/AlignmentUtilsTests.java
test/jalview/datamodel/AlignmentTest.java

index dd99bc2..1815eb7 100644 (file)
@@ -370,8 +370,8 @@ public class AlignmentUtilsTests
      * region). The leading gap, and the gaps between codons, are subsumed by
      * the protein alignment gap.
      */
-    checkAlignSequenceAs("-G-GG--AA-A-", "-A-L-", true, true, map,
-            "---G-GG---AA-A-");
+    checkAlignSequenceAs("-G-GG--AA-A---", "-A-L-", true, true, map,
+            "---G-GG---AA-A---");
 
     /*
      * Include only unmapped gaps in dna when realigning (outside the exon
@@ -379,7 +379,7 @@ public class AlignmentUtilsTests
      * the protein alignment gap.
      */
     checkAlignSequenceAs("-G-GG--AA-A-", "-A-L-", false, true, map,
-            "---GGG---AAA-");
+            "---GGG---AAA---");
   }
 
   /**
@@ -444,11 +444,10 @@ public class AlignmentUtilsTests
         1, 1, 3, 3 }, 3, 1);
 
     /*
-     * Expect alignment does nothing (aborts realignment). Change this test
-     * first if different behaviour wanted.
+     * -L- 'aligns' ccc------
      */
     checkAlignSequenceAs("gggAAAcccTTTggg", "-A-L-P-", false, false, map,
-            "gggAAAccc---TTTggg");
+            "gggAAAccc------TTTggg");
   }
 
   /**
@@ -549,7 +548,9 @@ public class AlignmentUtilsTests
     acf.addMap(dna1.getDatasetSequence(), prot1.getDatasetSequence(), map);
     acf.addMap(dna2.getDatasetSequence(), prot2.getDatasetSequence(), map);
     acf.addMap(dna3.getDatasetSequence(), prot3.getDatasetSequence(), map);
-    protein.setCodonFrames(new ArrayList<AlignedCodonFrame>());
+    ArrayList<AlignedCodonFrame> acfs = new ArrayList<AlignedCodonFrame>();
+    acfs.add(acf);
+    protein.setCodonFrames(acfs);
 
     /*
      * Translated codon order is [1,2,3] [1,3,4] [4,5,6] [4,5,7] [5,6,7] [7,8,9]
index 75c6485..b4b0e12 100644 (file)
@@ -250,7 +250,7 @@ public class AlignmentTest
     ((Alignment) al1).alignAs(al2, false, true);
     assertEquals("ACG---GCUCCA------ACT", al1.getSequenceAt(0)
             .getSequenceAsString());
-    assertEquals("---CGT---TAACGA---AGT", al1.getSequenceAt(1)
+    assertEquals("---CGT---TAACGA---AGT---", al1.getSequenceAt(1)
             .getSequenceAsString());
   }