Package jebl.evolution.align

# Class AlignmentTreeBuilderFactory

java.lang.Object
jebl.evolution.align.AlignmentTreeBuilderFactory

public class AlignmentTreeBuilderFactory extends Object

Version:
  $Id: AlignmentTreeBuilderFactory.java 984 2009-03-06 02:13:55Z richardmoir $
Author:
  Joseph Heled

## Nested Class Summary

Nested Classes
Modifier and Type
Class
Description
`static class`
`AlignmentTreeBuilderFactory.Result`

## Constructor Summary

Constructors
Constructor
Description
`AlignmentTreeBuilderFactory()`

## Method Summary

Modifier and Type
Method
Description
`static AlignmentTreeBuilderFactory.Result`
`build(List<Sequence> seqs, TreeBuilderFactory.Method method, MultipleAligner aligner, ProgressListener progress, boolean useTwiceMaximumDistanceWhenPairwiseDistanceNotCalculatable)`
`static AlignmentTreeBuilderFactory.Result`
`build(List<Sequence> seqs, TreeBuilderFactory.Method method, PairwiseAligner aligner, ProgressListener progressListener)`
Will use model F84 for nucleotides and Jukes-Cantor for amino acid
`static AlignmentTreeBuilderFactory.Result`
`build(List<Sequence> seqs, TreeBuilderFactory.Method method, PairwiseAligner aligner, ProgressListener progressListener, TreeBuilderFactory.DistanceModel model)`
`static AlignmentTreeBuilderFactory.Result`
`build(Alignment alignment, TreeBuilderFactory.Method method, TreeBuilderFactory.DistanceModel model, ProgressListener progressListener)`
`static AlignmentTreeBuilderFactory.Result`
`build(Alignment alignment, TreeBuilderFactory.Method method, TreeBuilderFactory.DistanceModel model, ProgressListener progressListener, boolean useTwiceMaximumDistanceWhenPairwiseDistanceNotCalculatable)`

### Methods inherited from class java.lang.Object

`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### AlignmentTreeBuilderFactory

public AlignmentTreeBuilderFactory()

## Method Details

### build

public static AlignmentTreeBuilderFactory.Result build(Alignment alignment, TreeBuilderFactory.Method method, TreeBuilderFactory.DistanceModel model, ProgressListener progressListener, boolean useTwiceMaximumDistanceWhenPairwiseDistanceNotCalculatable) throws CannotBuildDistanceMatrixException

Parameters:
  `alignment` - Alignment to calculate distance matrix from
  `method` - the tree building method to use
  `model` - substitution model for distance matrix: JukesCantor, TamuraNei, HKY or F84.
  `progressListener` - must not be null. If you are not interested in progress, pass in ProgressListener.EMPTY
  `useTwiceMaximumDistanceWhenPairwiseDistanceNotCalculatable` - If the alignment contains pairs of sequences that are not overlapping it is not possible to build a tree from the alignment. If this parameter is false, then CannotBuildDistanceMatrixException will be thrown. If this parameter is true, then twice the maximum distance between all other pairs will be used non-overlapping pairs.
Returns:
  A tree building result (containing a tree and a distance matrix)
Throws:
  `CannotBuildDistanceMatrixException` - only if useTwiceMaximumDistanceWhenPairwiseDistanceNotCalculatable is false

### build

public static AlignmentTreeBuilderFactory.Result build(Alignment alignment, TreeBuilderFactory.Method method, TreeBuilderFactory.DistanceModel model, ProgressListener progressListener) throws CannotBuildDistanceMatrixException

Parameters:
  `alignment` - Alignment to calculate distance matrix from
  `method` - the tree building method to use
  `model` - substitution model for distance matrix: JukesCantor, TamuraNei, HKY or F84.
  `progressListener` - must not be null. If you are not interested in progress, pass in ProgressListener.EMPTY
Returns:
  A tree building result (containing a tree and a distance matrix)
Throws:
  `CannotBuildDistanceMatrixException`

### build

public static AlignmentTreeBuilderFactory.Result build(List<Sequence> seqs, TreeBuilderFactory.Method method, PairwiseAligner aligner, ProgressListener progressListener) throws CannotBuildDistanceMatrixException
Will use model F84 for nucleotides and Jukes-Cantor for amino acid

Parameters:
  `seqs` - Sequences to build distance matrix from
  `method` - method the tree building method to use
  `aligner` - pairwise aligner which will be used to calculate a pairwise distance
  `progressListener` - must not be null. If you are not interested in progress, pass in ProgressListener.EMPTY
Returns:
  A tree building result (containing a tree and a distance matrix)
Throws:
  `CannotBuildDistanceMatrixException`

### build

public static AlignmentTreeBuilderFactory.Result build(List<Sequence> seqs, TreeBuilderFactory.Method method, PairwiseAligner aligner, ProgressListener progressListener, TreeBuilderFactory.DistanceModel model) throws CannotBuildDistanceMatrixException

Parameters:
  `seqs` - Sequences to build distance matrix from
  `method` - method the tree building method to use
  `aligner` - pairwise aligner which will be used to calculate a pairwise distance
  `progressListener` - must not be null. If you are not interested in progress, pass in ProgressListener.EMPTY
  `model` - distance model to use
Returns:
  A tree building result (containing a tree and a distance matrix)
Throws:
  `CannotBuildDistanceMatrixException`

### build

public static AlignmentTreeBuilderFactory.Result build(List<Sequence> seqs, TreeBuilderFactory.Method method, MultipleAligner aligner, ProgressListener progress, boolean useTwiceMaximumDistanceWhenPairwiseDistanceNotCalculatable) throws CannotBuildDistanceMatrixException

Throws:
  `CannotBuildDistanceMatrixException`