/*
* proportion of aligned sequence that is ungapped
- * (note: not normalised by alignment width here)
+ * (note: normalised by alignment width here)
*/
- float ungapped = (seqLength - gapCount) / (float) seqLength;
+ float ungapped = (seqWidth - gapCount) / (float) seqWidth;
maxUngapped = Math.max(maxUngapped, ungapped);
minUngapped = Math.min(minUngapped, ungapped);
}
appendRow(sb, "Maximum (sequence length / width)",
String.format(PCT_FORMAT, maxUngapped * 100f), html);
appendRow(sb, "Residue density", String.format(PCT_FORMAT,
- (totalLength - totalGaps) * 100f / totalLength), html);
+ (height * width - totalGaps) * 100f / (height * width)), html);
appendRow(sb, "Gap density",
- String.format(PCT_FORMAT, totalGaps * 100f / totalLength),
+ String.format(PCT_FORMAT, totalGaps * 100f / (height * width)),
html);
sb.append(html ? "</table>" : nl);