Package pal.treesearch
Interface BranchAccess
-
public interface BranchAccess
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
BranchAccess.Utils
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description UnrootedMLSearcher
attach(java.lang.String newSequence, Alignment fullAlignment)
Create a new Tree Searcher with a new sub tree attachedUnrootedMLSearcher
attach(java.lang.String newSequence, Alignment fullAlignment, SubstitutionModel model)
Create a new Tree Searcher with a new sub tree attachedUnrootedMLSearcher
attach(Node subTree, Alignment fullAlignment)
Create a new Tree Searcher with a new sub tree attachedUnrootedMLSearcher
attach(Node subTree, Alignment fullAlignment, SubstitutionModel model)
Create a new Tree Searcher with a new sub tree attachedjava.lang.Object
getAnnotation()
java.lang.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)java.lang.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)int[]
getSplitInformation(java.lang.String[] leafNames)
Constructe an array detailing the split informationboolean
isLeafBranch(java.lang.String leafLabel)
Test if this branch leads directly to a leaf of a particular labelvoid
setAnnotation(java.lang.Object annotation)
Set the annotation for this branch (will be used when instructing TreeInterfaces
-
-
-
Method Detail
-
setAnnotation
void setAnnotation(java.lang.Object annotation)
Set the annotation for this branch (will be used when instructing TreeInterfaces- Parameters:
annotation
- The annotation object (dependent on the TreeInterface instructed)
-
getAnnotation
java.lang.Object getAnnotation()
-
isLeafBranch
boolean isLeafBranch(java.lang.String leafLabel)
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
UnrootedMLSearcher attach(Node subTree, Alignment fullAlignment)
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
UnrootedMLSearcher attach(java.lang.String newSequence, Alignment fullAlignment)
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
UnrootedMLSearcher attach(Node subTree, Alignment fullAlignment, SubstitutionModel model)
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
UnrootedMLSearcher attach(java.lang.String newSequence, Alignment fullAlignment, SubstitutionModel model)
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
java.lang.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
java.lang.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
int[] getSplitInformation(java.lang.String[] leafNames)
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.
-
-