Phylogenetics: Searching Lab

From EEBedia
Revision as of 03:34, 29 January 2007 by PaulLewis (Talk | contribs)

Jump to: navigation, search
This article is part of an EEB course.
Please do not edit the content of this page without the approval of the course instructor.

Adiantum.png EEB 349: Phylogenetics

Part B: Searching under the parsimony criterion

  1. Create the data file. Start PAUP*, press the Cancel button to dismiss the "Open" dialog box that appears, and choose File > New from the main menu. This will open a new, empty text edit window. Click here to see the data, use Ctrl-a to copy all of it, then paste it into the editor window in PAUP*. Save the file as angio35.nex.
  2. Create a command file. Once again choose File > New from the main menu to create a second blank file, then type in the following text, saving this as run.nex:
    #nexus
    
    begin paup;
      log file=output.txt start replace;
      execute angio35.nex;
    end;
  3. Execute run.nex, which will in turn execute angio35.nex. You can execute run.nex either using File > Open..., or (if it is still visible in the editor window in front of you) by pressing Ctrl-r. There at least a couple of advantages to creating little NEXUS files like run.nex. For now, the only advantage is that executing run.nex automatically starts a log file so that you will have a record of what you did. Later, when you get in the habit of putting commands in paup blocks, you will appreciate the separation of the data from the commands that initiate analyses (I have many times opened a data file, forgetting about the embedded paup block that then starts a long search, overwrites my previous log file, and otherwise creates havoc).

    Note that because we used the replace keyword in the log command, the file output.txt will be overwritten without warning if it exists. This is called living dangerously, so you may want to refrain from using the replace keyword so that PAUP* asks before overwriting files.
  4. Delete all taxa except the first five. Using this command
    delete 6-.
    will cause PAUP* to ignore all taxa except Ephedrasinica, Gnetum_gnemJS, WelwitschiaJS, Ginkgo_biloba, and Pinus_ellCH.
  5. Perform an exhaustive search using parsimony. Use the alltrees command for this. This should go fast because you now have only 5 taxa; if it seems to be taking a long time, it probably actually finished some time ago and is waiting for you to press the Close button on the dialog box.
    • How many separate tree topologies did PAUP* examine?
    • What is the parsimony treelength of the best tree? The worst tree?
    • How many steps separate the best tree from the next best?
  6. Perform an heuristic search using NNI branch swapping. Before you start, use the describe command to show you the tree obtained from the exhaustive enumeration.
    • Draw this tree on a piece of paper and then draw the 4 possible NNI rearrangements
  7. Find all NNI rearrangements of the best tree. Note that because we performed an exhaustive enumeration, we now know which tree is the globally most parsimonious tree. We are thus guaranteed to never find a better tree were we to start an heuristic search with this tree. Let's do an experiment: perform an NNI heuristic search, starting with the best tree, and have PAUP* save all the trees it encounters in this search. In the end, PAUP* will have in memory 5 trees: the starting tree and the 4 trees corresponding to all possible NNI rearrangements of that starting tree.
    hsearch start=1 swap=nni nbest=15;
    • start=1 starts the search from the tree currently in memory (i.e., the best tree resulting from your exhaustive search using the parsimony criterion)
    • swap=nni causes the Nearest-Neighbor Interchange (NNI) method to be used for branch swapping
    • nbest=15 saves the 15 best trees found during the search. Thus, were PAUP* to examine every possible tree, we would end up saving all of them in memory. The reason this command is needed is that PAUP* ordinarily does not save trees that are worse than the best one it has seen thus far. Here, we are interested in seeing the trees that are examined during the course of the search, even if they are not as good as the starting tree.
  8. Show all 5 trees in memory. Use the describe all command to plot the 5 trees currently in memory. The reason we are using the describe command rather than the showtrees command is because we want PAUP* to show us the numbers it has assigned to the internal nodes, something that showtrees doesn't do.
    • Which tree was the original tree?
    • Which trees correspond to NNI rearrangments of which internal edges on the original tree?
  9. Find the most parsimonious tree for all 35 taxa. Restore all taxa using the restore all command (this will wipe out the 5 trees you currently have stored in memory, but that is ok), then conduct a heuristic search having the following characteristics:
    • The starting trees are each generated by the stepwise addition method, using random addition of sequences
    • Swap using NNI branch swapping
    • Reset the nbest option to all because we want to be saving just the best trees, not suboptimal trees (yes, this option is a little confusing).
    • Set the random number seed to 5555 (this determines the sequence of pseudorandom numbers used for the random additions; ordinarily you would not need to set the random number seed, but we will do this here to ensure that we all get the same results)
    • Do 500 replicate searches; each replicate represents an independent search starting from a different random-addition tree
Here is the full command implementing this search:
hsearch start=stepwise addseq=random swap=nni nbest=all rseed=5555 nreps=500;
    • How many tree islands were found?
    • How long did the search take?
    • How many rearrangements were tried?

Go back to part A: Using PAUP* to check your answers for homework #2