From: gmungoc Date: Thu, 8 Oct 2020 14:30:22 +0000 (+0100) Subject: JAL-3700 JAL-3763 create datasets for test sequences X-Git-Tag: Release_2_11_1_3~5^2~12 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=44e76456cdfd0e0ba3dc3c958f0dd061b45fdd72;p=jalview.git JAL-3700 JAL-3763 create datasets for test sequences --- diff --git a/test/jalview/util/MappingUtilsTest.java b/test/jalview/util/MappingUtilsTest.java index 813edf8..d4df8c7 100644 --- a/test/jalview/util/MappingUtilsTest.java +++ b/test/jalview/util/MappingUtilsTest.java @@ -1355,7 +1355,8 @@ public class MappingUtilsTest /** * Test mapping a sequence group where sequences in and outside the group * share a dataset sequence (e.g. alternative CDS for the same gene) - * + *

+ * This scenario doesn't arise after JAL-3763 changes, but test left as still valid * @throws IOException */ @Test(groups = { "Functional" }) @@ -1377,6 +1378,9 @@ public class MappingUtilsTest SequenceI pep1 = new Sequence("pep1", "KF"); SequenceI pep2 = new Sequence("pep2", "FG"); SequenceI pep3 = new Sequence("pep3", "GP"); + pep1.createDatasetSequence(); + pep2.createDatasetSequence(); + pep3.createDatasetSequence(); /* * add mappings from coding positions of dna to respective peptides @@ -1401,7 +1405,7 @@ public class MappingUtilsTest new SequenceI[] { pep1, pep2, pep3 }); AlignViewportI cdnaView = new AlignViewport(cdna); - AlignViewportI proteinView = new AlignViewport(protein); + AlignViewportI peptideView = new AlignViewport(protein); protein.setCodonFrames(acfList); /* @@ -1419,7 +1423,7 @@ public class MappingUtilsTest * Verify the mapped sequence group in dna is cds1 and cds3 */ SequenceGroup mappedGroup = MappingUtils.mapSequenceGroup(sg, - proteinView, cdnaView); + peptideView, cdnaView); assertTrue(mappedGroup.getColourText()); assertSame(sg.getIdColour(), mappedGroup.getIdColour()); assertSame(sg.getOutlineColour(), mappedGroup.getOutlineColour()); @@ -1438,7 +1442,7 @@ public class MappingUtilsTest sg.addSequence(cds1, false); sg.setStartRes(0); sg.setEndRes(cdna.getWidth() - 1); - mappedGroup = MappingUtils.mapSequenceGroup(sg, cdnaView, proteinView); + mappedGroup = MappingUtils.mapSequenceGroup(sg, cdnaView, peptideView); assertTrue(mappedGroup.getColourText()); assertSame(sg.getIdColour(), mappedGroup.getIdColour()); assertSame(sg.getOutlineColour(), mappedGroup.getOutlineColour());