git://source.jalview.org
/
jalview.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
aafe9bf
)
blosum colour now displayed ok
author
amwaterhouse
<Andrew Waterhouse>
Thu, 14 Apr 2005 16:52:43 +0000
(16:52 +0000)
committer
amwaterhouse
<Andrew Waterhouse>
Thu, 14 Apr 2005 16:52:43 +0000
(16:52 +0000)
src/jalview/schemes/ConservationColourScheme.java
patch
|
blob
|
history
diff --git
a/src/jalview/schemes/ConservationColourScheme.java
b/src/jalview/schemes/ConservationColourScheme.java
index
f8db803
..
cef65c2
100755
(executable)
--- a/
src/jalview/schemes/ConservationColourScheme.java
+++ b/
src/jalview/schemes/ConservationColourScheme.java
@@
-24,7
+24,6
@@
import jalview.analysis.*;
\r
public class ConservationColourScheme extends ResidueColourScheme {
\r
public Conservation conserve;
\r
\r
public class ConservationColourScheme extends ResidueColourScheme {
\r
public Conservation conserve;
\r
- boolean byResidue = true;
\r
public ColourSchemeI cs;
\r
public int inc = 30;
\r
int colourThreshold = 7;
\r
public ColourSchemeI cs;
\r
public int inc = 30;
\r
int colourThreshold = 7;
\r
@@
-38,24
+37,21
@@
public class ConservationColourScheme extends ResidueColourScheme {
}
\r
\r
\r
}
\r
\r
\r
- public Color findColour(String s, int i, java.util.Vector whatever)
\r
+ public Color findColour(String s, int i, java.util.Vector v)
\r
{
\r
{
\r
- Color c = null;
\r
+ Color c = Color.white;
\r
+ if(cs == null)
\r
+ return c;
\r
+
\r
if (colourThreshold > 0 && conserve.getConsSequence() != null)
\r
{
\r
if (colourThreshold > 0 && conserve.getConsSequence() != null)
\r
{
\r
- if (conserve.getConsSequence().getSequence().charAt(i)=='*'
\r
- || conserve.getConsSequence().getSequence().charAt(i)=='+')
\r
+ if (conserve.getConsSequence().getSequence().charAt(i) == '*'
\r
+ || conserve.getConsSequence().getSequence().charAt(i) == '+')
\r
{
\r
{
\r
- if (byResidue)
\r
- c = findColour(s, i);
\r
- else
\r
- c = Color.red;
\r
+ c = cs.findColour(s, i, v);
\r
}
\r
else
\r
{
\r
}
\r
else
\r
{
\r
- if (byResidue)
\r
- {
\r
-
\r
int tmp = 10;
\r
int t = 0;
\r
if (!jalview.util.Comparison.isGap(conserve.getConsSequence().
\r
int tmp = 10;
\r
int t = 0;
\r
if (!jalview.util.Comparison.isGap(conserve.getConsSequence().
\r
@@
-63,30
+59,17
@@
public class ConservationColourScheme extends ResidueColourScheme {
t = Integer.parseInt(conserve.getConsSequence().getSequence().
\r
substring(i, i + 1));
\r
\r
t = Integer.parseInt(conserve.getConsSequence().getSequence().
\r
substring(i, i + 1));
\r
\r
- c = findColour(s, i);
\r
-
\r
+ c = cs.findColour(s, i, v);
\r
while (tmp >= t)
\r
{
\r
while (tmp >= t)
\r
{
\r
- // c = c.darker();
\r
c = lighter(c, inc);
\r
tmp--;
\r
}
\r
c = lighter(c, inc);
\r
tmp--;
\r
}
\r
- }
\r
- else
\r
- c = Color.yellow;
\r
}
\r
}
\r
return c;
\r
}
\r
\r
}
\r
}
\r
return c;
\r
}
\r
\r
- public Color findColour(String s, int j) {
\r
- if(cs!=null)
\r
- return cs.findColour( s, j, null);
\r
- else
\r
- return Color.white;
\r
- }
\r
-
\r
-
\r
\r
public Color lighter(Color c, int inc) {
\r
int red = c.getRed();
\r
\r
public Color lighter(Color c, int inc) {
\r
int red = c.getRed();
\r