bug fixed basic score extraction by regex on description method
authorjprocter <Jim Procter>
Thu, 26 Apr 2007 17:13:12 +0000 (17:13 +0000)
committerjprocter <Jim Procter>
Thu, 26 Apr 2007 17:13:12 +0000 (17:13 +0000)
src/jalview/analysis/ParseProperties.java

index c23cb3a..43460d6 100644 (file)
@@ -82,9 +82,9 @@ public class ParseProperties
         for (int cols=0; cols<pattern.numSubs(); cols++)\r
         {\r
           String sstring = pattern.stringMatched(cols+1);\r
-          float score;\r
+          double score=Double.NaN;\r
           try {\r
-            score = new Float(sstring).floatValue();\r
+            score = new Double(sstring).doubleValue();\r
           }\r
           catch (Exception e)\r
           {\r
@@ -94,6 +94,8 @@ public class ParseProperties
           // add score to sequence annotation.\r
           AlignmentAnnotation an = new AlignmentAnnotation(ScoreNames[cols], ScoreDescriptions[cols], null);\r
           an.setScore(score);\r
+          System.out.println("Score: "+ScoreNames[cols]+"="+score); // DEBUG\r
+          an.setSequenceRef(seqs[i]);\r
           seqs[i].addAlignmentAnnotation(an);\r
           al.addAnnotation(an);\r
           added=true;\r