Package pal.treesearch
Interface BranchAccess
public interface BranchAccess
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionCreate a new Tree Searcher with a new sub tree attachedattach
(String newSequence, Alignment fullAlignment, SubstitutionModel model) Create a new Tree Searcher with a new sub tree attachedCreate a new Tree Searcher with a new sub tree attachedattach
(Node subTree, Alignment fullAlignment, SubstitutionModel model) Create a new Tree Searcher with a new sub tree attachedString[]
Obtain the leaf names to the "left" of this branch (left/right is an arbitary name to either end of branch - the only guarantee is that left is not right)String[]
Obtain the leaf names to the "right" of this branch (left/right is an arbitary name to either end of branch - the only guarantee is that left is not right)int[]
getSplitInformation
(String[] leafNames) Constructe an array detailing the split informationboolean
isLeafBranch
(String leafLabel) Test if this branch leads directly to a leaf of a particular labelvoid
setAnnotation
(Object annotation) Set the annotation for this branch (will be used when instructing TreeInterfaces
-
Method Details
-
setAnnotation
Set the annotation for this branch (will be used when instructing TreeInterfaces- Parameters:
annotation
- The annotation object (dependent on the TreeInterface instructed)
-
getAnnotation
Object getAnnotation() -
isLeafBranch
Test if this branch leads directly to a leaf of a particular label- Parameters:
leafLabel
- the label of the leaf- Returns:
- true if this branch is a leaf branch and the leaf has the right label
-
attach
Create a new Tree Searcher with a new sub tree attached- Parameters:
subTree
- the sub tree to attach at this branchfullAlignment
- the full alignment including the sequences already part of the base tree- Returns:
- a new unrooted searcher
-
attach
Create a new Tree Searcher with a new sub tree attached- Parameters:
newSequence
- the new leaf to attach at this branchfullAlignment
- the full alignment including the sequences already part of the base tree- Returns:
- a new unrooted searcher
-
attach
Create a new Tree Searcher with a new sub tree attached- Parameters:
subTree
- the sub tree to attach at this branchfullAlignment
- the full alignment including the sequences already part of the base treemodel
- the new substitution model to use- Returns:
- a new unrooted searcher
-
attach
Create a new Tree Searcher with a new sub tree attached- Parameters:
newSequence
- the new sequence to attach at this branchfullAlignment
- the full alignment including the sequences already part of the base treemodel
- the new substitution model to use- Returns:
- a new unrooted searcher
-
getLeftLeafNames
String[] getLeftLeafNames()Obtain the leaf names to the "left" of this branch (left/right is an arbitary name to either end of branch - the only guarantee is that left is not right)- Returns:
- the appropriate leaf names
-
getRightLeafNames
String[] getRightLeafNames()Obtain the leaf names to the "right" of this branch (left/right is an arbitary name to either end of branch - the only guarantee is that left is not right)- Returns:
- the appropriate leaf names
-
getSplitInformation
Constructe an array detailing the split information- Parameters:
leafNames
- the names of the leaves- Returns:
- an array matching the input array length, where each element should have the values -1, 1, or 0 depending on whether the name is in the "left" set, the "right" set, or unknown respectively.
-