public class RootedTreeUtils
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static boolean |
equal(RootedTree tree1,
RootedTree tree2)
Compares 2 trees and returns true if they have the same topology.
|
static Node |
getCommonAncestorNode(RootedTree tree,
java.util.Set<Node> tipNodes)
Gets the most recent common ancestor (MRCA) node of a set of tip nodes.
|
static java.util.Set<Node> |
getDescendantTips(RootedTree tree,
Node node)
Gets a set of tip nodes descended from the given node.
|
static double |
getMaxTipHeight(RootedTree tree,
Node node) |
static double |
getMinTipHeight(RootedTree tree,
Node node) |
static int |
getTipCount(RootedTree tree,
Node node)
Return the number of leaves under this node.
|
static java.util.Set<Node> |
getTipsForTaxa(RootedTree tree,
java.util.Collection<Taxon> taxa)
Gets a set of external nodes that correspond to the given taxa.
|
static boolean |
isBinary(RootedTree tree) |
static boolean |
isMonophyletic(RootedTree tree,
java.util.Set<Node> tipNodes)
Performs the a monophyly test on a set of tip nodes.
|
static boolean |
isUltrametric(RootedTree tree,
double tolerance) |
static java.lang.String |
uniqueNewick(RootedTree tree,
Node node)
Recursive function for constructing a newick tree representation in the given buffer.
|
public static final int getTipCount(RootedTree tree, Node node)
tree
- node
- public static double getMinTipHeight(RootedTree tree, Node node)
public static double getMaxTipHeight(RootedTree tree, Node node)
public static boolean isUltrametric(RootedTree tree, double tolerance)
public static boolean isBinary(RootedTree tree)
public static java.util.Set<Node> getTipsForTaxa(RootedTree tree, java.util.Collection<Taxon> taxa) throws MissingTaxonException
MissingTaxonException
public static java.util.Set<Node> getDescendantTips(RootedTree tree, Node node)
public static Node getCommonAncestorNode(RootedTree tree, java.util.Set<Node> tipNodes)
tree
- the TreetipNodes
- a set of tip nodespublic static boolean isMonophyletic(RootedTree tree, java.util.Set<Node> tipNodes)
tree
- a tree object to perform test ontipNodes
- a set containing the tip node.public static java.lang.String uniqueNewick(RootedTree tree, Node node)
public static boolean equal(RootedTree tree1, RootedTree tree2)
http://code.google.com/p/jebl2/