Difference between revisions of "Phylogenetics: NEXUS Format"
Line 50: | Line 50: | ||
alltrees; | alltrees; | ||
<div style="background-color: #ccccff; padding: 5px;">What was PAUP*'s response to this request?</div> | <div style="background-color: #ccccff; padding: 5px;">What was PAUP*'s response to this request?</div> | ||
+ | |||
+ | Now try heuristic searching. This approach does not attempt to look at all possible trees, but instead only examines trees that are in the realm of possibility (which can still be a lot of trees!): | ||
+ | hsearch; | ||
+ | |||
+ | <div style="background-color: #ccccff; padding: 5px;">What is the parsimony score of the best tree found during the search? (Write down this score somewhere for later reference.) How many trees were examined (look at <nowiki><tt># Rearrangements tried</tt></nowiki>)?</div> | ||
+ | |||
+ | Now you probably want to take a look at the tree that PAUP* found and is now holding in memory. First, however, choose an outgroup taxon so that the (unrooted) tree will be drawn in a way that looks like it is rooted in a reasonable place, say between the gymnosperms (first 7 taxa) and angiosperms (remaining taxa): | ||
+ | outgroup 1-7; | ||
+ | showtree; | ||
+ | To make the tree appear to flow downward, which is more pleasing to the eye, tell PAUP* that you would like to use the tree order "right" (this is also commonly known as "ladderizing right"): | ||
+ | set torder=right; | ||
+ | showtree; | ||
+ | Before doing anything else, we should save this tree in a file so that it will be available later, perhaps for viewing or printing in TreeView. Let's call the treefile <tt>pars.tre</tt>. The <tt>brlens</tt> keyword in the command below tells PAUP* that you want to save the branch lengths as well as just the tree topology (almost always a good option to include): | ||
+ | savetrees file=pars.tre brlens; | ||
+ | |||
+ | |||
=== Sets block === | === Sets block === |
Revision as of 18:27, 21 January 2009
![]() |
EEB 349: Phylogenetics |
The goal of this lab exercise is to show you how to easily create a NEXUS-formatted data file from a set of sequences. The NEXUS format is widely used in phylogenetics, and its basic features are described in the second part of this tutorial. |
Using PAUP to create a NEXUS data file
First, download the file angio35.txt to your hard drive and then upload it to the cluster (instructions in Phylogenetics: Bioinformatics Cluster).
Now login to the cluster (bbcxsrv1.biotech.uconn.edu) and type paup to start the PAUP* program.
Now type in the following (PAUP) command:
tonexus from=angio35.txt to=angio35.nex datatype=nucleotide format=text;
After the conversion, the file angio35.nex should be present. Type quit to quit PAUP*, then open this Nexus file in the pico editor to see what PAUP* did to convert the original file to Nexus format. (The most important thing PAUP* did was to count the number of nucleotides and set nchar for you.)
Create an assumptions block containing a default exclusion set that excludes the following sites automatically whenever the data file is executed. This should be added to the bottom of the newly-created Nexus file (i.e., after the data). You can use the pico editor for this.
begin assumptions; exset * unused = 1-41 234-241 246 506-511 555 681-689 1393-1399 1797-1855 1856-1884 4754-4811; end;
These numbers represent nucleotide sites that are either missing a lot of data or are difficult to align. The name I gave to this exclusion set is unused, but you could name it anything you like. The asterisk tells PAUP* that you want this exset to be applied automatically every time the file is executed.
Create a sets block comprising the following three charset commands:
- The first charset should be named 18S and include sites 1 through 1855
- The second charset should be named rbcL and include sites 1856 through 3283
- The third charset should be named atpB and include sites 3284 through 4811
This block should be placed after the assumptions block. Look at the description of the sets block and try to do this part on your own.
Now execute the data file:
exe angio35.nex
If your assumptions block is correct, the output should include a statement saying that 219 characters have been excluded. If you set up your sets block correctly you should now be able to enter this command:
exclude all; include rbcL;
and get no errors. In addition, PAUP* should tell you that 4592 characters were excluded (as a result of the exclude all command) and 1428 were re-included (as a result of the include rbcL command). For the rest of the exercise, we will be working with the data from all 3 genes, so re-include the 18S and atpB data:
include 18S atpB;
PAUP* should now say that there are a total of 4811 included characters.
The first item of business in starting an analysis in PAUP* is to begin logging the output to a file. The following command will begin saving all output to the file output.txt. Note that we have chosen to automatically replace the file if it already exists. If you are nervous about this (and would rather have PAUP* ask before overwriting an existing file), either leave off the replace keyword or substitute append, which tells PAUP* to simply add new output to the end of the file if it already exists.
log file=output.txt start replace;
Type set ? to get a listing of the general settings. PAUP* has four "settings" commands: set for general settings; pset for settings specifically related to parsimony; lset for settings specifically related to likelihood; and dset for settings specifically related to distance methods.
To perform a parsimony search, first try the alltrees command. This command asks PAUP* to calculate the optimality criterion for every possible tree:
alltrees;
Now try heuristic searching. This approach does not attempt to look at all possible trees, but instead only examines trees that are in the realm of possibility (which can still be a lot of trees!):
hsearch;
Now you probably want to take a look at the tree that PAUP* found and is now holding in memory. First, however, choose an outgroup taxon so that the (unrooted) tree will be drawn in a way that looks like it is rooted in a reasonable place, say between the gymnosperms (first 7 taxa) and angiosperms (remaining taxa):
outgroup 1-7; showtree;
To make the tree appear to flow downward, which is more pleasing to the eye, tell PAUP* that you would like to use the tree order "right" (this is also commonly known as "ladderizing right"):
set torder=right; showtree;
Before doing anything else, we should save this tree in a file so that it will be available later, perhaps for viewing or printing in TreeView. Let's call the treefile pars.tre. The brlens keyword in the command below tells PAUP* that you want to save the branch lengths as well as just the tree topology (almost always a good option to include):
savetrees file=pars.tre brlens;
Sets block
The only commands you need to know at this point from a sets block are the charset and the taxset commands.
#nexus ... begin sets; charset trnL_intron = 562-4226; taxset gnetales = Ephedra Gnetum Welwitschia; end;
This sets block defines both a set of characters (in this case the sites composing the trnL intron) and a set of taxa (consisting of the three genera in the seed plant order Gnetales: Ephedra, Gnetum and Welwitschia). We could have used the taxon numbers for the taxset definition (e.g., taxset gnetales = 1-3;) but using the actual names is clearer and less prone to error (just think of what might happen if you decided to reorder your sequences!). These definitions may be used in other blocks. A common use is in commands placed inside a paup block (see below) or typed directly at the PAUP* command prompt.