values = new int[255];
pairs = new int[255][255];
bpEnd = -1;
-
- s = struc[i];
+ if(i<struc.length){
+ s = struc[i];
+ }else{
+ s = '-';
+ }
if (s == '.' || s == ' ')
{
s = '-';
.get(StructureFrequency.PROFILE);
if (profile != null && includeAllConsSymbols) // Just responsible for the
// tooltip
+ //TODO Update tooltips for Structure row
{
mouseOver = "";
if (alphabet != null)
if (profile == null)
return null;
- rtnval[0] = 1;
- for (int j = 65; j <= 90; j++)
+ Object[] ca = new Object[625];
+ float[] vl = new float[625];
+ int x=0;
+ for (int c = 65; c < 90; c++)
{
- for (int k = 65; k <= 90; k++)
+ for(int d = 65; d< 90; d++)
{
- if (pairs[j][k] > 0)
- {
- rtnval[rtnval[0]++] = j;
- rtnval[rtnval[0]++] = k;
- rtnval[rtnval[0]++] = (int) ((float) pairs[j][k] * 100f / (float) profile[1][ignoreGapsInConsensusCalculation ? 1
- : 0]);
- }
+ ca[x] = new int[]{ c, d};
+ vl[x] = (float) pairs[c][d];
+ x++;
}
}
-
+ jalview.util.QuickSort.sort(vl, ca);
+
+ rtnval[0] = 1;
+ for (int c=624; c>0; c--)
+ {
+ if (vl[c]>0)
+ {
+ rtnval[rtnval[0]++] = ((int[]) ca[c])[0];
+ rtnval[rtnval[0]++] = ((int[]) ca[c])[1];
+ rtnval[rtnval[0]++] = (int) ((float) vl[c] * 100f / (float) profile[1][ignoreGapsInConsensusCalculation ? 1
+ : 0]);
+ }
+ }
+
return rtnval;
}