Slight Aptx colour change
[jalview.git] / src / jalview / ext / archaeopteryx / ArchaeopteryxTreeBuilder.java
index fb1ebe3..1517ed3 100644 (file)
@@ -4,8 +4,6 @@ import jalview.analysis.TreeBuilder;
 import jalview.datamodel.SequenceI;
 import jalview.math.MatrixI;
 
-import org.forester.io.parsers.SymmetricalDistanceMatrixParser;
-import org.forester.msa.Msa;
 import org.forester.phylogeny.Phylogeny;
 import org.forester.phylogeny.PhylogenyNode;
 
@@ -23,17 +21,15 @@ public class ArchaeopteryxTreeBuilder // cannot inherit
 
   protected MatrixI distances;
 
-  protected Msa msa;
-
-  protected SymmetricalDistanceMatrixParser distanceParser = SymmetricalDistanceMatrixParser
-          .createInstance();
+  {
+    this.aptxTree = new Phylogeny();
+  }
 
 
   public ArchaeopteryxTreeBuilder()
   {
 
     this.rootNode = new PhylogenyNode();
-    this.aptxTree = new Phylogeny();
 
   }
 
@@ -41,14 +37,23 @@ public class ArchaeopteryxTreeBuilder // cannot inherit
   {
 
     this.rootNode = treeRoot;
-    this.aptxTree = new Phylogeny();
 
   }
 
   public Phylogeny buildAptxTree(TreeBuilder tree)
   {
     this.sequences = tree.getSequences();
-    aptxTree.setName("word");
+    this.distances = tree.getDistances();
+
+    aptxTree.setName(
+            "PLEASE FIX ME reheaheth35yheqhb3q5hyq3bt3q5u4jwqjwuh6");
+
+    // final NeighborJoiningF nj = NeighborJoiningF.createInstance(false, 5);
+
+    //
+    // final Phylogeny phy = nj.execute(JalviewMatrixToForesterMatrix
+    // .convertJalviewToForester(distances));
+
     return buildAptxTree(sequences);
 
   }
@@ -58,8 +63,7 @@ public class ArchaeopteryxTreeBuilder // cannot inherit
 
     for (SequenceI sequence : sequences)
     {
-      PhylogenyNode treeNode = new PhylogenyNode();
-      treeNode.setName(sequence.getName());
+      PhylogenyNode treeNode = new PhylogenyNode(sequence.getName());
       rootNode.addAsChild(treeNode);
 
     }
@@ -69,6 +73,7 @@ public class ArchaeopteryxTreeBuilder // cannot inherit
 
   }
 
+
   /**
    * Formats a localised title for the tree panel, like
    * <p>