Class GuideTree<S extends org.biojava.nbio.core.sequence.template.Sequence<C>,​C extends org.biojava.nbio.core.sequence.template.Compound>

  • Type Parameters:
    S - each Sequence in the tree is of type S
    C - each element of a Sequence is a Compound of type C
    All Implemented Interfaces:
    Iterable<GuideTreeNode<S,​C>>

    public class GuideTree<S extends org.biojava.nbio.core.sequence.template.Sequence<C>,​C extends org.biojava.nbio.core.sequence.template.Compound>
    extends Object
    implements Iterable<GuideTreeNode<S,​C>>
    Implements a data structure for a guide tree used during progressive multiple sequence alignment. Leaf GuideTree.Nodes correspond to single Sequences. Internal GuideTree.Nodes correspond to multiple sequence alignments. The root GuideTree.Node corresponds to the full multiple sequence alignment.
    Author:
    Mark Chapman
    • Constructor Detail

      • GuideTree

        public GuideTree​(List<S> sequences,
                         List<PairwiseSequenceScorer<S,​C>> scorers)
        Creates a guide tree for use during progressive multiple sequence alignment.
        Parameters:
        sequences - the List of Sequences to align
        scorers - list of sequence pair scorers, one for each pair of sequences given
    • Method Detail

      • getAllPairsScores

        public double[] getAllPairsScores()
        Returns a sequence pair score for all Sequence pairs in the given List.
        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 root GuideTree.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 the Sequences 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-order Iterator that traverses the tree from leaves to root.
        Specified by:
        iterator in interface Iterable<S extends org.biojava.nbio.core.sequence.template.Sequence<C>>