JAL-1645 Version-Rel Version 2.9 Year-Rel 2015 Licensing glob
[jalview.git] / src / jalview / ws / jws2 / AADisorderClient.java
index dfb13a6..d955db5 100644 (file)
@@ -1,6 +1,6 @@
 /*
- * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$)
- * Copyright (C) $$Year-Rel$$ The Jalview Authors
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.9)
+ * Copyright (C) 2015 The Jalview Authors
  * 
  * This file is part of Jalview.
  * 
@@ -104,34 +104,29 @@ public class AADisorderClient extends JabawsCalcWorker implements
     Map<String, String[]> fmap;
     featureMap.put(compbio.ws.client.Services.IUPredWS.toString(),
             fmap = new HashMap<String, String[]>());
-    fmap.put("Glob", new String[]
-    { "Globular Domain", "Predicted globular domain" });
+    fmap.put("Glob", new String[] { "Globular Domain",
+        "Predicted globular domain" });
     featureMap.put(compbio.ws.client.Services.JronnWS.toString(),
             fmap = new HashMap<String, String[]>());
     featureMap.put(compbio.ws.client.Services.DisemblWS.toString(),
             fmap = new HashMap<String, String[]>());
-    fmap.put("REM465", new String[]
-    { "REM465", "Missing density" });
-    fmap.put("HOTLOOPS", new String[]
-    { "HOTLOOPS", "Flexible loops" });
-    fmap.put("COILS", new String[]
-    { "COILS", "Random coil" });
+    fmap.put("REM465", new String[] { "REM465", "Missing density" });
+    fmap.put("HOTLOOPS", new String[] { "HOTLOOPS", "Flexible loops" });
+    fmap.put("COILS", new String[] { "COILS", "Random coil" });
     featureMap.put(compbio.ws.client.Services.GlobPlotWS.toString(),
             fmap = new HashMap<String, String[]>());
-    fmap.put("GlobDoms", new String[]
-    { "Globular Domain", "Predicted globular domain" });
-    fmap.put("Disorder", new String[]
-    { "Protein Disorder", "Probable unstructured peptide region" });
+    fmap.put("GlobDoms", new String[] { "Globular Domain",
+        "Predicted globular domain" });
+    fmap.put("Disorder", new String[] { "Protein Disorder",
+        "Probable unstructured peptide region" });
     Map<String, Map<String, Object>> amap;
     annotMap = new HashMap<String, Map<String, Map<String, Object>>>();
     annotMap.put(compbio.ws.client.Services.GlobPlotWS.toString(),
             amap = new HashMap<String, Map<String, Object>>());
     amap.put("Dydx", new HashMap<String, Object>());
     amap.get("Dydx").put(DONTCOMBINE, DONTCOMBINE);
-    amap.get("Dydx").put(THRESHOLD, new double[]
-    { 1, 0 });
-    amap.get("Dydx").put(RANGE, new float[]
-    { -1, +1 });
+    amap.get("Dydx").put(THRESHOLD, new double[] { 1, 0 });
+    amap.get("Dydx").put(RANGE, new float[] { -1, +1 });
 
     amap.put("SmoothedScore", new HashMap<String, Object>());
     amap.get("SmoothedScore").put(INVISIBLE, INVISIBLE);
@@ -142,39 +137,27 @@ public class AADisorderClient extends JabawsCalcWorker implements
     amap.put("COILS", new HashMap<String, Object>());
     amap.put("HOTLOOPS", new HashMap<String, Object>());
     amap.put("REM465", new HashMap<String, Object>());
-    amap.get("COILS").put(THRESHOLD, new double[]
-    { 1, 0.516 });
-    amap.get("COILS").put(RANGE, new float[]
-    { 0, 1 });
-
-    amap.get("HOTLOOPS").put(THRESHOLD, new double[]
-    { 1, 0.6 });
-    amap.get("HOTLOOPS").put(RANGE, new float[]
-    { 0, 1 });
-    amap.get("REM465").put(THRESHOLD, new double[]
-    { 1, 0.1204 });
-    amap.get("REM465").put(RANGE, new float[]
-    { 0, 1 });
+    amap.get("COILS").put(THRESHOLD, new double[] { 1, 0.516 });
+    amap.get("COILS").put(RANGE, new float[] { 0, 1 });
+
+    amap.get("HOTLOOPS").put(THRESHOLD, new double[] { 1, 0.6 });
+    amap.get("HOTLOOPS").put(RANGE, new float[] { 0, 1 });
+    amap.get("REM465").put(THRESHOLD, new double[] { 1, 0.1204 });
+    amap.get("REM465").put(RANGE, new float[] { 0, 1 });
 
     annotMap.put(compbio.ws.client.Services.IUPredWS.toString(),
             amap = new HashMap<String, Map<String, Object>>());
     amap.put("Long", new HashMap<String, Object>());
     amap.put("Short", new HashMap<String, Object>());
-    amap.get("Long").put(THRESHOLD, new double[]
-    { 1, 0.5 });
-    amap.get("Long").put(RANGE, new float[]
-    { 0, 1 });
-    amap.get("Short").put(THRESHOLD, new double[]
-    { 1, 0.5 });
-    amap.get("Short").put(RANGE, new float[]
-    { 0, 1 });
+    amap.get("Long").put(THRESHOLD, new double[] { 1, 0.5 });
+    amap.get("Long").put(RANGE, new float[] { 0, 1 });
+    amap.get("Short").put(THRESHOLD, new double[] { 1, 0.5 });
+    amap.get("Short").put(RANGE, new float[] { 0, 1 });
     annotMap.put(compbio.ws.client.Services.JronnWS.toString(),
             amap = new HashMap<String, Map<String, Object>>());
     amap.put("JRonn", new HashMap<String, Object>());
-    amap.get("JRonn").put(THRESHOLD, new double[]
-    { 1, 0.5 });
-    amap.get("JRonn").put(RANGE, new float[]
-    { 0, 1 });
+    amap.get("JRonn").put(THRESHOLD, new double[] { 1, 0.5 });
+    amap.get("JRonn").put(RANGE, new float[] { 0, 1 });
   }
 
   @Override
@@ -249,8 +232,8 @@ public class AADisorderClient extends JabawsCalcWorker implements
                 if (type == null)
                 {
                   // create a default type for this feature
-                  type = new String[]
-                  { typeName + " (" + scr.getMethod() + ")",
+                  type = new String[] {
+                      typeName + " (" + scr.getMethod() + ")",
                       service.getActionText() };
                 }
                 if (vals.hasNext())
@@ -265,7 +248,7 @@ public class AADisorderClient extends JabawsCalcWorker implements
                           + rn.from, base + rn.to, methodName);
                 }
                 dseq.addSequenceFeature(sf);
-                if (last != val && last != Float.NaN)
+                if (last != val && !Float.isNaN(last))
                 {
                   fc.put(sf.getType(), sf);
                 }
@@ -285,8 +268,7 @@ public class AADisorderClient extends JabawsCalcWorker implements
                       typename = service.serviceType + " ("
                               + scr.getMethod() + ")",
                       calcName = service.getServiceTypeURI() + "/"
-                              + scr.getMethod(),
-                      aseq, base + 1, scr);
+                              + scr.getMethod(), aseq, base + 1, scr);
               annot.graph = AlignmentAnnotation.LINE_GRAPH;
 
               Map<String, Object> styleMap = (annotTypeMap == null) ? null