Object leaves = null;\r
int start;\r
int end;\r
+ boolean hasDistances = true; // normal case for jalview trees\r
+ boolean hasBootstrap = false; // normal case for jalview trees\r
+\r
+ private boolean hasRootDistance = true;\r
\r
/**\r
* Creates a new NJTree object.\r
public NJTree(SequenceI[] seqs, NewickFile treefile)\r
{\r
top = treefile.getTree();\r
+\r
+ hasDistances = treefile.HasDistances();\r
+ hasBootstrap = treefile.HasBootstrap();\r
+ hasRootDistance = treefile.HasRootDistance();\r
+\r
maxheight = findHeight(top);\r
\r
SequenceIdMatcher algnIds = new SequenceIdMatcher(seqs);\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
return top;\r
}\r
+ /**\r
+ *\r
+ * @return true if tree has real distances\r
+ */\r
+ public boolean isHasDistances() {\r
+ return hasDistances;\r
+ }\r
+\r
+ /**\r
+ *\r
+ * @return true if tree has real bootstrap values\r
+ */\r
+ public boolean isHasBootstrap() {\r
+ return hasBootstrap;\r
+ }\r
+\r
+ public boolean isHasRootDistance()\r
+ {\r
+ return hasRootDistance;\r
+ }\r
+\r
}\r
\r
\r