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 = '-';
cEnd = seq[bpEnd];
if (checkBpType(c, cEnd))
{
- values['H']++; // H means it's a helix (structured)
+ values['(']++; // H means it's a helix (structured)
}
pairs[c][cEnd]++;
- maxResidue = "H";
+ maxResidue = "(";
}
}
// nonGap++;
residueHash.put(PAIRPROFILE, pairs);
}
- count = values['H'];
+ count = values['('];
residueHash.put(MAXCOUNT, new Integer(count));
residueHash.put(MAXRESIDUE, maxResidue);
result[i] = residueHash;
}
if (bpEnd > 0)
- {
+ {
+ values[')']=values['('];
+ values['(']=0;
+
+ residueHash = new Hashtable();
+ maxResidue = ")";
+
+ if (profile)
+ {
+ residueHash.put(PROFILE, new int[][]
+ { values, new int[]
+ { jSize, (jSize - values['-']) } });
+
+ residueHash.put(PAIRPROFILE, pairs);
+ }
+
+ residueHash.put(MAXCOUNT, new Integer(count));
+ residueHash.put(MAXRESIDUE, maxResidue);
+
+ percentage = ((float) count * 100) / (float) jSize;
+ residueHash.put(PID_GAPS, new Float(percentage));
+
+
result[bpEnd] = residueHash;
}
}
.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;
}