Sequence uniquify/deuniquify now uses the SequenceIdMatcher to cope with mangled...
[jalview.git] / src / jalview / analysis / NJTree.java
index 97b8519..0683265 100755 (executable)
@@ -251,14 +251,14 @@ public class NJTree
     {\r
         while (noClus > 2)\r
         {\r
-           /* if (type.equals("NJ"))\r
+            if (type.equals("NJ"))\r
             {\r
-                float mind = findMinNJDistance();\r
+                findMinNJDistance();\r
             }\r
             else\r
             {\r
-                float mind = findMinDistance();\r
-            }*/\r
+                findMinDistance();\r
+            }\r
 \r
             Cluster c = joinClusters(mini, minj);\r
 \r
@@ -273,7 +273,7 @@ public class NJTree
         boolean onefound = false;\r
 \r
         int one = -1;\r
-        //int two = -1;\r
+        int two = -1;\r
 \r
         for (int i = 0; i < noseqs; i++)\r
         {\r
@@ -281,7 +281,7 @@ public class NJTree
             {\r
                 if (onefound == false)\r
                 {\r
-                    //two = i;\r
+                    two = i;\r
                     onefound = true;\r
                 }\r
                 else\r
@@ -291,7 +291,7 @@ public class NJTree
             }\r
         }\r
 \r
-       // Cluster c = joinClusters(one, two);\r
+        joinClusters(one, two);\r
         top = (SequenceNode) (node.elementAt(one));\r
 \r
         reCount(top);\r
@@ -375,11 +375,6 @@ public class NJTree
     public void findNewNJDistances(SequenceNode tmpi, SequenceNode tmpj,\r
         float dist)\r
     {\r
-        //float ih = 0;\r
-       // float jh = 0;\r
-\r
-        //SequenceNode sni = tmpi;\r
-        //SequenceNode snj = tmpj;\r
 \r
         tmpi.dist = ((dist + ri) - rj) / 2;\r
         tmpj.dist = (dist - tmpi.dist);\r
@@ -469,8 +464,6 @@ public class NJTree
      */\r
     public void findClusterNJDistance(int i, int j)\r
     {\r
-        //int noi = ((Cluster) cluster.elementAt(i)).value.length;\r
-        //int noj = ((Cluster) cluster.elementAt(j)).value.length;\r
 \r
         // New distances from cluster to others\r
         float[] newdist = new float[noseqs];\r
@@ -665,7 +658,7 @@ public class NJTree
                     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
@@ -1164,3 +1157,4 @@ class Cluster
         this.value = value;\r
     }\r
 }\r
+\r