JAL-3692 set CDS /product as EMBLCDSPROTEIN description
authorgmungoc <g.m.carstairs@dundee.ac.uk>
Mon, 27 Jul 2020 15:34:04 +0000 (16:34 +0100)
committergmungoc <g.m.carstairs@dundee.ac.uk>
Mon, 27 Jul 2020 15:34:04 +0000 (16:34 +0100)
src/jalview/io/EmblFlatFile.java
test/jalview/io/EmblFlatFileTest.java

index f7a5161..13f224b 100644 (file)
@@ -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 (?!)
index 949e0a2..4ca826c 100644 (file)
@@ -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);