Package org.biojava.nbio.alignment
Class GuideTree<S extends Sequence<C>,C extends Compound>
- java.lang.Object
-
- org.biojava.nbio.alignment.GuideTree<S,C>
-
- Type Parameters:
S
- eachSequence
in the tree is of type SC
- each element of aSequence
is aCompound
of type C
- All Implemented Interfaces:
Iterable<GuideTreeNode<S,C>>
public class GuideTree<S extends Sequence<C>,C extends Compound> extends Object implements Iterable<GuideTreeNode<S,C>>
Implements a data structure for a guide tree used during progressive multiple sequence alignment. LeafGuideTree.Node
s correspond to singleSequence
s. InternalGuideTree.Node
s correspond to multiple sequence alignments. The rootGuideTree.Node
corresponds to the full multiple sequence alignment.- Author:
- Mark Chapman
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description class
GuideTree.Node
Implements a data structure for the node in a guide tree used during progressive multiple sequence alignment.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description double[]
getAllPairsScores()
double[][]
getDistanceMatrix()
Returns the distance matrix used to construct this guide tree.GuideTree.Node
getRoot()
Returns the rootGuideTree.Node
which corresponds to the full multiple sequence alignment.double[][]
getScoreMatrix()
Returns the similarity matrix used to construct this guide tree.List<S>
getSequences()
Returns theSequence
s which make up the leaves of this tree.Iterator<GuideTreeNode<S,C>>
iterator()
Returns a post-orderIterator
that traverses the tree from leaves to root.String
toString()
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
-
-
-
Method Detail
-
getAllPairsScores
public double[] getAllPairsScores()
- Returns:
- list of sequence pair scores
-
getDistanceMatrix
public double[][] getDistanceMatrix()
Returns the distance matrix used to construct this guide tree. The scores have been normalized.- Returns:
- the distance matrix used to construct this guide tree
-
getRoot
public GuideTree.Node getRoot()
Returns the rootGuideTree.Node
which corresponds to the full multiple sequence alignment.- Returns:
- the root node
-
getScoreMatrix
public double[][] getScoreMatrix()
Returns the similarity matrix used to construct this guide tree. The scores have not been normalized.- Returns:
- the similarity matrix used to construct this guide tree
-
getSequences
public List<S> getSequences()
Returns theSequence
s which make up the leaves of this tree.- Returns:
- the sequences which make up the leaves of this tree
-
iterator
public Iterator<GuideTreeNode<S,C>> iterator()
Returns a post-orderIterator
that traverses the tree from leaves to root.
-
-