Home Original page

GuideTree.Node (biojava 5.2.0 API)

  • java.lang.Object
    • org.biojava.nbio.alignment.GuideTree.Node
  • All Implemented Interfaces:
    TreeNode, GuideTreeNode<S,​C>
    Enclosing class:
    GuideTree<S extends Sequence<C>,​C extends Compound>

    public class GuideTree.Node
    extends Object
    implements GuideTreeNode<S,​C>

    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
      Enumeration<GuideTreeNode<S,​C>> children()  
      boolean getAllowsChildren()  
      GuideTreeNode<S,​C> getChild1()

      Returns the first child node of this node.

      GuideTreeNode<S,​C> getChild2()

      Returns the second child node of this node.

      GuideTreeNode<S,​C> getChildAt​(int childIndex)  
      int getChildCount()  
      double getDistanceToParent()

      Returns the difference in height of this node and it's parent node.

      int getIndex​(TreeNode child)  
      String getName()

      Returns the name of this node.

      GuideTreeNode<S,​C> getParent()  
      Profile<S,​C> getProfile()

      Returns the profile stored at this node.

      Future<ProfilePair<S,​C>> getProfileFuture()

      Returns the profile future stored at this node, but does not force the calculation, yet.

      boolean isLeaf()  
      void setProfile​(Profile<S,​C> profile)

      Stores the given profile.

      void setProfileFuture​(Future<ProfilePair<S,​C>> profileFuture)

      Stores the given profile future.

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • getChild1

        public GuideTreeNode<S,​C> getChild1()

        Returns the first child node of this node. For leaf nodes (sequences), this will be null.

        Specified by:
        getChild1 in interface GuideTreeNode<S extends Sequence<C>,​C extends Compound>
        Returns:
        the first child node of this node
      • getChild2

        public GuideTreeNode<S,​C> getChild2()

        Returns the second child node of this node. For leaf nodes (sequences), this will be null.

        Specified by:
        getChild2 in interface GuideTreeNode<S extends Sequence<C>,​C extends Compound>
        Returns:
        the second child node of this node
      • getDistanceToParent

        public double getDistanceToParent()

        Returns the difference in height of this node and it's parent node. A likely meaning of this distance is half the percent difference between this node and it's sibling node.

        Specified by:
        getDistanceToParent in interface GuideTreeNode<S extends Sequence<C>,​C extends Compound>
        Returns:
        the difference in height of this node to it's parent node
      • getName

        public String getName()

        Returns the name of this node. For leaf nodes (sequences), this will likely be the accession ID.

        Specified by:
        getName in interface GuideTreeNode<S extends Sequence<C>,​C extends Compound>
        Returns:
        the name of this node
      • getProfile

        public Profile<S,​C> getProfile()

        Returns the profile stored at this node. If the node is a leaf, the profile is that of a single sequence. If not, this returns null until GuideTreeNode.setProfile(Profile) has been called.

        Specified by:
        getProfile in interface GuideTreeNode<S extends Sequence<C>,​C extends Compound>
        Returns:
        the profile stored at this node
      • getProfileFuture

        public Future<ProfilePair<S,​C>> getProfileFuture()

        Returns the profile future stored at this node, but does not force the calculation, yet. This allows alignment tasks for the entire tree to be queued in a post-order traversal before concurrent execution.

        Specified by:
        getProfileFuture in interface GuideTreeNode<S extends Sequence<C>,​C extends Compound>
        Returns:
        the profile future stored at this node
      • setProfile

        public void setProfile​(Profile<S,​C> profile)

        Stores the given profile.

        Specified by:
        setProfile in interface GuideTreeNode<S extends Sequence<C>,​C extends Compound>
        Parameters:
        profile - new profile stored at this node
      • setProfileFuture

        public void setProfileFuture​(Future<ProfilePair<S,​C>> profileFuture)

        Stores the given profile future. This allows concurrent execution of alignment tasks.

        Specified by:
        setProfileFuture in interface GuideTreeNode<S extends Sequence<C>,​C extends Compound>
        Parameters:
        profileFuture - new profile to be calculated and then stored at this node
      • children

        public Enumeration<GuideTreeNode<S,​C>> children()
        Specified by:
        children in interface TreeNode
      • getAllowsChildren

        public boolean getAllowsChildren()
        Specified by:
        getAllowsChildren in interface TreeNode
      • getChildAt

        public GuideTreeNode<S,​C> getChildAt​(int childIndex)
        Specified by:
        getChildAt in interface TreeNode
      • getChildCount

        public int getChildCount()
        Specified by:
        getChildCount in interface TreeNode
      • getIndex

        public int getIndex​(TreeNode child)
        Specified by:
        getIndex in interface TreeNode
      • getParent

        public GuideTreeNode<S,​C> getParent()
        Specified by:
        getParent in interface TreeNode
      • isLeaf

        public boolean isLeaf()
        Specified by:
        isLeaf in interface TreeNode