profile[0] = AlignmentAnnotation.SEQUENCE_PROFILE;
profile[1] = size;
- profile[2] = totalCount / 100;
+ profile[2] = 100;
if (totalCount != 0)
{
int arrayPos = 3;
for (int k = size - 1; k >= 0; k--)
{
- Double percentage;
+ Float percentage;
Integer value = values[k];
- percentage = (value.doubleValue() / totalCount.doubleValue())
- * 100d;
+ if (removeBelowBackground)
+ {
+ percentage = (value.floatValue() / totalCount.floatValue())
+ * 100;
+ }
+ else
+ {
+ percentage = value.floatValue() / 100f;
+ }
+ int intPercent = Math.round(percentage);
profile[arrayPos] = symbols[k];
- profile[arrayPos + 1] = percentage.intValue();
+ profile[arrayPos + 1] = intPercent;
arrayPos += 2;
}
}
}
}
value = value * 10000;
- return value.intValue();
+ return Math.round(value.floatValue());
}
}