org.biojava3.phylo
Class TreeConstructor<C extends AbstractSequence<D>,D extends Compound>

java.lang.Object
  extended by java.lang.Thread
      extended by org.biojava3.phylo.TreeConstructor<C,D>
All Implemented Interfaces:
Runnable

public class TreeConstructor<C extends AbstractSequence<D>,D extends Compound>
extends Thread

Tree constructor uses the forrester tree library to build phylogenetic trees using neighbor joining algorithm. The distance matrix is calculated using code from JalView.

Author:
Scooter Willis

Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
Thread.State, Thread.UncaughtExceptionHandler
 
Field Summary
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
TreeConstructor(DistanceMatrix _matrix, TreeType _treeType, TreeConstructionAlgorithm _treeConstructionAlgorithm, NJTreeProgressListener _treeProgessListener)
           
TreeConstructor(MultipleSequenceAlignment<C,D> multipleSequenceAlignment, TreeType _treeType, TreeConstructionAlgorithm _treeConstructionAlgorithm, NJTreeProgressListener _treeProgessListener)
           
 
Method Summary
 void addProgessListener(NJTreeProgressListener treeProgessListener)
           
 void broadcastComplete()
           
 void cancel()
           
 DistanceMatrix getDistanceMatrix()
           
 String getNewickString(boolean simpleNewick, boolean writeDistanceToParent)
           
static void main(String[] args)
           
 void outputPhylipDistances(String fileName)
           
 void process()
           
 void removeProgessListener(NJTreeProgressListener treeProgessListener)
           
 void run()
           
 void updateProgress(String state, int percentage)
           
 void updateProgress(String state, int currentCount, int totalCount)
           
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TreeConstructor

public TreeConstructor(MultipleSequenceAlignment<C,D> multipleSequenceAlignment,
                       TreeType _treeType,
                       TreeConstructionAlgorithm _treeConstructionAlgorithm,
                       NJTreeProgressListener _treeProgessListener)

TreeConstructor

public TreeConstructor(DistanceMatrix _matrix,
                       TreeType _treeType,
                       TreeConstructionAlgorithm _treeConstructionAlgorithm,
                       NJTreeProgressListener _treeProgessListener)
Method Detail

outputPhylipDistances

public void outputPhylipDistances(String fileName)
                           throws Exception
Throws:
Exception

getDistanceMatrix

public DistanceMatrix getDistanceMatrix()

cancel

public void cancel()

process

public void process()
             throws Exception
Throws:
Exception

run

public void run()
Specified by:
run in interface Runnable
Overrides:
run in class Thread

getNewickString

public String getNewickString(boolean simpleNewick,
                              boolean writeDistanceToParent)
                       throws Exception
Throws:
Exception

addProgessListener

public void addProgessListener(NJTreeProgressListener treeProgessListener)

removeProgessListener

public void removeProgessListener(NJTreeProgressListener treeProgessListener)

broadcastComplete

public void broadcastComplete()

updateProgress

public void updateProgress(String state,
                           int percentage)

updateProgress

public void updateProgress(String state,
                           int currentCount,
                           int totalCount)

main

public static void main(String[] args)