PART II: Molecular trees

This is the second part of the Lemur practical. In this part you'll start to learn to work with R.In this part of the exercises we'll build some trees of a number of lemur species that you were introduced to in part 1, and compare your tree with the one that Jeff Joy and Renske Gudde created in 2010.

In order to keep from going from browser to other programs back and forth, the rest of the lab is actually written in R. Make a folder (apple-shift-N) with your last name (slowly double click the folder and then edit the name) on the desktop. Then download the following files - you'll need to right-click (option-click) to not have them open in a browser:
1. a new file of cytb sequences (in sequential format).
2. The R script.
3. A .pdf version and a .tre version of a full tree of lemurs made by Jeff Joy and Renske Gudde (2012; the paper is here.
The .tre version may open straight in your browser, or it can be opened in a text editor to see what a nexus file looks like.

Open "cytb_sequential.txt" by double clicking in (it should open in whatever text editor is on these macs). Open the application "Se-Al" (you might have to click the upper-right 'magnifying glass' icon and type in se-al to find the programme as we have little control on where software is. When you see it, just double-click it. It is also likely in the "applications" folder. A new blank window should appear - otherwise, create one (apple-n).
Highlight (apple-a) and then copy (apple-c) the entire file, and then paste it (apple-v) into the _LARGER_ of the two blank windows in your open Se-Al file. This is the data for a single gene, already aligned. Save it (apple-s).

The tree that you downloaded (Lemurs_tree.pdf) was actually made using this file lemurs_sept_alignment_additive.nex . (Remember to right-click). You can have a look at it as a full-blown NEXUS file. Again, you can use option-click to save this it rather than have it open in the browser.

Now launch R. You should be able to do this just by double-clicking the ".R" file that you downloaded. If not, then open the R application, and then open the file "part2.R" from within the application (apple-o).

The rest of the lab should be there in that 'part2.R' file.

IMPORTANT: Don't worry about getting frustrated with using R. It is an entirely new environment for many of you. The key thing to know is that there are several windows you move among:
1. The window where you write and store the commands (the window that is called 'part2.R').
2. The 'R-console' window, where you execute the program. You can also type commands directly into this window.
3. Windows for graphics when you ask for them - e.g. if you use the plot() command.
4. Windows that give you information on a command which you get by typing "?commandname" in the R-console window. This last option is very helpful.

One moves among windows using command-` (command=the apple key by the space bar, and, simultaneously, the upper-left key on the keyboard). The easiest thing to do on these big screens is to put the two main windows side by side.