- /** Takes in a !!ARRAY!! of sequences and column start and column end\r
- * and fills given Vector of size (end-start+1). Each element of the\r
- * vector contains a hashtable with the keys being residues and\r
- * the values being the count of each residue in that column.\r
- * This class is used extensively in calculating alignment colourschemes\r
- * that depend on the amount of conservation in each alignment column. */\r
-\r
- public static final Hashtable [] calculate(Vector sequences, int start, int end)\r
- {\r
- SequenceI [] seqs = new SequenceI[sequences.size()];\r
- int width = 0;\r
- for(int i=0; i<sequences.size(); i++)\r
- {\r
- seqs[i] = (SequenceI) sequences.elementAt(i);\r
- if(seqs[i].getLength()>width)\r
- width = seqs[i].getLength();\r
- }\r
-\r
- Hashtable [] reply = new Hashtable[width];\r
-\r
- calculate(seqs, start, end, reply);\r
-\r
- return reply;\r
- }\r
-\r
-public static final void calculate(SequenceI[] sequences,\r
- int start, int end,\r
- Hashtable [] result)\r
-{\r
- Hashtable residueHash;\r
- int maxCount, nongap, i, j, v, jSize = sequences.length;\r
- String maxResidue;\r
- char c;\r
- float percentage;\r
+ //No need to store 1000s of strings which are not\r
+ //visible to the user.\r
+ public static final String MAXCOUNT = "C";\r
+ public static final String MAXRESIDUE = "R";\r
+ public static final String PID_GAPS = "G";\r
+ public static final String PID_NOGAPS = "N";\r
+\r
+ public static final Hashtable[] calculate(Vector sequences, int start,\r
+ int end)\r
+ {\r
+ SequenceI[] seqs = new SequenceI[sequences.size()];\r
+ int width = 0;\r
+ for (int i = 0; i < sequences.size(); i++)\r
+ {\r
+ seqs[i] = (SequenceI) sequences.elementAt(i);\r
+ if (seqs[i].getLength() > width)\r
+ {\r
+ width = seqs[i].getLength();\r
+ }\r
+ }\r