/*\r
* Jalview - A Sequence Alignment Editor and Viewer\r
- * Copyright (C) 2005 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle\r
+ * Copyright (C) 2006 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle\r
*\r
* This program is free software; you can redistribute it and/or\r
* modify it under the terms of the GNU General Public License\r
\r
\r
import java.awt.*;\r
+import jalview.analysis.AAFrequency;\r
\r
public class Blosum62ColourScheme\r
extends ResidueColourScheme\r
s = String.valueOf( res -= ('a' - 'A') );\r
}\r
\r
-\r
- if ( j>=consensus.length || (threshold != 0 && !aboveThreshold(s, j) ))\r
+ if (consensus == null ||\r
+ j >= consensus.length ||\r
+ consensus[j] == null ||\r
+ (threshold != 0 && !aboveThreshold(s, j)))\r
{\r
return Color.white;\r
}\r
\r
if (!jalview.util.Comparison.isGap( res ))\r
{\r
- String max = (String) consensus[j].get("maxResidue");\r
+ String max = (String) consensus[j].get(AAFrequency.MAXRESIDUE);\r
\r
if (max.indexOf(s) > -1)\r
{\r