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
TreePanel takes viewport
[jalview.git]
/
src
/
jalview
/
schemes
/
Blosum62ColourScheme.java
diff --git
a/src/jalview/schemes/Blosum62ColourScheme.java
b/src/jalview/schemes/Blosum62ColourScheme.java
index
1aea477
..
6e91e0b
100755
(executable)
--- a/
src/jalview/schemes/Blosum62ColourScheme.java
+++ b/
src/jalview/schemes/Blosum62ColourScheme.java
@@
-18,7
+18,6
@@
*/
\r
package jalview.schemes;
\r
\r
*/
\r
package jalview.schemes;
\r
\r
-import java.util.*;
\r
\r
import java.awt.*;
\r
\r
\r
import java.awt.*;
\r
\r
@@
-32,20
+31,26
@@
public class Blosum62ColourScheme
\r
public Color findColour(String s, int j)
\r
{
\r
\r
public Color findColour(String s, int j)
\r
{
\r
+ char res = s.charAt(0);
\r
+ if ('a' <= res && res <= 'z' )
\r
+ {
\r
+ // TO UPPERCASE !!!
\r
+ s = String.valueOf( res -= ('a' - 'A') );
\r
+ }
\r
+
\r
+
\r
if ( (threshold != 0) && !aboveThreshold(s, j))
\r
{
\r
return Color.white;
\r
}
\r
\r
if ( (threshold != 0) && !aboveThreshold(s, j))
\r
{
\r
return Color.white;
\r
}
\r
\r
- Hashtable hash = (Hashtable) consensus.elementAt(j);
\r
-
\r
- if (!jalview.util.Comparison.isGap( (s.charAt(0))))
\r
+ if (!jalview.util.Comparison.isGap( res ))
\r
{
\r
{
\r
- String max = (String) hash.get("maxResidue");
\r
+ String max = (String) consensus[j].get("maxResidue");
\r
\r
if (max.indexOf(s) > -1)
\r
{
\r
\r
if (max.indexOf(s) > -1)
\r
{
\r
- return new Color(154, 154, 255);
\r
+ currentColour = new Color(154, 154, 255);
\r
}
\r
else
\r
{
\r
}
\r
else
\r
{
\r
@@
-62,17
+67,22
@@
public class Blosum62ColourScheme
\r
if (c > 0)
\r
{
\r
\r
if (c > 0)
\r
{
\r
- return new Color(204, 204, 255);
\r
+ currentColour = new Color(204, 204, 255);
\r
}
\r
else
\r
{
\r
}
\r
else
\r
{
\r
- return Color.white;
\r
+ currentColour = Color.white;
\r
}
\r
}
\r
}
\r
}
\r
+
\r
+ if(conservationColouring)
\r
+ applyConservation(j);
\r
}
\r
else
\r
{
\r
return Color.white;
\r
}
\r
}
\r
else
\r
{
\r
return Color.white;
\r
}
\r
+
\r
+ return currentColour;
\r
}
\r
}
\r
}
\r
}
\r