Interface BranchAccess


public interface BranchAccess
  • Method Details

    • setAnnotation

      void setAnnotation(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

      Object getAnnotation()
    • isLeafBranch

      boolean isLeafBranch(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 branch
      fullAlignment - the full alignment including the sequences already part of the base tree
      Returns:
      a new unrooted searcher
    • attach

      UnrootedMLSearcher attach(String newSequence, Alignment fullAlignment)
      Create a new Tree Searcher with a new sub tree attached
      Parameters:
      newSequence - the new leaf to attach at this branch
      fullAlignment - 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 branch
      fullAlignment - the full alignment including the sequences already part of the base tree
      model - the new substitution model to use
      Returns:
      a new unrooted searcher
    • attach

      UnrootedMLSearcher attach(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 branch
      fullAlignment - the full alignment including the sequences already part of the base tree
      model - 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

      int[] getSplitInformation(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.