X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fanalysis%2FParseProperties.java;h=94b7b997ecf8116fbd28fc7d7523542a51770685;hb=b254ce17e47c43d19804efa129367291a79b1315;hp=c580c77e645b145b1c2fe16dbd861c39a1e5a6ce;hpb=838e4f91d4a53dd315640dbc9ff6ef7a815ee576;p=jalview.git diff --git a/src/jalview/analysis/ParseProperties.java b/src/jalview/analysis/ParseProperties.java index c580c77..94b7b99 100644 --- a/src/jalview/analysis/ParseProperties.java +++ b/src/jalview/analysis/ParseProperties.java @@ -1,6 +1,6 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Version 2.9.0b1) - * Copyright (C) 2015 The Jalview Authors + * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$) + * Copyright (C) $$Year-Rel$$ The Jalview Authors * * This file is part of Jalview. * @@ -58,7 +58,8 @@ public class ParseProperties String ScoreDescriptions, String regex, boolean repeat) { return getScoresFromDescription(new String[] { ScoreName }, - new String[] { ScoreDescriptions }, regex, repeat); + new String[] + { ScoreDescriptions }, regex, repeat); } public int getScoresFromDescription(String[] ScoreNames, @@ -85,9 +86,8 @@ public class ParseProperties * description string of each sequence * @return total number of sequences that matched the regex */ - public int getScoresFromDescription(SequenceI[] seqs, - String[] ScoreNames, String[] ScoreDescriptions, String regex, - boolean repeat) + public int getScoresFromDescription(SequenceI[] seqs, String[] ScoreNames, + String[] ScoreDescriptions, String regex, boolean repeat) { int count = 0; Regex pattern = new Regex(regex); @@ -134,18 +134,18 @@ public class ParseProperties double score = Double.NaN; try { - score = new Double(sstring).doubleValue(); + score = Double.valueOf(sstring).doubleValue(); } catch (Exception e) { // don't try very hard to parse if regex was wrong. continue; } // add score to sequence annotation. - AlignmentAnnotation an = new AlignmentAnnotation(ScoreNames[cols] - + ((reps > 0) ? "_" + reps : ""), + AlignmentAnnotation an = new AlignmentAnnotation( + ScoreNames[cols] + ((reps > 0) ? "_" + reps : ""), ScoreDescriptions[cols], null); an.setScore(score); - System.out.println(seqs[i].getName() + " score: '" + jalview.bin.Console.outPrintln(seqs[i].getName() + " score: '" + ScoreNames[cols] + "' = " + score); // DEBUG an.setSequenceRef(seqs[i]); seqs[i].addAlignmentAnnotation(an);