From: gmungoc Date: Mon, 27 Jul 2020 15:34:04 +0000 (+0100) Subject: JAL-3692 set CDS /product as EMBLCDSPROTEIN description X-Git-Tag: Release_2_11_1_1~13^2~24^2~3 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=f4e415106d75a69a373c0c9a37b6bdc2d5a55231;p=jalview.git JAL-3692 set CDS /product as EMBLCDSPROTEIN description --- diff --git a/src/jalview/io/EmblFlatFile.java b/src/jalview/io/EmblFlatFile.java index f7a5161..13f224b 100644 --- a/src/jalview/io/EmblFlatFile.java +++ b/src/jalview/io/EmblFlatFile.java @@ -597,6 +597,7 @@ public class EmblFlatFile extends AlignFile // FileParse if (protein == null) { protein = new Sequence(data.proteinId, data.translation); + protein.setDescription(data.proteinName); proteins.put(data.proteinId, protein); } // assuming CDSPROTEIN sequence version = dna version (?!) diff --git a/test/jalview/io/EmblFlatFileTest.java b/test/jalview/io/EmblFlatFileTest.java index 949e0a2..4ca826c 100644 --- a/test/jalview/io/EmblFlatFileTest.java +++ b/test/jalview/io/EmblFlatFileTest.java @@ -246,6 +246,7 @@ public class EmblFlatFileTest + "DE Severe acute respiratory syndrome coronavirus 2 isolate Wuhan-Hu-1,\n" + "FT CDS 3..17\n" + "FT /protein_id=\"QHD43415.1\"\n" + + "FT /product=\"orf1ab polyprotein\"\n" + "FT /translation=\"MRKLD\n" + "SQ Sequence 7496 BP; 2450 A; 1290 C; 1434 G; 2322 T; 0 other;\n" + " ggatGcgtaa gttagacgaa attttgtctt tgcgcacaga 40\n"; @@ -283,6 +284,7 @@ public class EmblFlatFileTest mapping = dbref.getMap(); SequenceI mapTo = mapping.getTo(); assertEquals(mapTo.getName(), "QHD43415.1"); + assertEquals(mapTo.getDescription(), "orf1ab polyprotein"); assertEquals(mapTo.getSequenceAsString(), "MRKLD"); map = mapping.getMap(); assertEquals(map.getFromLowest(), 3);