JAL-1705 further unit tests
[jalview.git] / src / jalview / ext / ensembl / EnsemblSeqProxy.java
index 744aa49..b2804f2 100644 (file)
@@ -46,12 +46,6 @@ public abstract class EnsemblSeqProxy extends EnsemblRestClient
 
   protected static final String ID = "ID";
 
-  /*
-   * this needs special handling, as it isA sequence_variant in the
-   * Sequence Ontology, but behaves in Ensembl as if it isA transcript
-   */
-  protected static final String NMD_VARIANT = "NMD_transcript_variant";
-
   protected static final String NAME = "Name";
 
   public enum EnsemblSeqType
@@ -312,6 +306,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);
+      }
     }
   }
 
@@ -1098,7 +1099,7 @@ public abstract class EnsemblSeqProxy extends EnsemblRestClient
    */
   public static boolean isTranscript(String featureType)
   {
-    return NMD_VARIANT.equals(featureType)
+    return SequenceOntologyI.NMD_TRANSCRIPT_VARIANT.equals(featureType)
             || SequenceOntologyFactory.getInstance().isA(featureType,
                     SequenceOntologyI.TRANSCRIPT);
   }