X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fanalysis%2FParseProperties.java;h=9937a4729e4ad7d93de8f40748561e59ab879e8c;hb=a83adb45bdf9554e270921b4baad94defd314b36;hp=eb639b63a03108074f74a638f2ff8b71241bb6a9;hpb=37de9310bec3501cbc6381e0c3dcb282fcaad812;p=jalview.git diff --git a/src/jalview/analysis/ParseProperties.java b/src/jalview/analysis/ParseProperties.java index eb639b6..9937a47 100644 --- a/src/jalview/analysis/ParseProperties.java +++ b/src/jalview/analysis/ParseProperties.java @@ -23,6 +23,7 @@ package jalview.analysis; import jalview.datamodel.AlignmentAnnotation; import jalview.datamodel.AlignmentI; import jalview.datamodel.SequenceI; +import jalview.util.Platform; import com.stevesoft.pat.Regex; @@ -58,7 +59,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,12 +87,11 @@ 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); + Regex pattern = Platform.newRegex(regex, null); if (pattern.numSubs() > ScoreNames.length) { // Check that we have enough labels and descriptions for any parsed @@ -141,8 +142,8 @@ public class ParseProperties 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: '"