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
JAL-1841 JAL-2215 add the ‘ignore gaps’ structure consensus fraction
[jalview.git]
/
src
/
jalview
/
analysis
/
StructureFrequency.java
diff --git
a/src/jalview/analysis/StructureFrequency.java
b/src/jalview/analysis/StructureFrequency.java
index
479c856
..
29bdb7a
100644
(file)
--- a/
src/jalview/analysis/StructureFrequency.java
+++ b/
src/jalview/analysis/StructureFrequency.java
@@
-114,6
+114,7
@@
public class StructureFrequency
{
int canonicalOrWobblePairCount = 0;
int otherPairCount = 0;
{
int canonicalOrWobblePairCount = 0;
int otherPairCount = 0;
+ int nongap = 0;
maxResidue = "-";
values = new int[255];
pairs = new int[255][255];
maxResidue = "-";
values = new int[255];
pairs = new int[255][255];
@@
-161,7
+162,7
@@
public class StructureFrequency
values['-']++;
continue;
}
values['-']++;
continue;
}
-
+ nongap++;
/*
* ensure upper-case for counting purposes
*/
/*
* ensure upper-case for counting purposes
*/
@@
-188,7
+189,6
@@
public class StructureFrequency
pairs[c][cEnd]++;
}
}
pairs[c][cEnd]++;
}
}
- // nonGap++;
}
residueHash = new Hashtable();
}
residueHash = new Hashtable();
@@
-222,8
+222,9
@@
public class StructureFrequency
percentage = ((float) count * 100) / jSize;
residueHash.put(PID_GAPS, new Float(percentage));
percentage = ((float) count * 100) / jSize;
residueHash.put(PID_GAPS, new Float(percentage));
- // percentage = ((float) count * 100) / (float) nongap;
- // residueHash.put(PID_NOGAPS, new Float(percentage));
+ percentage = ((float) count * 100) / nongap;
+ residueHash.put(PID_NOGAPS, new Float(percentage));
+
if (result[i] == null)
{
result[i] = residueHash;
if (result[i] == null)
{
result[i] = residueHash;
@@
-251,6
+252,9
@@
public class StructureFrequency
percentage = ((float) count * 100) / jSize;
residueHash.put(PID_GAPS, new Float(percentage));
percentage = ((float) count * 100) / jSize;
residueHash.put(PID_GAPS, new Float(percentage));
+ percentage = ((float) count * 100) / nongap;
+ residueHash.put(PID_NOGAPS, new Float(percentage));
+
result[bpEnd] = residueHash;
}
}
result[bpEnd] = residueHash;
}
}