git://source.jalview.org
/
jalview.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
regular expression added
[jalview.git]
/
src
/
jalview
/
analysis
/
Conservation.java
diff --git
a/src/jalview/analysis/Conservation.java
b/src/jalview/analysis/Conservation.java
index
4a93eef
..
eed6d0a
100755
(executable)
--- a/
src/jalview/analysis/Conservation.java
+++ b/
src/jalview/analysis/Conservation.java
@@
-35,13
+35,11
@@
public class Conservation {
DrawableSequence consSequence;
\r
Hashtable propHash;
\r
int threshold;
\r
DrawableSequence consSequence;
\r
Hashtable propHash;
\r
int threshold;
\r
- Hashtable[] freqs;
\r
\r
String name = "";
\r
\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.name = name;
\r
- this.freqs = freqs;
\r
this.propHash = propHash;
\r
this.threshold = threshold;
\r
this.sequences = sequences;
\r
this.propHash = propHash;
\r
this.threshold = threshold;
\r
this.sequences = sequences;
\r
@@
-121,17
+119,19
@@
public class Conservation {
}
\r
}
\r
\r
}
\r
}
\r
\r
- public int countGaps(int j) {
\r
+ public int countGaps(int j)
\r
+ {
\r
int count = 0;
\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
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
count++;
\r
- }
\r
+
\r
}
\r
return count;
\r
}
\r
}
\r
return count;
\r
}
\r
@@
-145,7
+145,7
@@
public class Conservation {
\r
if (percentageGaps > pgaps)
\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
//Now find the verdict
\r
int count = 0;
\r