JAL-1270 added test for regex actually used; include sequence name in
[jalview.git] / src / jalview / analysis / ParseProperties.java
index 38d8371..3347800 100644 (file)
@@ -22,7 +22,9 @@ package jalview.analysis;
 
 import com.stevesoft.pat.Regex;
 
-import jalview.datamodel.*;
+import jalview.datamodel.AlignmentAnnotation;
+import jalview.datamodel.AlignmentI;
+import jalview.datamodel.SequenceI;
 
 public class ParseProperties
 {
@@ -101,7 +103,9 @@ public class ParseProperties
       ScoreNames = tnames;
       String descrbase = ScoreDescriptions[onamelen - 1];
       if (descrbase == null)
+      {
         descrbase = "Score parsed from (" + regex + ")";
+      }
       tnames = new String[pattern.numSubs() + 1];
       System.arraycopy(ScoreDescriptions, 0, tnames, 0,
               ScoreDescriptions.length);
@@ -116,7 +120,9 @@ public class ParseProperties
     {
       String descr = seqs[i].getDescription();
       if (descr == null)
+      {
         continue;
+      }
       int pos = 0;
       boolean added = false;
       int reps = 0;
@@ -140,7 +146,8 @@ public class ParseProperties
                   + ((reps > 0) ? "_" + reps : ""),
                   ScoreDescriptions[cols], null);
           an.setScore(score);
-          System.out.println("Score: " + ScoreNames[cols] + "=" + score); // DEBUG
+          System.out.println(seqs[i].getName() + " score: '"
+                  + ScoreNames[cols] + "' = " + score); // DEBUG
           an.setSequenceRef(seqs[i]);
           seqs[i].addAlignmentAnnotation(an);
           al.addAnnotation(an);