--- /dev/null
+package jalview.ext.archaeopteryx;
+
+import jalview.analysis.TreeBuilder;
+import jalview.gui.Desktop;
+
+import java.awt.Dimension;
+
+import org.forester.archaeopteryx.Archaeopteryx;
+import org.forester.archaeopteryx.MainFrame;
+import org.forester.phylogeny.Phylogeny;
+
+public class ArchaeopteryxFrame
+{
+
+ public static void createInstance(Phylogeny aptxTree)
+ {
+ new ArchaeopteryxFrame(aptxTree);
+
+ }
+
+ public static void createInstance(
+ TreeBuilder calculatedTree)
+ {
+ new ArchaeopteryxFrame(calculatedTree);
+
+ }
+
+ private ArchaeopteryxFrame(Phylogeny aptxTree)
+ {
+ MainFrame aptxApp = Archaeopteryx.createApplication(aptxTree);
+ start(aptxApp);
+
+ }
+
+ private ArchaeopteryxFrame(TreeBuilder calculatedTree)
+ {
+ ArchaeopteryxTreeBuilder aptxTreeBuilder = new ArchaeopteryxTreeBuilder();
+ Phylogeny aptxTree = aptxTreeBuilder.buildAptxTree(calculatedTree);
+ MainFrame aptxApp = Archaeopteryx.createApplication(aptxTree);
+ start(aptxApp);
+ }
+
+
+
+ public void start(MainFrame aptxApp)
+ {
+ int width = 400;
+ int height = 550;
+ aptxApp.setMinimumSize(new Dimension(width - 30, height - 50)); // doesn't
+ // work
+ // as it
+ // gets
+ // overridden
+ // during
+ // addInternalFrame?
+
+ Desktop.addInternalFrame(aptxApp, "Archaeopteryx Tree View", width,
+ height, true);
+
+ }
+
+
+}
import jalview.datamodel.SequenceI;
import jalview.math.MatrixI;
-import org.forester.evoinference.distance.NeighborJoiningF;
-import org.forester.io.parsers.SymmetricalDistanceMatrixParser;
-import org.forester.msa.Msa;
import org.forester.phylogeny.Phylogeny;
import org.forester.phylogeny.PhylogenyNode;
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();
}
{
this.rootNode = treeRoot;
- this.aptxTree = new Phylogeny();
}
public Phylogeny buildAptxTree(TreeBuilder tree)
{
this.sequences = tree.getSequences();
+ this.distances = tree.getDistances();
+
aptxTree.setName(
"PLEASE FIX ME reheaheth35yheqhb3q5hyq3bt3q5u4jwqjwuh6");
- final NeighborJoiningF nj = NeighborJoiningF.createInstance(false, 5);
- distances = tree.getDistances();
-
-
+ // final NeighborJoiningF nj = NeighborJoiningF.createInstance(false, 5);
- final Phylogeny phy = nj.execute(JalviewMatrixToForesterMatrix
- .convertJalviewToForester(distances));
+ //
+ // final Phylogeny phy = nj.execute(JalviewMatrixToForesterMatrix
+ // .convertJalviewToForester(distances));
return buildAptxTree(sequences);
import jalview.api.analysis.ScoreModelI;
import jalview.api.analysis.SimilarityParamsI;
import jalview.datamodel.SequenceGroup;
-import jalview.ext.archaeopteryx.ArchaeopteryxTreeBuilder;
+import jalview.ext.archaeopteryx.ArchaeopteryxFrame;
import jalview.util.MessageManager;
import java.awt.BorderLayout;
import javax.swing.event.InternalFrameAdapter;
import javax.swing.event.InternalFrameEvent;
-import org.forester.archaeopteryx.Archaeopteryx;
-import org.forester.archaeopteryx.MainFrame;
-import org.forester.phylogeny.Phylogeny;
-
/**
* A dialog where a user can choose and action Tree or PCA calculation options
*/
TreeBuilder calculatedTree = treeCalculator
.makeTree(af.getViewport());
TreeModel tree = new TreeModel(calculatedTree);
- openTreePanel(tree, treeAlgo, substitutionMatrix);
- ArchaeopteryxTreeBuilder aptxTreeBuilder = new ArchaeopteryxTreeBuilder();
- Phylogeny aptxTree = aptxTreeBuilder.buildAptxTree(calculatedTree);
- MainFrame aptxFrame = Archaeopteryx.createApplication(aptxTree);
+ openTreePanel(tree, treeAlgo, substitutionMatrix);
+ ArchaeopteryxFrame.createInstance(calculatedTree);
- int width = 400;
- int height = 550;
- aptxFrame.setMinimumSize(new Dimension(width - 30, height - 50)); // doesn't
- // work
- // as it
- // gets
- // overridden
- // during
- // addInternalFrame?
- Desktop.addInternalFrame(aptxFrame, "Archaeopteryx Tree View",
- width, height, true);
}
// closeFrame();
}
+
+
+
protected String determineTreeAlgo() // to be modified & expanded
{
String treeAlgorithm = neighbourJoining.isSelected()