From 25c0a38f60cee16b740a0b126badf790226dcdad Mon Sep 17 00:00:00 2001 From: gmungoc Date: Mon, 27 Jul 2020 16:34:04 +0100 Subject: [PATCH] JAL-3692 set CDS /product as EMBLCDSPROTEIN description --- src/jalview/io/EmblFlatFile.java | 1 + test/jalview/io/EmblFlatFileTest.java | 2 ++ 2 files changed, 3 insertions(+) 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); -- 1.7.10.2