fixes bug 0013013 but reveals lack of a 'features retrieved' flag that should be...
[jalview.git] / src / jalview / ws / JPredClient.java
index 798259a..d353b51 100755 (executable)
@@ -399,7 +399,7 @@ public class JPredClient
         {\r
           jalview.bin.Cache.log.debug("Getting associated alignment.");\r
           // we ignore the returned alignment if we only predicted on a single sequence\r
-          String format = jalview.io.IdentifyFile.Identify(result.getAligfile(),\r
+          String format = new jalview.io.IdentifyFile().Identify(result.getAligfile(),\r
               "Paste");\r
 \r
           if (jalview.io.FormatAdapter.formats.contains(format))\r
@@ -439,6 +439,7 @@ public class JPredClient
           }\r
         }\r
 \r
+        al.setDataset(null);\r
 \r
         AlignmentAnnotation annot;\r
         Annotation[] annotations = null;\r
@@ -460,6 +461,8 @@ public class JPredClient
         // JBPNote Should also rename the query sequence sometime...\r
         i = 0;\r
 \r
+        SequenceI seqRef = al.getSequenceAt(FirstSeq);\r
+\r
         while (i < preds.length)\r
         {\r
           String id = preds[i].getName().toUpperCase();\r
@@ -512,7 +515,7 @@ public class JPredClient
                                               "JNet Output", annotations);\r
             }\r
 \r
-            al.addAnnotation(annot);\r
+            al.addAnnotation(annot, seqRef);\r
 \r
             if (noMsa)\r
             {\r