prototype DBRef and Feature Type semantics (for annotating coding regions and disting...
[jalview.git] / src / jalview / datamodel / xdb / embl / EmblEntry.java
index e6c7197..a22eff7 100644 (file)
@@ -1,6 +1,8 @@
 package jalview.datamodel.xdb.embl;
 
 import jalview.datamodel.DBRefEntry;
+import jalview.datamodel.DBRefSource;
+import jalview.datamodel.FeatureProperties;
 import jalview.datamodel.Sequence;
 import jalview.datamodel.SequenceFeature;
 import jalview.datamodel.SequenceI;
@@ -414,7 +416,7 @@ public class EmblEntry
               ;
           }
         }
-        if (feature.getName().equalsIgnoreCase("CDS"))
+        if (FeatureProperties.isCodingFeature(DBRefSource.EMBL, "CDS"))
         {
           // extract coding region(s)
           jalview.datamodel.Mapping map = null;
@@ -502,6 +504,8 @@ public class EmblEntry
               sf.setFeatureGroup(jalview.datamodel.DBRefSource.EMBL);
               sf.setDescription("Exon " + (1 + xint) + " for protein '"
                       + prname + "' EMBLCDS:" + prid);
+              sf.setValue(FeatureProperties.EXONPOS, new Integer(1+xint));
+              sf.setValue(FeatureProperties.EXONPRODUCT, prname);
               if (vals != null && vals.size() > 0)
               {
                 Enumeration kv = vals.elements();
@@ -523,6 +527,7 @@ public class EmblEntry
               DBRefEntry ref = (DBRefEntry) dbr.next();
               ref.setSource(jalview.util.DBRefUtils.getCanonicalName(ref
                       .getSource()));
+              // Hard code the kind of protein product accessions that EMBL cite
               if (ref.getSource().equals(
                       jalview.datamodel.DBRefSource.UNIPROT))
               {