Class GuideTree.Node

  • All Implemented Interfaces:
    TreeNode, GuideTreeNode<S,​C>
    Enclosing class:
    GuideTree<S extends org.biojava.nbio.core.sequence.template.Sequence<C>,​C extends org.biojava.nbio.core.sequence.template.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 Detail

      • getChild1

        public GuideTreeNode<S,​C> getChild1()
        Description copied from interface: GuideTreeNode
        Returns the first child node of this node. For leaf nodes (sequences), this will be null.
        Specified by:
        getChild1 in interface GuideTreeNode<S extends org.biojava.nbio.core.sequence.template.Sequence<C>,​C extends org.biojava.nbio.core.sequence.template.Compound>
        Returns:
        the first child node of this node
      • getChild2

        public GuideTreeNode<S,​C> getChild2()
        Description copied from interface: GuideTreeNode
        Returns the second child node of this node. For leaf nodes (sequences), this will be null.
        Specified by:
        getChild2 in interface GuideTreeNode<S extends org.biojava.nbio.core.sequence.template.Sequence<C>,​C extends org.biojava.nbio.core.sequence.template.Compound>
        Returns:
        the second child node of this node
      • getDistanceToParent

        public double getDistanceToParent()
        Description copied from interface: GuideTreeNode
        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 org.biojava.nbio.core.sequence.template.Sequence<C>,​C extends org.biojava.nbio.core.sequence.template.Compound>
        Returns:
        the difference in height of this node to it's parent node
      • getName

        public String getName()
        Description copied from interface: GuideTreeNode
        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 org.biojava.nbio.core.sequence.template.Sequence<C>,​C extends org.biojava.nbio.core.sequence.template.Compound>
        Returns:
        the name of this node
      • getProfile

        public org.biojava.nbio.core.alignment.template.Profile<S,​C> getProfile()
        Description copied from interface: GuideTreeNode
        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 org.biojava.nbio.core.sequence.template.Sequence<C>,​C extends org.biojava.nbio.core.sequence.template.Compound>
        Returns:
        the profile stored at this node
      • getProfileFuture

        public Future<org.biojava.nbio.core.alignment.template.ProfilePair<S,​C>> getProfileFuture()
        Description copied from interface: GuideTreeNode
        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 org.biojava.nbio.core.sequence.template.Sequence<C>,​C extends org.biojava.nbio.core.sequence.template.Compound>
        Returns:
        the profile future stored at this node
      • setProfile

        public void setProfile​(org.biojava.nbio.core.alignment.template.Profile<S,​C> profile)
        Description copied from interface: GuideTreeNode
        Stores the given profile.
        Specified by:
        setProfile in interface GuideTreeNode<S extends org.biojava.nbio.core.sequence.template.Sequence<C>,​C extends org.biojava.nbio.core.sequence.template.Compound>
        Parameters:
        profile - new profile stored at this node
      • setProfileFuture

        public void setProfileFuture​(Future<org.biojava.nbio.core.alignment.template.ProfilePair<S,​C>> profileFuture)
        Description copied from interface: GuideTreeNode
        Stores the given profile future. This allows concurrent execution of alignment tasks.
        Specified by:
        setProfileFuture in interface GuideTreeNode<S extends org.biojava.nbio.core.sequence.template.Sequence<C>,​C extends org.biojava.nbio.core.sequence.template.Compound>
        Parameters:
        profileFuture - new profile to be calculated and then stored at this node
      • isLeaf

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