From 91e4b8c7220621cb79da7a25e683ef6b62b610ff Mon Sep 17 00:00:00 2001 From: gmungoc Date: Tue, 5 Jan 2016 13:40:12 +0000 Subject: [PATCH] JAL-653 updating 'align as' tests to match latest tweaks to algorithm --- test/jalview/analysis/AlignmentUtilsTests.java | 15 ++++++++------- test/jalview/datamodel/AlignmentTest.java | 2 +- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/test/jalview/analysis/AlignmentUtilsTests.java b/test/jalview/analysis/AlignmentUtilsTests.java index dd99bc2..1815eb7 100644 --- a/test/jalview/analysis/AlignmentUtilsTests.java +++ b/test/jalview/analysis/AlignmentUtilsTests.java @@ -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()); + ArrayList acfs = new ArrayList(); + 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] diff --git a/test/jalview/datamodel/AlignmentTest.java b/test/jalview/datamodel/AlignmentTest.java index 75c6485..b4b0e12 100644 --- a/test/jalview/datamodel/AlignmentTest.java +++ b/test/jalview/datamodel/AlignmentTest.java @@ -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()); } -- 1.7.10.2