From bc948df3d2d0455b085537107b507f7a45a07e34 Mon Sep 17 00:00:00 2001 From: gmungoc Date: Fri, 20 May 2016 08:51:47 +0100 Subject: [PATCH] JAL-2049 unit test updated for HGVS syntax, feature group = "Jalview" --- test/jalview/analysis/AlignmentUtilsTests.java | 25 ++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/test/jalview/analysis/AlignmentUtilsTests.java b/test/jalview/analysis/AlignmentUtilsTests.java index 860d979..2fc5325 100644 --- a/test/jalview/analysis/AlignmentUtilsTests.java +++ b/test/jalview/analysis/AlignmentUtilsTests.java @@ -1968,60 +1968,65 @@ public class AlignmentUtilsTests SequenceFeature sf = sfs[0]; assertEquals(1, sf.getBegin()); assertEquals(1, sf.getEnd()); - assertEquals("K->E", sf.getDescription()); + assertEquals("p.Lys1Glu", sf.getDescription()); assertEquals("var1.125A>G", sf.getValue("ID")); assertNull(sf.getValue("clinical_significance")); assertEquals("ID=var1.125A>G", sf.getAttributes()); assertEquals(1, sf.links.size()); // link to variation is urlencoded assertEquals( - "K->E var1.125A>G|http://www.ensembl.org/Homo_sapiens/Variation/Summary?v=var1.125A%3EG", + "p.Lys1Glu var1.125A>G|http://www.ensembl.org/Homo_sapiens/Variation/Summary?v=var1.125A%3EG", sf.links.get(0)); + assertEquals("Jalview", sf.getFeatureGroup()); sf = sfs[1]; assertEquals(1, sf.getBegin()); assertEquals(1, sf.getEnd()); - assertEquals("K->Q", sf.getDescription()); + assertEquals("p.Lys1Gln", sf.getDescription()); assertEquals("var2", sf.getValue("ID")); assertEquals("Dodgy", sf.getValue("clinical_significance")); assertEquals("ID=var2;clinical_significance=Dodgy", sf.getAttributes()); assertEquals(1, sf.links.size()); assertEquals( - "K->Q var2|http://www.ensembl.org/Homo_sapiens/Variation/Summary?v=var2", + "p.Lys1Gln var2|http://www.ensembl.org/Homo_sapiens/Variation/Summary?v=var2", sf.links.get(0)); + assertEquals("Jalview", sf.getFeatureGroup()); sf = sfs[2]; assertEquals(1, sf.getBegin()); assertEquals(1, sf.getEnd()); - assertEquals("K->N", sf.getDescription()); + assertEquals("p.Lys1Asn", sf.getDescription()); assertEquals("var4", sf.getValue("ID")); assertEquals("Benign", sf.getValue("clinical_significance")); assertEquals("ID=var4;clinical_significance=Benign", sf.getAttributes()); assertEquals(1, sf.links.size()); assertEquals( - "K->N var4|http://www.ensembl.org/Homo_sapiens/Variation/Summary?v=var4", + "p.Lys1Asn var4|http://www.ensembl.org/Homo_sapiens/Variation/Summary?v=var4", sf.links.get(0)); + assertEquals("Jalview", sf.getFeatureGroup()); sf = sfs[3]; assertEquals(3, sf.getBegin()); assertEquals(3, sf.getEnd()); - assertEquals("P->H", sf.getDescription()); + assertEquals("p.Pro3His", sf.getDescription()); assertEquals("var6", sf.getValue("ID")); assertEquals("Good", sf.getValue("clinical_significance")); assertEquals("ID=var6;clinical_significance=Good", sf.getAttributes()); assertEquals(1, sf.links.size()); assertEquals( - "P->H var6|http://www.ensembl.org/Homo_sapiens/Variation/Summary?v=var6", + "p.Pro3His var6|http://www.ensembl.org/Homo_sapiens/Variation/Summary?v=var6", sf.links.get(0)); // var5 generates two distinct protein variant features + assertEquals("Jalview", sf.getFeatureGroup()); sf = sfs[4]; assertEquals(3, sf.getBegin()); assertEquals(3, sf.getEnd()); - assertEquals("P->R", sf.getDescription()); + assertEquals("p.Pro3Arg", sf.getDescription()); assertEquals("var6", sf.getValue("ID")); assertEquals("Good", sf.getValue("clinical_significance")); assertEquals("ID=var6;clinical_significance=Good", sf.getAttributes()); assertEquals(1, sf.links.size()); assertEquals( - "P->R var6|http://www.ensembl.org/Homo_sapiens/Variation/Summary?v=var6", + "p.Pro3Arg var6|http://www.ensembl.org/Homo_sapiens/Variation/Summary?v=var6", sf.links.get(0)); + assertEquals("Jalview", sf.getFeatureGroup()); } /** -- 1.7.10.2