/**\r
* DOCUMENT ME!\r
*/\r
- public void printAlignment()\r
+ public void printAlignment(java.io.PrintStream os)\r
{\r
// Find the biggest id length for formatting purposes\r
int maxid = s1.getName().length();\r
pid = pid / (float) (aseq1.length - count) * 100;\r
output = output.append(new Format("Percentage ID = %2.2f\n\n").form(pid));\r
\r
- System.out.println(output.toString());\r
+ try{\r
+ os.println(output.toString());\r
+ }catch(Exception ex){}\r
}\r
\r
/**\r
public void findNewNJDistances(SequenceNode tmpi, SequenceNode tmpj,\r
float dist)\r
{\r
- \r
+\r
tmpi.dist = ((dist + ri) - rj) / 2;\r
tmpj.dist = (dist - tmpi.dist);\r
\r
AlignSeq as = new AlignSeq(sequence[i], sequence[j], "pep");\r
as.calcScoreMatrix();\r
as.traceAlignment();\r
- as.printAlignment();\r
+ as.printAlignment(System.out);\r
distance[i][j] = (float) as.maxscore;\r
\r
if (max < distance[i][j])\r
\r
as.calcScoreMatrix();\r
as.traceAlignment();\r
- as.printAlignment();\r
+ as.printAlignment(System.out);\r
scores[i][j] = (float) as.getMaxScore() / (float) as.getASeq1().length;\r
totscore = totscore + scores[i][j];\r
\r
\r
}\r
\r
- public AlignViewport getViewport()\r
- {\r
- return viewport;\r
- }\r
-\r
\r
/*\r
Added so Castor Mapping file can obtain Jalview Version\r
(SequenceI) selsubset.elementAt(j), "pep");\r
as.calcScoreMatrix();\r
as.traceAlignment();\r
- as.printAlignment();\r
+ as.printAlignment(System.out);\r
scores[i][j] = (float) as.getMaxScore() / (float) as.getASeq1().length;\r
totscore = totscore + scores[i][j];\r
\r
pdbViewer = pc;\r
}\r
\r
+ public AlignViewport getViewport()\r
+ {\r
+ return av;\r
+ }\r
+\r
+\r
/**\r
* DOCUMENT ME!\r
*\r