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. Leaf
GuideTree<S extends Sequence<C>,C extends Compound>.Node
s correspond to single Sequence
s. Internal GuideTree<S extends Sequence<C>,C extends Compound>.Node
s correspond to multiple sequence
alignments. The root GuideTree<S extends Sequence<C>,C extends Compound>.Node
corresponds to the full multiple sequence alignment.- Author:
- Mark Chapman
-
Nested Class Summary
Modifier and TypeClassDescriptionclass
Implements a data structure for the node in a guide tree used during progressive multiple sequence alignment. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiondouble[]
double[][]
Returns the distance matrix used to construct this guide tree.getRoot()
double[][]
Returns the similarity matrix used to construct this guide tree.Returns theSequence
s which make up the leaves of this tree.iterator()
Returns a post-orderIterator
that traverses the tree from leaves to root.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
-
Constructor Details
-
Method Details
-
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
Returns the rootGuideTree<S extends Sequence<C>,
which corresponds to the full multiple sequence alignment.C extends Compound>.Node - 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
Returns theSequence
s which make up the leaves of this tree.- Returns:
- the sequences which make up the leaves of this tree
-
iterator
Returns a post-orderIterator
that traverses the tree from leaves to root. -
toString
-