Scrolls if dragged off the screen
[jalview.git] / src / jalview / ws / JPredClient.java
index f503f91..8a4368c 100755 (executable)
@@ -108,7 +108,7 @@ public class JPredClient
     WebServiceName = "JNetWS";\r
     WebServiceJobTitle = "JNet secondary structure prediction";\r
     WebServiceReference =\r
-        "\"Cuff J. A and Barton G.J (1999) Application of enhanced " +\r
+        "\"Cuff J. A and Barton G.J (2000) Application of " +\r
         "multiple sequence alignment profiles to improve protein secondary structure prediction, " +\r
         "Proteins 40:502-511\".";\r
     WsURL = "http://www.compbio.dundee.ac.uk/JalviewWS/services/jpred";\r
@@ -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
@@ -503,7 +506,8 @@ public class JPredClient
             {\r
               annot = new AlignmentAnnotation(preds[i].getName(),\r
                                               "JNet Output", annotations, 0f,\r
-                                              10f, 1);\r
+                                              10f,\r
+                                              AlignmentAnnotation.BAR_GRAPH);\r
             }\r
             else\r
             {\r
@@ -511,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
@@ -544,8 +548,7 @@ public class JPredClient
       }\r
       catch (Exception ex)\r
       {\r
-        jalview.bin.Cache.log.warn("Exception whilst parsing JNet style secondary structure prediction.");\r
-        jalview.bin.Cache.log.debug("Exception: ",ex);\r
+        jalview.bin.Cache.log.warn("Exception whilst parsing JNet style secondary structure prediction.",ex);\r
       }\r
     }\r
   }\r