\r
String consString = "";\r
\r
- DrawableSequence consSequence;\r
+ Sequence consSequence;\r
Hashtable propHash;\r
int threshold;\r
- Hashtable[] freqs;\r
\r
String name = "";\r
\r
- public Conservation(String name,Hashtable[] freqs,Hashtable propHash, int threshold, Vector sequences, int start, int end) {\r
+ public Conservation(String name,Hashtable propHash, int threshold, Vector sequences, int start, int end) {\r
this.name = name;\r
- this.freqs = freqs;\r
this.propHash = propHash;\r
this.threshold = threshold;\r
this.sequences = sequences;\r
}\r
}\r
\r
- public int countGaps(int j) {\r
+ public int countGaps(int j)\r
+ {\r
int count = 0;\r
\r
- for (int i = 0; i < sequences.size();i++) {\r
+ for (int i = 0; i < sequences.size();i++)\r
+ {\r
if( j+1 > ((Sequence)sequences.elementAt(i)).getSequence().length())\r
{ count++; continue;}\r
\r
- String tmp = ((Sequence)sequences.elementAt(i)).getSequence().substring(j,j+1);\r
- if (tmp.equals(" ") || tmp.equals(".") || tmp.equals("-")) {\r
+ char c = ((Sequence)sequences.elementAt(i)).getSequence().charAt(j);\r
+ if (jalview.util.Comparison.isGap((c)))\r
count++;\r
- }\r
+\r
}\r
return count;\r
}\r
\r
if (percentageGaps > pgaps)\r
{\r
- Hashtable resultHash = (Hashtable)total.elementAt(i);\r
+ Hashtable resultHash = (Hashtable)total.elementAt(i-start);\r
\r
//Now find the verdict\r
int count = 0;\r
}\r
}\r
\r
- consSequence = new DrawableSequence(name,consString,start,end);\r
+ consSequence = new Sequence(name,consString,start,end);\r
}\r
\r
- public jalview.gui.DrawableSequence getConsSequence() {\r
+ public Sequence getConsSequence() {\r
return consSequence;\r
}\r
\r