Package org.biojava.nbio.alignment
Class GuideTree.Node
java.lang.Object
org.biojava.nbio.alignment.GuideTree.Node
- All Implemented Interfaces:
TreeNode
,GuideTreeNode<S,
C>
Implements a data structure for the node in a guide tree used during progressive multiple sequence alignment.
-
Method Summary
Modifier and TypeMethodDescriptionchildren()
boolean
Returns the first child node of this node.Returns the second child node of this node.getChildAt
(int childIndex) int
double
Returns the difference in height of this node and it's parent node.int
getName()
Returns the name of this node.Returns the profile stored at this node.Future<ProfilePair<S,
C>> 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.
-
Method Details
-
getChild1
Description copied from interface:GuideTreeNode
Returns the first child node of this node. For leaf nodes (sequences), this will be null. -
getChild2
Description copied from interface:GuideTreeNode
Returns the second child node of this node. For leaf nodes (sequences), this will be null. -
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 interfaceGuideTreeNode<S extends Sequence<C>,
C extends Compound> - Returns:
- the difference in height of this node to it's parent node
-
getName
Description copied from interface:GuideTreeNode
Returns the name of this node. For leaf nodes (sequences), this will likely be the accession ID. -
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 untilGuideTreeNode.setProfile(Profile)
has been called.- Specified by:
getProfile
in interfaceGuideTreeNode<S extends Sequence<C>,
C extends Compound> - Returns:
- the profile stored at this node
-
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 interfaceGuideTreeNode<S extends Sequence<C>,
C extends Compound> - Returns:
- the profile future stored at this node
-
setProfile
Description copied from interface:GuideTreeNode
Stores the given profile.- Specified by:
setProfile
in interfaceGuideTreeNode<S extends Sequence<C>,
C extends Compound> - Parameters:
profile
- new profile stored at this node
-
setProfileFuture
Description copied from interface:GuideTreeNode
Stores the given profile future. This allows concurrent execution of alignment tasks.- Specified by:
setProfileFuture
in interfaceGuideTreeNode<S extends Sequence<C>,
C extends Compound> - Parameters:
profileFuture
- new profile to be calculated and then stored at this node
-
children
-
getAllowsChildren
public boolean getAllowsChildren()- Specified by:
getAllowsChildren
in interfaceTreeNode
-
getChildAt
- Specified by:
getChildAt
in interfaceTreeNode
-
getChildCount
public int getChildCount()- Specified by:
getChildCount
in interfaceTreeNode
-
getIndex
-
getParent
-
isLeaf
public boolean isLeaf()
-