From 0bf5983f8a17fdfecb2cac649e3650763a8973ce Mon Sep 17 00:00:00 2001 From: Jim Procter Date: Fri, 8 Jan 2021 16:05:39 +0000 Subject: [PATCH] =?utf8?q?JAL-3794=20new=20test=20for=20recognition=20of=20p?= =?utf8?q?rotein=20or=20DNA=20with=20ambiguity=20characters,=20including=20t?= =?utf8?q?he=20=E2=80=98all=20N=E2=80=99=20case=20(that=20should=20be=20prot?= =?utf8?q?ein..).?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- test/jalview/datamodel/SequenceTest.java | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/test/jalview/datamodel/SequenceTest.java b/test/jalview/datamodel/SequenceTest.java index e549978..6d07113 100644 --- a/test/jalview/datamodel/SequenceTest.java +++ b/test/jalview/datamodel/SequenceTest.java @@ -110,6 +110,23 @@ public class SequenceTest assertTrue(sq.isProtein()); } + @Test(groups = ("Functional")) + public void testIsProteinWithXorNAmbiguityCodes() + { + // test Protein with N - poly asparagine + assertTrue(new Sequence("prot", "ASDFASDFASDFNNNNNNNNN").isProtein()); + assertTrue(new Sequence("prot", "NNNNNNNNNNNNNNNNNNNNN").isProtein()); + // test Protein with X + assertTrue(new Sequence("prot", "ASDFASDFASDFXXXXXXXXX").isProtein()); + // test DNA with X + assertFalse(new Sequence("prot", "ACGTACGTACGTXXXXXXXX").isProtein()); + // test DNA with N + assertFalse(new Sequence("prot", "ACGTACGTACGTNNNNNNNN").isProtein()); + // test RNA with X + assertFalse(new Sequence("prot", "ACGUACGUACGUXXXXXXXXX").isProtein()); + assertFalse(new Sequence("prot", "ACGUACGUACGUNNNNNNNNN").isProtein()); + } + @Test(groups = { "Functional" }) public void testGetAnnotation() { -- 1.7.10.2