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
Draw helices correctly
[jalview.git]
/
src
/
jalview
/
schemes
/
PIDColourScheme.java
diff --git
a/src/jalview/schemes/PIDColourScheme.java
b/src/jalview/schemes/PIDColourScheme.java
index
e09745a
..
8686894
100755
(executable)
--- a/
src/jalview/schemes/PIDColourScheme.java
+++ b/
src/jalview/schemes/PIDColourScheme.java
@@
-36,21
+36,26
@@
public class PIDColourScheme
this.thresholds = ResidueProperties.pidThresholds;
\r
}
\r
\r
this.thresholds = ResidueProperties.pidThresholds;
\r
}
\r
\r
- public Color findColour(String s, int j)
\r
+ public Color findColour(char c, int j)
\r
{
\r
{
\r
- char res = s.charAt(0);
\r
- if ('a' <= res && res <= 'z')
\r
+ if ('a' <= c && c <= 'z')
\r
{
\r
{
\r
- s = String.valueOf(res -= ('a' - 'A'));
\r
+ c -= ('a' - 'A');
\r
}
\r
\r
}
\r
\r
+ if (consensus == null
\r
+ || j >= consensus.length
\r
+ || consensus[j]==null)
\r
+ {
\r
+ return Color.white;
\r
+ }
\r
\r
\r
- if ( (threshold != 0) && !aboveThreshold(s, j))
\r
+ if ( (threshold != 0) && !aboveThreshold(c, j))
\r
{
\r
return Color.white;
\r
}
\r
\r
{
\r
return Color.white;
\r
}
\r
\r
- currentColour = Color.white;
\r
+ Color currentColour = Color.white;
\r
\r
double sc = 0;
\r
\r
\r
double sc = 0;
\r
\r
@@
-58,11
+63,11
@@
public class PIDColourScheme
return Color.white;
\r
\r
if ( (Integer.parseInt(consensus[j].get(AAFrequency.MAXCOUNT).toString()) != -1) &&
\r
return Color.white;
\r
\r
if ( (Integer.parseInt(consensus[j].get(AAFrequency.MAXCOUNT).toString()) != -1) &&
\r
- consensus[j].contains(s))
\r
+ consensus[j].contains(String.valueOf(c)))
\r
{
\r
sc = ( (Float) consensus[j].get(ignoreGaps)).floatValue();
\r
\r
{
\r
sc = ( (Float) consensus[j].get(ignoreGaps)).floatValue();
\r
\r
- if (!jalview.util.Comparison.isGap(res))
\r
+ if (!jalview.util.Comparison.isGap(c))
\r
{
\r
for (int i = 0; i < thresholds.length; i++)
\r
{
\r
{
\r
for (int i = 0; i < thresholds.length; i++)
\r
{
\r
@@
-77,7
+82,7
@@
public class PIDColourScheme
}
\r
\r
if(conservationColouring)
\r
}
\r
\r
if(conservationColouring)
\r
- applyConservation(j);
\r
+ currentColour = applyConservation(currentColour, j);
\r
\r
return currentColour;
\r
}
\r
\r
return currentColour;
\r
}
\r