Package pal.tree

Class Local

java.lang.Object
pal.tree.Local

public class Local extends Object
Implements LOCAL (Larget and Simon, 1999) and stochastic NNI moves for unrooted trees.
Version:
$Id: Local.java,v 1.1 2002/01/08 02:09:53 alexi Exp $
Author:
Alexei Drummond
  • Constructor Details

    • Local

      public Local()
  • Method Details

    • local

      public static Tree local(Tree tree)
    • local

      public static Tree local(Tree tree, double scaleFactor)
      This method does a local interchange on the given tree: Note the original tree is modified. If this behaviour is inappropriate then pass new SimpleTree(tree) to this method.
       Actual          Logical
           2                 1            4
          /|\                 \          /
         / | \                 \        /
        /  |  \                 \      /       
       1   A   3                 2----3
              / \               /      \
             /   \             /        \
            /     \           /          \
           B       4         A            B
      
       
      A random internal edge (2,3) is selected and extended in both directions to create a back bone (1,2,3,4). One of the two internal nodes (2,3) is moved to a new random position on backbone and the backbone is scale in size.
      Parameters:
      scale - determines whether or not the backbone is scaled
      Returns:
      a perturbation of given tree.
    • stochasticNNI

      public static Tree stochasticNNI(Tree tree)
    • print4TaxonTree

      public static void print4TaxonTree(Tree tree, PrintWriter out)
    • displayLabel

      public static void displayLabel(PrintWriter out, String label, int width, boolean center)
      print label with a prespecified length (label will be shortened or spaces will introduced, if necessary)
      Parameters:
      out - output stream
      label - label to be printed
      width - desired length
    • main

      public static final void main(String[] args)