public static MainFrame createInstance(
TreeBuilder calculatedTree)
{
- ArchaeopteryxTreeBuilder aptxTreeBuilder = new ArchaeopteryxTreeBuilder();
- Phylogeny aptxTree = aptxTreeBuilder.buildAptxTree(calculatedTree);
+ ArchaeopteryxTreeConverter aptxTreeBuilder = new ArchaeopteryxTreeConverter(
+ calculatedTree);
+ Phylogeny aptxTree = aptxTreeBuilder.buildAptxTree();
Phylogeny[] aptxTrees = { aptxTree }; // future possibility to load in
// several trees simultaneously
import org.forester.phylogeny.Phylogeny;
import org.forester.phylogeny.PhylogenyNode;
-public class ArchaeopteryxTreeBuilder // cannot inherit
- // TreeBuilder as that
- // demands the use of
- // SequenceNode (instead
- // of PhylogenyNode)
+public class ArchaeopteryxTreeConverter
{
protected SequenceI[] sequences;
}
- public ArchaeopteryxTreeBuilder()
+ public ArchaeopteryxTreeConverter(TreeBuilder calculatedTree)
{
+ this.sequences = calculatedTree.getSequences();
+ this.distances = calculatedTree.getDistances();
this.rootNode = new PhylogenyNode();
this.rootNode.setName("root");
}
- public ArchaeopteryxTreeBuilder(PhylogenyNode treeRoot)
+ public ArchaeopteryxTreeConverter(PhylogenyNode treeRoot,
+ TreeBuilder calculatedTree)
{
-
+ this(calculatedTree);
this.rootNode = treeRoot;
}
- public Phylogeny buildAptxTree(TreeBuilder tree)
+ public Phylogeny buildAptxTree()
{
- this.sequences = tree.getSequences();
- this.distances = tree.getDistances();
- aptxTree.setName(
+
+ this.aptxTree.setName(
"PLEASE FIX ME reheaheth35yheqhb3q5hyq3bt3q5u4jwqjwuh6");
// final NeighborJoiningF nj = NeighborJoiningF.createInstance(false, 5);