JAL-2210 remove ENSEMBL from protein DB list:
authorJim Procter <jprocter@issues.jalview.org>
Sun, 2 Oct 2016 11:26:40 +0000 (12:26 +0100)
committerJim Procter <jprocter@issues.jalview.org>
Sun, 2 Oct 2016 11:26:40 +0000 (12:26 +0100)
1. prevents transcript identifiers being promoted to primary refs on uniprot sequences.
2. obviates the need to add peptide product id to the uniprot sequence.

src/jalview/datamodel/DBRefSource.java
src/jalview/ws/dbsources/Uniprot.java

index 0ac14e5..aef18e9 100755 (executable)
@@ -101,7 +101,7 @@ public class DBRefSource
   public static final String[] CODINGDBS = { EMBLCDS, GENEDB, ENSEMBL };
 
   public static final String[] PROTEINDBS = { UNIPROT, UNIPROTKB,
-      EMBLCDSProduct, ENSEMBL }; // Ensembl ENSP* entries are protein
+      EMBLCDSProduct }; // , ENSEMBL }; // Ensembl ENSP* entries are protein
 
   public static String[] allSources()
   {
index de70aab..7ecd324 100644 (file)
@@ -236,6 +236,28 @@ public class Uniprot extends DbSourceProxyImpl
           dbRefs.add(dbr);
         }
       }
+      if (false) // "Ensembl".equals(pdb.getType()))
+      {
+        /*UniprotXML
+         * <dbReference type="Ensembl" id="ENST00000321556">
+        * <molecule id="Q9BXM7-1"/>
+        * <property type="protein sequence ID" value="ENSP00000364204"/>
+        * <property type="gene ID" value="ENSG00000158828"/>
+        * </dbReference> 
+         */
+        String cdsId = (String) pdb.getProperty()
+                .get("protein sequence ID");
+        if (cdsId != null && cdsId.trim().length() > 0)
+        {
+          // Only add the product ID
+          dbRefs.remove(dbr);
+          dbr = new DBRefEntry(DBRefSource.ENSEMBL, DBRefSource.UNIPROT
+                  + ":" + dbVersion, cdsId.trim());
+          dbRefs.add(dbr);
+
+        }
+      }
+
     }
 
     sequence.setPDBId(onlyPdbEntries);