Tuesday, June 14, 2011

Installing and Running Phycas

Phycas has recently earned a high spot on my short list of favorite computer programs for phylogenetics. Phycas is the amazing program that can run a Bayesian phylogenetic inference without being susceptible to the 'star-tree paradox' because it allows for the existence of polytomies in the sampled trees.

From an academic perspective, Phycas is actually a pretty easy program to run and install. Still, some additional notes on tricks and tips for running it were beneficial to one of my colleagues who was really having trouble getting it to go. Here were my instructions for installing Phycas on a Windows machine:

1) Install Python 2.7. [I use the Enthought Python Distribution, available here: http://www.enthought.com/products/epd.php. Everything is bundled together so components like SciPy, NumPy, etc., never need to be installed individually and the different versions of the components are all guaranteed to play well together.]

2) Follow the instructions here:
http://hydrodictyon.eeb.uconn.edu/projects/phycas/index.php/Telling_Windows_where_to_find_Python
to append Python27 (different from the versions they have listed there) to your PATH (I guess if your PATH is truly empty then you will just leave out the semi-colon; otherwise, keep whatever's already in your PATH in there, but just add ;C:\Python27 to the end of it it). [It might also be important to make sure that the PYTHON-STARTUP environmental variable says C:\Python27 (if you have that variable... mine was still set to 2.6, meaning that the wrong version of Python would likely open up by default), and that this is all being done for the system level and the user level... I was only doing it for the user level for a while and it got me mixed up.]

3) Do the 4-step Phycas installation as outlined on the "Windows XP/Windows Vista/Windows 7" section of this website (the manual itself is apparently wrong, so be careful here).

4) For your own particular analysis, put the NEXUS-formatted alignment file ('.nex') and the phycas script file ('.py') on the Desktop where you have the shortcut to the '.bat' file. [For more on writing a Phycas script, stay turned to this blog!]

5) Drag and drop the phycas script file (.py) onto 'Shortcut to phycas.bat'.

I'll have another blog post that goes more into the details of Phycas scripting, but I hope this post helps jump-start some of those eager to deflate their inflated posterior probability values!

- Brendan

No comments:

Post a Comment