package jalview.ext.archaeopteryx;
+import jalview.datamodel.SequenceI;
import jalview.ext.treeviewer.TreeFrameI;
import jalview.ext.treeviewer.TreeI;
import jalview.ext.treeviewer.TreeNodeI;
{
tree = new Phylogeny();
}
+
public Tree(Phylogeny aptxTree)
{
tree = aptxTree;
instanceTitle));
}
+ @Override
+ public SequenceI[] getNodeSequences()
+ {
+ SequenceI[] treeSeqs = new SequenceI[tree.getNodeCount()];
+ Iterator<TreeNodeI> iter = iterateInPreOrder();
+ int i = 0;
+ while (iter.hasNext())
+ {
+ SequenceI nodeSeq = iter.next().getSequence();
+ treeSeqs[i++] = nodeSeq;
+ }
+ return treeSeqs;
+ }
+
+ @Override
+ public TreeNodeI[] getAllNodes()
+ {
+ TreeNodeI[] treeNodes = new TreeNodeI[tree.getNodeCount()];
+ Iterator<TreeNodeI> iter = iterateInPreOrder();
+ int i = 0;
+ while (iter.hasNext())
+ {
+ treeNodes[i++] = iter.next();
+ }
+ return treeNodes;
+ }
}
package jalview.ext.treeviewer;
+import jalview.datamodel.SequenceI;
+
import java.util.Iterator;
public interface TreeI
public TreeNodeI getFurthestNode();
+ public TreeNodeI[] getAllNodes();
+
public String[] getAllLeafNames();
+ public SequenceI[] getNodeSequences();
+
public void setTreeName(String treeTitle);
public void setRerootable(boolean b);