}
}
int len = 72 - maxid - 1;
- int nochunks = ((aseq1.length - count) / len) + 1;
+ int nochunks = ((aseq1.length - count) / len)
+ + ((aseq1.length - count) % len > 0 ? 1 : 0);
pid = 0;
- output.append("Sequence \u27f7 Structure mapping details: ")
- .append(NEWLINE);
+ output.append("Score = ").append(score[maxi][maxj]).append(NEWLINE);
+ output.append("Length of alignment = ")
+ .append(String.valueOf(aseq1.length - count)).append(NEWLINE);
+ output.append("Sequence ");
output.append(new Format("%" + maxid + "s").form(s1.getName()));
output.append(" : ").append(String.valueOf(s1.getStart()))
.append(" - ").append(String.valueOf(s1.getEnd()));
output.append(" (Sequence length = ")
.append(String.valueOf(s1str.length())).append(")")
.append(NEWLINE);
- // output.append("Sequence ");
+ output.append("Sequence ");
output.append(new Format("%" + maxid + "s").form(s2.getName()));
output.append(" : ").append(String.valueOf(s2.getStart()))
.append(" - ").append(String.valueOf(s2.getEnd()));
.append(String.valueOf(s2str.length())).append(")")
.append(NEWLINE).append(NEWLINE);
- // output mappings
for (int j = 0; j < nochunks; j++)
{
// Print the first aligned sequence
output.append(NEWLINE).append(NEWLINE);
}
- output.append("Length of alignment = ")
- .append(String.valueOf(aseq1.length - count)).append(NEWLINE);
- output.append("Score = ").append(score[maxi][maxj]).append(NEWLINE);
-
pid = pid / (aseq1.length - count) * 100;
- output = output.append(new Format("Percentage ID = %2.2f\n\n")
+ output = output.append(new Format("Percentage ID = %2.2f\n")
.form(pid));
-
- output.append(NEWLINE).append(
- "Mapping method: Needleman & Wunsch Alignment");
try
{
os.print(output.toString());