From: gmungoc Date: Thu, 9 Feb 2017 10:05:21 +0000 (+0000) Subject: JAL-2371 no test for lower case consensus as not expected or handled X-Git-Tag: Release_2_10_3b1~349 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=301bcabf2b63d653ab9f5ce7102c1ea8951d6d75;p=jalview.git JAL-2371 no test for lower case consensus as not expected or handled --- diff --git a/test/jalview/schemes/Blosum62ColourSchemeTest.java b/test/jalview/schemes/Blosum62ColourSchemeTest.java index b3dd165..0b5b6bd 100644 --- a/test/jalview/schemes/Blosum62ColourSchemeTest.java +++ b/test/jalview/schemes/Blosum62ColourSchemeTest.java @@ -29,11 +29,10 @@ public class Blosum62ColourSchemeTest /* * findColour does not use column, sequence or pid score + * we assume consensus residue is computed as upper case */ assertEquals(blosum.findColour('A', 0, null, "A", 0f), darkBlue); assertEquals(blosum.findColour('a', 0, null, "A", 0f), darkBlue); - assertEquals(blosum.findColour('A', 0, null, "a", 0f), darkBlue); - assertEquals(blosum.findColour('a', 0, null, "a", 0f), darkBlue); /* * L has a Blosum score of diff --git a/test/jalview/schemes/PIDColourSchemeTest.java b/test/jalview/schemes/PIDColourSchemeTest.java index 73b270f..fa4b5d9 100644 --- a/test/jalview/schemes/PIDColourSchemeTest.java +++ b/test/jalview/schemes/PIDColourSchemeTest.java @@ -42,6 +42,7 @@ public class PIDColourSchemeTest /* * doesn't use column or sequence + * we assume consensus residue is computed as upper case */ assertEquals(scheme.findColour('A', 0, null, "A", 0f), white); assertEquals(scheme.findColour('A', 0, null, "A", 40f), white); @@ -54,8 +55,6 @@ public class PIDColourSchemeTest assertEquals(scheme.findColour('A', 0, null, "KFV", 100f), white); assertEquals(scheme.findColour('a', 0, null, "A", 80f), over60); - assertEquals(scheme.findColour('A', 0, null, "a", 80f), over60); - assertEquals(scheme.findColour('a', 0, null, "a", 80f), over60); assertEquals(scheme.findColour('A', 0, null, "AC", 80f), over60); assertEquals(scheme.findColour('A', 0, null, "KCA", 80f), over60); } @@ -78,10 +77,26 @@ public class PIDColourSchemeTest * first column PID is 50%, or 67% ignoring gaps */ String seqs = ">seq1\nAAAAA\n>seq2\nAAAAA\n>seq3\n-CCCC\n>seq4\nFFFFF\n"; + + /* + * load data and wait for consensus to be computed + */ AlignFrame af = new FileLoader().LoadFileWaitTillLoaded(seqs, DataSourceType.PASTE); AlignViewport viewport = af.getViewport(); viewport.setIgnoreGapsConsensus(false, af.alignPanel); + while (viewport.getConsensusSeq() == null) + { + synchronized (this) + { + try + { + wait(50); + } catch (InterruptedException e) + { + } + } + } af.changeColour_actionPerformed(JalviewColourScheme.PID.toString()); SequenceI seq = viewport.getAlignment().getSequenceAt(0);