* ((c == 0) ? "" : "; ") + alphabet[c] + " " + ((int) tval) + "%"; } }
* else {
*/
- Object[] ca = new Object[625];
+ int[][] ca = new int[625][];
float[] vl = new float[625];
int x = 0;
for (int c = 65; c < 90; c++)
jalview.util.QuickSort.sort(vl, ca);
int p = 0;
+ /*
+ * profile[1] is {total, ungappedTotal}
+ */
+ final int divisor = profile[1][ignoreGapsInConsensusCalculation ? 1
+ : 0];
for (int c = 624; c > 0; c--)
{
if (vl[c] > 0)
{
- tval = (vl[c] * 100f / profile[1][ignoreGapsInConsensusCalculation ? 1
- : 0]);
- mouseOver += ((p == 0) ? "" : "; ") + (char) ((int[]) ca[c])[0]
- + (char) ((int[]) ca[c])[1] + " " + fmt.form(tval)
+ tval = (vl[c] * 100f / divisor);
+ mouseOver += ((p == 0) ? "" : "; ") + (char) ca[c][0]
+ + (char) ca[c][1] + " " + fmt.form(tval)
+ "%";
p++;
int valuesCount = 0;
rtnval[1] = 0;
int offset = 2;
+ final int divisor = profile[1][ignoreGapsInConsensusCalculation ? 1 : 0];
for (int c = 624; c > 0; c--)
{
if (vl[c] > 0)
{
rtnval[offset++] = ca[c][0];
rtnval[offset++] = ca[c][1];
- rtnval[offset] = (int) (vl[c] * 100f / profile[1][ignoreGapsInConsensusCalculation ? 1
- : 0]);
+ rtnval[offset] = (int) (vl[c] * 100f / divisor);
rtnval[1] += rtnval[offset++];
valuesCount++;
}