Graham Kemp > Teaching > Programming Tools


Practical: UNIX 3

Aims

Objectives

After this practical you will:

Exercises

  1. Try out some of the scripts from the lecture. Some of these are in directory /users/mdstud/kemp/ptools/unix3.

  2. When you type the name of a command at the shell prompt, the system searches through several directories, in order, looking for an executable file whose name matches the name of the command. To see which directories are searched, and in what order, type "printenv PATH". This lists all directories in the search path, in order, separated by colons.

    Write a C shell script called mypath.csh that displays the names of all directories in your search path, one per line, with the position of each in the search path (1, 2, 3, etc.) also shown on the line. Where is your current working directory in this list?

  3. File /users/mdstud/kemp/ptools/unix3/names contains the names of some of the students taking this course. Write a C shell script that reads this file and writes out an HTML file with a table containing the students' names in the first column and their lab account usernames in the second column (like http://www.cs.chalmers.se/~kemp/teaching/programming_tools/2004/local/accounts.html but with the columns reversed).

  4. The file /users/mdstud/kemp/ptools/unix3/pdb.dat contains data on the total number of atomic coordinate entries in the Protein Data Bank. These have been taken from the quarterly newsletter (since I don't have all of the back issues of this newsletter, the list is incomplete). Use gnuplot to show the growth of this data bank. First you will have to convert the data file into one containing two columns of numbers. I suggest that you divide each year into quarters, thus April 1990 would be converted to the floating point number 1990.25, October 1997 to 1997.75, and so on. Run gnuplot and experiment with different line styles, e.g.:

          gnuplot> plot "data"
          gnuplot> plot "data" with lines
          gnuplot> plot "data" with impulses
          gnuplot> plot "data" with boxes
          gnuplot> plot "data" with lines, "data" with impulses
        
  5. It is possible to draw simple molecular graphics pictures using gnuplot. For example, if the x- and y-coordinates of the alpha-carbon atoms are in a file and we use gnuplot to plot this file "with lines" then gnuplot will draw an alpha-carbon trace.

    Write a C shell script that reads the Protein Data Bank file for human interleukin-1 beta (chain A) complexed with the type-I receptor (chain B) (file /users/mdstud/kemp/ptools/beta_trefoil/1itb.pdb) and writes out files that can be read into gnuplot. First, find "ATOM" records for "CA" (alpha-carbon) atoms in chain "A" and store the x- and y-coordinates (columns 31-46) in file "chainA". Process chain "B" in the same way, producing file "chainB". Run gnuplot and plot both data files "with lines".

Supplementary Material

Look at the structure of human interleukin-1 beta complexed with the type-I receptor using RasMol. Observe that the active interleukin-1 beta molecule (chain A) interacts with all three immunoglobulin domains of the receptor (chain B). There are 153 amino acid residues in chain A. However, if you look at the corresponding SWISS-PROT entry (IL1B_HUMAN), you will see that the sequence in that file has 269 amino acid residues. The SWISS-PROT entry contains the sequence of the inactive, unprocessed precursor. Interleukin-1 beta is activated by a protein called the Interleukin-1 beta Converting Enzyme (ICE) (SWISS-PROT entry I1BC_HUMAN), a protease that cuts the interleukin-1 beta precursor between an aspartic acid residue and an alanine residue.