git://source.jalview.org
/
jalview.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
JAL-3574 Matcher with integer/long value pattern (e.g. VCF POS locus)
[jalview.git]
/
src
/
jalview
/
analysis
/
ParseProperties.java
diff --git
a/src/jalview/analysis/ParseProperties.java
b/src/jalview/analysis/ParseProperties.java
index
3347800
..
4b68d93
100644
(file)
--- a/
src/jalview/analysis/ParseProperties.java
+++ b/
src/jalview/analysis/ParseProperties.java
@@
-20,12
+20,12
@@
*/
package jalview.analysis;
*/
package jalview.analysis;
-import com.stevesoft.pat.Regex;
-
import jalview.datamodel.AlignmentAnnotation;
import jalview.datamodel.AlignmentI;
import jalview.datamodel.SequenceI;
import jalview.datamodel.AlignmentAnnotation;
import jalview.datamodel.AlignmentI;
import jalview.datamodel.SequenceI;
+import com.stevesoft.pat.Regex;
+
public class ParseProperties
{
/**
public class ParseProperties
{
/**
@@
-57,9
+57,9
@@
public class ParseProperties
public int getScoresFromDescription(String ScoreName,
String ScoreDescriptions, String regex, boolean repeat)
{
public int getScoresFromDescription(String ScoreName,
String ScoreDescriptions, String regex, boolean repeat)
{
- return getScoresFromDescription(new String[]
- { ScoreName }, new String[]
- { ScoreDescriptions }, regex, repeat);
+ return getScoresFromDescription(new String[] { ScoreName },
+ new String[]
+ { ScoreDescriptions }, regex, repeat);
}
public int getScoresFromDescription(String[] ScoreNames,
}
public int getScoresFromDescription(String[] ScoreNames,
@@
-86,9
+86,8
@@
public class ParseProperties
* description string of each sequence
* @return total number of sequences that matched the regex
*/
* 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);
{
int count = 0;
Regex pattern = new Regex(regex);
@@
-135,15
+134,15
@@
public class ParseProperties
double score = Double.NaN;
try
{
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.
} 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: '"
ScoreDescriptions[cols], null);
an.setScore(score);
System.out.println(seqs[i].getName() + " score: '"