JAL-1705 set Uniprot xref as 'source dbref' (for SIFTS mapping)
authorgmungoc <g.m.carstairs@dundee.ac.uk>
Mon, 1 Feb 2016 12:54:13 +0000 (12:54 +0000)
committergmungoc <g.m.carstairs@dundee.ac.uk>
Mon, 1 Feb 2016 12:54:13 +0000 (12:54 +0000)
src/jalview/ext/ensembl/EnsemblSeqProxy.java

index 744aa49..8c1e972 100644 (file)
@@ -312,6 +312,13 @@ public abstract class EnsemblSeqProxy extends EnsemblRestClient
     for (DBRefEntry xref : xrefs)
     {
       seq.addDBRef(xref);
+      /*
+       * Save any Uniprot xref to be the reference for SIFTS mapping
+       */
+      if (DBRefSource.UNIPROT.equals(xref.getSource()))
+      {
+        seq.setSourceDBRef(xref);
+      }
     }
   }