X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fanalysis%2FNJTree.java;h=0683265921bb81b97c2573d5d0606d6ca307ae9c;hb=91d9dd665cd82447439e23df334a59e93647a8d0;hp=97b8519e561ce14412ee5a02cd1e645d8e1f271a;hpb=f24dacb1da56fccf05d684e2f4899facec2aecf7;p=jalview.git diff --git a/src/jalview/analysis/NJTree.java b/src/jalview/analysis/NJTree.java index 97b8519..0683265 100755 --- a/src/jalview/analysis/NJTree.java +++ b/src/jalview/analysis/NJTree.java @@ -251,14 +251,14 @@ public class NJTree { while (noClus > 2) { - /* if (type.equals("NJ")) + if (type.equals("NJ")) { - float mind = findMinNJDistance(); + findMinNJDistance(); } else { - float mind = findMinDistance(); - }*/ + findMinDistance(); + } Cluster c = joinClusters(mini, minj); @@ -273,7 +273,7 @@ public class NJTree boolean onefound = false; int one = -1; - //int two = -1; + int two = -1; for (int i = 0; i < noseqs; i++) { @@ -281,7 +281,7 @@ public class NJTree { if (onefound == false) { - //two = i; + two = i; onefound = true; } else @@ -291,7 +291,7 @@ public class NJTree } } - // Cluster c = joinClusters(one, two); + joinClusters(one, two); top = (SequenceNode) (node.elementAt(one)); reCount(top); @@ -375,11 +375,6 @@ public class NJTree public void findNewNJDistances(SequenceNode tmpi, SequenceNode tmpj, float dist) { - //float ih = 0; - // float jh = 0; - - //SequenceNode sni = tmpi; - //SequenceNode snj = tmpj; tmpi.dist = ((dist + ri) - rj) / 2; tmpj.dist = (dist - tmpi.dist); @@ -469,8 +464,6 @@ public class NJTree */ public void findClusterNJDistance(int i, int j) { - //int noi = ((Cluster) cluster.elementAt(i)).value.length; - //int noj = ((Cluster) cluster.elementAt(j)).value.length; // New distances from cluster to others float[] newdist = new float[noseqs]; @@ -665,7 +658,7 @@ public class NJTree AlignSeq as = new AlignSeq(sequence[i], sequence[j], "pep"); as.calcScoreMatrix(); as.traceAlignment(); - as.printAlignment(); + as.printAlignment(System.out); distance[i][j] = (float) as.maxscore; if (max < distance[i][j]) @@ -1164,3 +1157,4 @@ class Cluster this.value = value; } } +