- if (score > maxscore)
- {
- maxscore = score;
- }
- }
- }
-
- for (int i = 0; i < (noseqs - 1); i++)
- {
- for (int j = i; j < noseqs; j++)
- {
- distance[i][j] = (float) maxscore - distance[i][j];
- distance[j][i] = distance[i][j];
- }
- }
-
- }
- return distance;
-
- // else
- /* else if (pwtype.equals("SW"))
- {
- float max = -1;
-
- for (int i = 0; i < (noseqs - 1); i++)
- {
- for (int j = i; j < noseqs; j++)
- {
- AlignSeq as = new AlignSeq(sequence[i], sequence[j], "pep");
- as.calcScoreMatrix();
- as.traceAlignment();
- as.printAlignment(System.out);
- distance[i][j] = (float) as.maxscore;
-
- if (max < distance[i][j])
- {
- max = distance[i][j];
- }
- }
- }
-
- for (int i = 0; i < (noseqs - 1); i++)
- {
- for (int j = i; j < noseqs; j++)
- {
- distance[i][j] = max - distance[i][j];
- distance[j][i] = distance[i][j];
- }
- }
- }/*/