{\r
menu.setText("Taylor colour scheme");\r
String [] res = new String[]{"A","V","I","L","M","F","Y","W","H","R","K","N","Q","E","D","S","T","G","P","C"};\r
- Color [] col = new Color[20];\r
- for (int i=0; i<20; i++)\r
+ Color [] col = new Color[res.length];\r
+ for (int i=0; i<res.length; i++)\r
col[i] = ResidueProperties.taylor[ ((Integer)ResidueProperties.aaHash.get(res[i])).intValue() ];\r
\r
\r
\r
menu.setText("Hydrophobicity colour scheme");\r
String [] res = new String[]{"I","V","L","F","C","M","A","G","X","T","S","W","Y","P","H","E","Z","Q","D","B","N","K","R"};\r
- Color [] col = new Color[20];\r
+ Color [] col = new Color[res.length];\r
HydrophobicColourScheme cs = new HydrophobicColourScheme();\r
- for (int i=0; i<20; i++)\r
+ for (int i=0; i<res.length; i++)\r
col[i] = cs.findColour(null, res[i], -1, null);\r
\r
displayKey( res, null, col, "According to the hydrophobicity table of Kyte, J., and Doolittle, R.F., J. Mol. Biol. 1157, 105-132, 1982. The most hydrophobic residues according to this table are coloured red and the most hydrophilic ones are coloured blue.");\r