From 44e76456cdfd0e0ba3dc3c958f0dd061b45fdd72 Mon Sep 17 00:00:00 2001 From: gmungoc Date: Thu, 8 Oct 2020 15:30:22 +0100 Subject: [PATCH] JAL-3700 JAL-3763 create datasets for test sequences --- test/jalview/util/MappingUtilsTest.java | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) 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()); -- 1.7.10.2