jebl.evolution.trees
Class TreeBuilderFactory

java.lang.Object
  extended by jebl.evolution.trees.TreeBuilderFactory

public class TreeBuilderFactory
extends Object

A meeting point for tree building from sequence data. A very initial form which will develope to encompass more methods and distances. Currently only pairwise distance methods are implemented.

Author:
Joseph Heled

Nested Class Summary
static class TreeBuilderFactory.ConsensusMethod
          Supported consensus methods.
static class TreeBuilderFactory.DistanceModel
          Supported pairwise distance methods
static class TreeBuilderFactory.Method
          Supported methods for tree building
 
Constructor Summary
TreeBuilderFactory()
           
 
Method Summary
static ConsensusTreeBuilder buildRooted(RootedTree[] trees, double supportThreshold, TreeBuilderFactory.ConsensusMethod method)
           
static ConsensusTreeBuilder buildRooted(Tree[] trees, double supportThreshold, TreeBuilderFactory.ConsensusMethod method)
          convenience method.
static ConsensusTreeBuilder buildUnRooted(Tree[] trees, Taxon outGroup, double supportThreshold, TreeBuilderFactory.ConsensusMethod method)
           
static ClusteringTreeBuilder getBuilder(TreeBuilderFactory.Method method, DistanceMatrix distances)
           
static boolean isRootedMethod(TreeBuilderFactory.Method method)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TreeBuilderFactory

public TreeBuilderFactory()
Method Detail

isRootedMethod

public static boolean isRootedMethod(TreeBuilderFactory.Method method)
Parameters:
method -
Returns:
Wheather method generates a rooted or unrooted tree.

getBuilder

public static ClusteringTreeBuilder getBuilder(TreeBuilderFactory.Method method,
                                               DistanceMatrix distances)
Parameters:
method - build method to use.
distances - Pre computed pairwise distances.
Returns:
A tree builder using method and distance matrix

buildUnRooted

public static ConsensusTreeBuilder buildUnRooted(Tree[] trees,
                                                 Taxon outGroup,
                                                 double supportThreshold,
                                                 TreeBuilderFactory.ConsensusMethod method)

buildRooted

public static ConsensusTreeBuilder buildRooted(RootedTree[] trees,
                                               double supportThreshold,
                                               TreeBuilderFactory.ConsensusMethod method)

buildRooted

public static ConsensusTreeBuilder buildRooted(Tree[] trees,
                                               double supportThreshold,
                                               TreeBuilderFactory.ConsensusMethod method)
convenience method. Convert arrays of trees, guaranteed to be rooted to the array of the appropriate type.

Parameters:
trees - trees - all must be rooted
supportThreshold - minimum required consensus support
method - which consensus method to use
Returns:
consensus tree builder