next up previous
Next: Evolving some sequences Up: Evolving Some Sequences on Previous: Evolving Some Sequences on

Installing Seq-Gen

By installing Seq-gen yourself, you'll learn some basic UNIX skills. You'll download it, unpack it, compile it, and then test that it works. This is something bioinformaticians have to do all the time. Installing the ebiotools was nice, but rarely are we so lucky as to have such a nice installer. A procedure like this one is much more common. Oh well. It's fun to get down and dirty with the terminal! Note: In your last tutorial, UNIX commands were indicated in bold-face, like this:

unix % wossname

Here I am going to use a different convention. UNIX commands will be in a typewriter face, and I'm going to drop the ``unix'' part, like this:

% wossname

Also, files and directories will be in italic face. OK. So here we go!
  1. Find Seq-gen. Use Google to find the seq-gen homepage.(Hint: it's from Oxford.).

  2. Download Seq-gen to your computer. Download the ``Unix/Linux'' version. By default, if you are using Safari, it will unpack it for you and place it on your Desktop.

  3. Open a terminal by clicking on the little monitor icon on the Dock at the bottom.

  4. See where you are:

    % pwd

  5. See what's there:

    % ls -lrt

    You may have learned that ls lists the contents of the current directory. The three options ``-l'', ``-r'' and ``-t'' bundled together in ``-lrt'' do the following (in order) give you more information (``-l'' for ``long''), list in order of last modification time (``-t'' for ``time'') and in reverse order (``-r'' for ``reverse''). This conveniently puts the most recently added or changed files at the bottom of your list.

  6. Change to the Desktop. Here I'm going to teach you a UNIX trick that saves you typing. It's called ``tab-completion'' and uses the <TAB> key (the one with the arrow pointing to the right on the far-left side of your keyboard).

    % cd Des<TAB>

    You see, you don't have to type everything out in UNIX. When you hit the <TAB> key the shell tries to complete what you want based on what you have partially spelled. It works for both commands and files or directories. If it doesn't complete, there's more than one guess and it needs you to type some more to distinguish them, kind of like how messaging works on your mobile phone. To see the list of guesses you can hit <TAB><TAB>. Cool huh?

    Now it should say cd Desktop. Hit return, and see what's there with ``ls -lrt'' again. You should see the installation package at the bottom with the tar-file there. Safari unpacked it for you, and you will see a directory called Seq-Gen.v1.3.2 towards the top. That's the unpacked directory.

  7. Change to the source directory. Try out this sequence exactly as written:

    % cd Seq<TAB>.<TAB><TAB>/<TAB><TAB>sou<TAB><RETURN>

    When you press <TAB> twice in the middle of this last command, the shell will show what tab-completion is trying to guess between. The first time you'll see the tar-file and the directory. The second time, you'll see the three sub-directories in the Seq-Gen, and you want the one called ``source''. Now you just changed two directories in one jump!

  8. Compile the program. First see what's there with:

    % ls

    You'll see a bunch of files that end in .c and .h, those are parts of the program you are going to compile. There is also a file called Makefile. This is a handy little file that tells your system how to compile the program. Easy huh? So all you have to do is issue the following command

    % make

    And you'll see your machine compile the code. Now list again with:

    % ls -lrt

    and you'll see a file called seq-gen at the bottom. This is your program. Test to see it works! First try:

    % seq-gen

    No go, huh? It says ``command not found.'' Well, that's because the shell doesn't know to look for programs in the current directory. You can tell it to look right here by putting a ./ before it like this:

    % ./seq-gen

    Now you should see a bunch of help text spill out on the screen. Alright, we are in business. It means the program compiled!

  9. Set-up a work directory. Move the executable to your home directory with this command:

    % mv seq<TAB> ~

    Can you find the little squiggle called ``tilde?'' (~). On some keyboards you can get it by holding down <ALT> and pressing the key with the caret (^) key on it twice. This tilde is a symbol for your home directory. Otherwise you can just do this:

    % mv seq<TAB> ../../../

    Move up one directory with:

    % cd ..

    And open up the seq-gen documentation with:

    % open doc<TAB>S<TAB>

    A new Safari window should pop-up. Finally, change to your home directory with a cd command and no arguments:

    % cd

    Make a new directory to evolve your sequences:

    % mkdir evoldata

    Move your executable there:

    % mv seq<TAB> evo<TAB>

    And change directory inside:

    % cd<TAB> evo<TAB>

    Now you are done with this section.

next up previous
Next: Evolving some sequences Up: Evolving Some Sequences on Previous: Evolving Some Sequences on
David Ardell 2005-01-26