JAL-1645 Version-Rel Version 2.9 Year-Rel 2015 Licensing glob
[jalview.git] / src / jalview / io / JnetAnnotationMaker.java
index f97cd96..5192454 100755 (executable)
@@ -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.
  * 
@@ -64,12 +64,17 @@ public class JnetAnnotationMaker
     if ((delMap != null && delMap.length > width)
             || (delMap == null && gapmap.length != width))
     {
-      throw (new Exception(MessageManager.formatMessage("exception.number_of_residues_in_query_sequence_differ_from_prediction", new String[]{
-                 (delMap == null ? "" : MessageManager.getString("label.mapped")),
-                 al.getSequenceAt(firstSeq).getName(),
-                 al.getSequenceAt(firstSeq).getSequenceAsString(),
-                 Integer.valueOf(width).toString()
-      })));
+      throw (new Exception(
+              MessageManager
+                      .formatMessage(
+                              "exception.number_of_residues_in_query_sequence_differ_from_prediction",
+                              new String[] {
+                                  (delMap == null ? "" : MessageManager
+                                          .getString("label.mapped")),
+                                  al.getSequenceAt(firstSeq).getName(),
+                                  al.getSequenceAt(firstSeq)
+                                          .getSequenceAsString(),
+                                  Integer.valueOf(width).toString() })));
     }
 
     AlignmentAnnotation annot;
@@ -97,13 +102,13 @@ public class JnetAnnotationMaker
           for (int spos = 0; spos < width; spos++)
           {
             int sposw = (delMap == null) ? gapmap[spos]
-                    : delMap[gapmap[spos]];
+                    : gapmap[delMap[spos]];
             if (firstsol)
             {
               sol[sposw] = new Annotation(0f);
             }
             if (preds[i].getCharAt(spos) == 'B'
-                    && (sol[spos].value == 0f || sol[spos].value < amnt))
+                    && (sol[sposw].value == 0f || sol[sposw].value < amnt))
             {
               sol[sposw].value = amnt;
             }