JAL-1926 JAL-2106 resolve source DB refs using canonical dbsource match
authorJim Procter <jprocter@issues.jalview.org>
Wed, 31 Aug 2016 16:21:58 +0000 (17:21 +0100)
committerJim Procter <jprocter@issues.jalview.org>
Wed, 31 Aug 2016 16:21:58 +0000 (17:21 +0100)
src/jalview/ws/sifts/SiftsClient.java

index 0ab6e7d..dad2b3f 100644 (file)
@@ -29,6 +29,7 @@ import jalview.datamodel.SequenceI;
 import jalview.io.StructureFile;
 import jalview.schemes.ResidueProperties;
 import jalview.structure.StructureMapping;
+import jalview.util.DBRefUtils;
 import jalview.util.Format;
 import jalview.xml.binding.sifts.Entry;
 import jalview.xml.binding.sifts.Entry.Entity;
@@ -339,8 +340,10 @@ public class SiftsClient implements SiftsClientI
       }
       if (isValidDBRefEntry(dbRef)
               && dbRef.isPrimary()
-              && (dbRef.getSource().equalsIgnoreCase(DBRefSource.UNIPROT) || dbRef
-                      .getSource().equalsIgnoreCase(DBRefSource.PDB)))
+              && (DBRefUtils.getCanonicalName(dbRef.getSource())
+                      .equalsIgnoreCase(DBRefSource.UNIPROT) || DBRefUtils
+                      .getCanonicalName(dbRef.getSource())
+                      .equalsIgnoreCase(DBRefSource.PDB)))
       {
         return dbRef;
       }