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
isGap method implemented in utils
[jalview.git]
/
src
/
jalview
/
schemes
/
ScoreColourScheme.java
diff --git
a/src/jalview/schemes/ScoreColourScheme.java
b/src/jalview/schemes/ScoreColourScheme.java
index
89e94fd
..
225f8dd
100755
(executable)
--- a/
src/jalview/schemes/ScoreColourScheme.java
+++ b/
src/jalview/schemes/ScoreColourScheme.java
@@
-22,35
+22,27
@@
public class ScoreColourScheme extends ResidueColourScheme {
this.max = max;
\r
}
\r
\r
this.max = max;
\r
}
\r
\r
- /* public Color getColour(SequenceI seq, int j, Vector aa) {
\r
- Color c = Color.white;
\r
- String s = seq.getSequence(j,j+1);
\r
+
\r
+ public Color findColour(String s,int j,Vector aa)
\r
+ {
\r
\r
if (threshold > 0)
\r
{
\r
\r
if (threshold > 0)
\r
{
\r
- if (aboveThreshold(aa,seq,j,threshold))
\r
- c = findColour(seq,s,j,aa);
\r
+ if (!aboveThreshold(aa,s,j))
\r
+ return Color.white;
\r
}
\r
}
\r
- else if ( !s.equals("-") && !s.equals(".") && !s.equals(" ") )
\r
- c = findColour(seq,s,j,aa);
\r
- // else
\r
- // c = Color.white;
\r
-
\r
- return c;
\r
- }*/
\r
-
\r
- public Color findColour(SequenceI seq,String s,int j,Vector aa)
\r
- {
\r
\r
float red = (float)(scores[((Integer)ResidueProperties.aaHash.get(s)).intValue()]
\r
- (float)min)/(float)(max - min);
\r
\r
float red = (float)(scores[((Integer)ResidueProperties.aaHash.get(s)).intValue()]
\r
- (float)min)/(float)(max - min);
\r
- if (red > (float)1.0)
\r
- red = (float)1.0;
\r
+ if (red > 1.0f)
\r
+ red = 1.0f;
\r
+
\r
+ if (red < 0.0f)
\r
+ red = 0.0f;
\r
\r
\r
- if (red < (float)0.0)
\r
- red = (float)0.0;
\r
+ char c = s.charAt(0);
\r
\r
\r
- if(s.equals(" ")|| s.equals(".") || s.equals("-"))
\r
+ if(jalview.util.Comparison.isGap((c)))
\r
return Color.white;
\r
\r
// This isn';t great - pool of colours in here?
\r
return Color.white;
\r
\r
// This isn';t great - pool of colours in here?
\r