Phred-Phrap For Unix: Installation Instructions

This page briefly describes the steps required to install the Phred-Phrap package for Unix (including Linux) after downloading the programs from CodonCode's web site.

Please also read the documentation files in the program directories, (files like README.txt, PHRED.DOC, PHRAP.DOC, etc.). Reading the original documentation is essential if you plan to use Consed!

In brief, installation consist of the following steps:

  1. Prerequisites: Check that you have gzip and (for Consed only) Perl.
  2. Unpack the downloaded file.
  3. Create links (or move files) in standard directories.
  4. Set the PATH: Add the location of the executables to your system's path.
  5. Getting ready for Phred: Define PHRED_PARAMETER_FILE
  6. Getting ready for Consed
  7. Getting ready for Cross_match, Phrap, and Swat

The following descriptions are intended for users who are relatively new to Unix, but have become somewhat familiar with it. for example, we assume you know how to issue commands from a terminal window (using xterm, konsole, etc.), and know how to use an editor (for example kedit or emacs) to edit files. In the example below, we assume that the command prompt looks like this:

bash#

Your command prompt will probably different, that's ok. Just don't type the "bash#" when following the examples below.


1. Prerequisites

To unpack the software, you will need the programs gzip (actually, gunzip) and tar. On Linux, you should have both programs. On some other systems, you may have to download & install gzip; you can get it from http://www.gzip.org/.

For Consed, you will also need a reasonably recent installation of Perl. Version 5.005 is suggested, but older version of Perl 5 may work fine. For download sites and other information about Perl, visit http://www.cpan.org/ports/index.html or http://www.perl.com/.

To check if you have a program (for example gunzip) installed, type:
which gunzip
at a command prompt. If gunzip is installed and in your system path, your system will tell you where, for example:

bash# which gunzip
/usr/bin/gunzip
bash#

If the program is not installed, you'll either get a note like:
no gunzip in /bin /usr/bin /sbin /usr/sbin
or the shell will directly return with a command prompt.


2. Unpacking the distribution

In a terminal (konsole, xterm, ...) window, move to the directory where you downloaded the file to. Use the "ls" command to verify that the file is there. Use gunzip and tar to unpack the file. The following example assumes that you downloaded the file Linux_PhredXmPhrapCnsdRm.tar.gz to a directory /usr/local/genome:

bash# cd /usr/local/genome
bash# ls
Linux_PhredXmPhrapCnsdRm.tar.gz
bash# gunzip Linux_PhredXmPhrapCnsdRm.tar.gz
bash# tar -xf Linux_PhredXmPhrapCnsdRm.tar

tar will run and unpack the files. You may see a number of warning messages, which you (probably) can ignore. After tar is done, issue another ls command to see which files you have now:

bash# ls

consed/

Linux_PhredXmPhrapCnsdRm.tar.gz

phrap/

phred/

RepeatMasker/

bash#

The executables are in the four new directories phred, phrap, consed, and RepeatMasker (if your license covers only some of the programs, some folders may not be there).


3. Putting things where they belong

We strongly suggest that you put all executables and scripts (or links to the executables and scripts) into a folder named /usr/local/genome/bin/. This is especially important if you plan to use Consed.

Here's an example of the commands where we first create the sub-directories we need, and then create links to the executables:

mkdir /usr/local/genome/bin
mkdir /usr/local/genome/lib
ln -s /usr/local/genome/phred/phred /usr/local/genome/bin/phred
ln -s /usr/local/genome/phred/phredpar.dat /usr/local/genome/lib/phredpar.dat
ln -s /usr/local/genome/phrap/phrap /usr/local/genome/bin/phrap
ln -s /usr/local/genome/phrap/cross_match /usr/local/genome/bin/cross_match
ln -s /usr/local/genome/phrap/swat /usr/local/genome/bin/swat
ln -s /usr/local/genome/consed/consed_linux /usr/local/genome/bin/consed

You will probably also have to change the permissions for the files you just installed. In general, users should have execute, but NOT read permissions to the executables.

To simplify the installation of the executables, newer distributions (after July 17, 2002) contain a Perl script called install_phredphrap.pl. This script will create the needed directories, copy executables and scripts to /usr/local/genome/bin and documentation files to /usr/local/genome/doc, and do a few more things (you can look at the script with more or text editors like emacs or gedit to see what it does). We suggest that you run the script as a superuser to make sure that it can create the necessary directories, set permissions, etc.

Please note that moving or copying the files does not complete the installation, please also follow the steps below.


4. Setting the path variable

At this point, we can run the programs by specifying exactly where they are. Try it by typing:

bash# /usr//local/genome/bin/phred -V

phred version: 0.000925.c

no input files specified
bash#

(Please note that the version number may be different; you can check the phred.doc file that is part of the Phred distribution to see what the current version number should be).

Instead of specifying the full path to the executable, it's easier of we add the directory where the executables are to the list of places where the system looks for executables - the PATH variable. If you have a Unix system administrator, ask him to add /usr/local/genome/bin to the path for all potential users. If you don't have a system administrator, don't depair - it's easy to do yourself (however, you probably will need to consult a Unix book).

We'll give an example for Linux, and bash as the command shell (bash is the default for many Linux installations; other shells like sh, csh, and tcsh have a different syntax and different startup files).

When a bash shell starts, it reads definitions and commands from several startup files. We will modify one of these using a text editor. The file we'll modify is call .bashrc, and located in your home directory. Start a text editor (type "kedit ~/.bashrc &"). Somewhere in the file, you'll see a line that reads something like this:

PATH=/sbin:/usr/sbin:/bin/usr/bin:/usr/X11R6/bin

Change this line to read:

PATH=/sbin:/usr/sbin:/bin/usr/bin:/usr/X11R6/bin:/usr/local/genome/bin

and save the file. Next time when you login or start a new terminal window, the directory where we installed our executables should be included in the system path, and we can start the programs by simply typing their names. To check the path, type:

bash# echo $PATH

(Remember that the changes will not take effect until you start a new session!).
If many users use your system, you'll either need to edit the .bashrc file in every user's home directory, or modify a different file that is executed when any user logs in - for example the file /etc/profile (however, it seems that /etc/profile is not executed if you login as root!).


5. Getting ready for Phred: Define PHRED_PARAMETER_FILE

Before running Phred, we need to tell Phred where it can find the Phred parameter file. In step 3, we create a sympolic link in /usr/local/genome/lib. Now, we edit a startup file like the .bashrc file in your home directory (see previous section) to add the following line:

export PHRED_PARAMETER_FILE=/usr/local/genome/lib/phredpar.dat

Changes will take effect next time you start a new session. The syntax shown above is for bash shells. For csh or tcsh shells, you'd say:

setenv PHRED_PARAMETER_FILE "/usr/local/genome/lib/phredpar.dat"

Please check your Unix books which file to modify (common suspects are the .cshrc or .tcshrc files in your home directory).

If you plan to use Consed, you should not run Phred directly, but instead use the phredPhrap script that comes with Consed.


6. Getting ready for Consed

For using Consed, it is important that you read the README.txt file in the Consed directory. (Consed also can display this file as online help). If you had no (or limited) experience with Consed before, you should take 90 minutes and do the quick tour outlined in the README.txt file. This will show you many Consed features that are very useful, but not obvious.

You should also follow the installation instructions as outlined in the README.txt file. You will need to move a number of scripts to the /usr/local/genome/bin directory, and edit some scripts that Consed uses to adapt them to your local setup.

If you plan to use Consed, you must use the phredPhrap script to run Phred and to generate assemblies with Phrap. The phredPhrap script contains a lot of functionality that is essential for several Consed features, for example Consed's autofinishing. phredPhrap is a Perl script, originally located in the "scripts" subdirectory in the consed folder. You can look at it with any text editor to see what it does.

 
7. Getting ready for Phrap, Cross_Match, and Swat

If you followed the instructions in step 2-4, you're all set to run Phrap, Cross_Match, and Swat. Again, keep in mind that you should use the phredPhrap script to make assemblies if you plan to use Consed.

 


If you have any comments, questions, or suggestions, please contact us.


Top - CodonCode Home - Phrap.com


Copyright 2000-2004 CodonCode Corporation. All rights reserved.
Any reproduction of this document or parts of it requires prior written permission by CodonCode Corporation.
The programs Phred, Phrap, Cross_Match, Swat, and Consed are distributed by CodonCode under license from the University of Washington, and are Copyright 1993-2008 Phil Green, Brent Ewing, David Gordon, and others.
Use of the software is subject to CodonCode's Software License Agreement.