{\r
Hashtable resultHash, residueHash, ht;\r
int count, thresh, j, jSize = sequences.size();\r
- String sequence, res, type;\r
+ String type, res=null;\r
+ SequenceI sequence;\r
+ char c;\r
Enumeration enumeration, enumeration2;\r
\r
for (int i = start; i <= end; i++)\r
{\r
// JBPNote - have to make sure elements of the sequences vector\r
// are tested like this everywhere...\r
- if (sequences.elementAt(j) instanceof Sequence)\r
- {\r
- sequence = ((Sequence) sequences.elementAt(j)).getSequence();\r
+ sequence = (Sequence) sequences.elementAt(j);\r
\r
- if (sequence.length() > i)\r
+ if (sequence.getLength() > i)\r
{\r
- res = String.valueOf(Character.toUpperCase(sequence.charAt(i)));\r
+ c = sequence.getCharAt(i);\r
+\r
+ if(jalview.util.Comparison.isGap(c))\r
+ c = '-';\r
+\r
+ if ('a' <= c && c <= 'z')\r
+ {\r
+ // TO UPPERCASE !!!\r
+ //Faster than toUpperCase\r
+ c -= ('a' - 'A') ;\r
+ }\r
+\r
+ res = String.valueOf( c );\r
+\r
\r
if (residueHash.containsKey(res))\r
{\r
residueHash.put("-", new Integer(1));\r
}\r
}\r
- }\r
}\r
\r
//What is the count threshold to count the residues in residueHash()\r