From b3ab81b9e34fbb6de969ec0c3230c887661c3b48 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 3c1dbbb..2fb29f1 100644 --- a/test/jalview/util/MappingUtilsTest.java +++ b/test/jalview/util/MappingUtilsTest.java @@ -1325,7 +1325,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" }) @@ -1347,6 +1348,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 @@ -1371,7 +1375,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); /* @@ -1389,7 +1393,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()); @@ -1408,7 +1412,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