Difference between revisions of "Phylogenetics: Phycas Lab"

From EEBedia
Jump to: navigation, search
(New page: {| border="0" |- |rowspan="2" valign="top"|150px |<span style="font-size: x-large">[http://hydrodictyon.eeb.uconn.edu/eebedia/index.php/Phylogenetics:_Syllabus EEB 3...)
 
Line 9: Line 9:
 
== Downloading Phycas ==
 
== Downloading Phycas ==
  
The home page for Phycas is http://www.phycas.org/ (this URL actually points to a section of the EEB department's web site, so you will see the address change to one involving <tt>hydrodictyon.eeb.uconn.edu</tt> as it loads). In the download section of that web site, you will see links for the Windows version, the Mac version and the PDF manual.
+
The home page for Phycas is [http://www.phycas.org/ phycas.org] (this URL actually points to a section of the EEB department's web site, so you will see the address change to one involving <tt>hydrodictyon.eeb.uconn.edu</tt> as it loads). In the download section of that web site, you will see links for the Windows version, the Mac version and the PDF manual.
  
 
== Installing and starting Phycas in interactive mode ==
 
== Installing and starting Phycas in interactive mode ==

Revision as of 15:41, 4 April 2009

Adiantum.png EEB 349: Phylogenetics
The goal of this lab is to introduce you to some of the features of Phycas, which is a Bayesian phylogenetic analysis program that I am co-authoring with Mark Holder (University of Kansas) and David Swofford (Duke University). Phycas is a juvenile compared to MrBayes and Beast, but it nevertheless allows you to do some things that neither of those programs do. We will use Phycas for two of these today: (1) perform MCMC analyses that allow polytomies; and (2) obtain accurate estimates of marginal likelihoods that can be used to compute Bayes Factors.

Downloading Phycas

The home page for Phycas is phycas.org (this URL actually points to a section of the EEB department's web site, so you will see the address change to one involving hydrodictyon.eeb.uconn.edu as it loads). In the download section of that web site, you will see links for the Windows version, the Mac version and the PDF manual.

Installing and starting Phycas in interactive mode


Mac logo.jpg
If you have a Mac, you will end up downloading a dmg file that contains the Mac Application Phycas.app (you may not see the .app extension depending whether "Show all file extensions" is checked in your Finder Advanced preferences). Just drag Phycas.app somewhere on your hard drive (the Applications folder is the usual place for such files). Once you have done this, first close the folder that opened when you double-clicked the dmg file and eject the disk image. Now drag Phycas.app onto your dock to make it easy to access during this lab. The reason I asked you to eject your disk image first is so that you do not accidentally drag the Phycas icon there onto your dock (if you do this, confusion will later ensue because the disk image will not be mounted after you reboot).

To start using Phycas interactively, simply click the Phycas icon on the dock. This starts a special version of the iTerm program (called iTerm4Phycas) and, after loading the Phycas libraries, presents you with the python prompt (>>>). We admit that it is somewhat confusing to bundle iTerm with Phycas: for example, all the menu items are iTerm menu items and have nothing to do with Phycas! Phycas is an extension of Python, so you invoke Phycas' capabilities by issuing Python commands at the command prompt, not by using the menus.


Win logo.png
If you have Windows, download the appropriate installer (according to your version of Python) and run it (right-click and choose "Run as Administrator" if you are using Windows Vista). (If you don't remember which version of Python you have, open a command prompt window and type python -V.) The installer will first look to see whether you have the correct version of Python installed, and then will install the Phycas code in your Python site-packages directory. You should see a Phycas item appear on your All Programs list (visible when you click the Start button).

To start using Phycas interactively, open a command prompt window and type python to start python. Now type

from phycas import *

to import everything Phycas can do into Python. You are now ready to begin issuing Phycas-specific Python commands.