#!/bin/tcsh -f
#(ie run the tshell on this but don't read the .cshrc or .tcshrc)

echo version = 1.03 of mk 2007 Mar 21
# 2007 Mar 21, 1.03: improve script (add db link)
# 2004 Jul  7, 1.02: combine logo with alist
# 2004 Jul  7, 1.01: cp the logo to keep the original
# 2004 Feb 10, 1.00: origin 

# This is an example script for making the figure of the
# hawaii paper.
# https://alum.mit.edu/www/toms/paper/hawaii/lambdacicro/

# Dr. Thomas D. Schneider
# toms@alum.mit.edu
# permanent email: toms@alum.mit.edu (use only if first address fails)
# https://alum.mit.edu/www/toms/

set name = lambda-cI-cro

# gv is the ghostview program.
# see:
# https://alum.mit.edu/www/toms/postscript.html
# https://alum.mit.edu/www/toms/ftp/gv

# Other output programs you will need:
# https://alum.mit.edu/www/toms/ftp/ps2pdf
# https://alum.mit.edu/www/toms/ftp/ps2gif

# get the lambda sequence
wgetac J02459

if !(-e db) then
   ln -s J02459 db
   # note that the lk script is more convenient:
   # https://alum.mit.edu/www/toms/ftp/lk
endif

# build Delila library
dbbk
touch l2 l3 catalp
catal

# extract sites
delila

# create symvec for makelogo
encode
rseq
dalvec

# build logo without wave
cp waveless wave
makelogo
cp logo $name-nowave.ps
gv      $name-nowave.ps
ps2pdf  $name-nowave.ps
ps2gif  $name-nowave.ps

# build logo with wave
cp waveful wave
makelogo
cp logo $name-wave.ps
gv      $name-wave.ps
ps2pdf  $name-wave.ps
ps2gif  $name-wave.ps

# make standard aligned list
cp alistp.std alistp
cp makelogop.std makelogop
makelogo
alist
alo 0 0 1 0 0
# gv alo.ps
cp alo.ps $name-alo-std.ps
gv        $name-alo-std.ps
ps2gif    $name-alo-std.ps
ps2pdf    $name-alo-std.ps

# make standard aligned list without sequence identification
cp alistp.blank alistp
cp makelogop.blank makelogop
makelogo
alist
alo 0 0 1 0 0
# gv alo.ps
cp alo.ps $name-alo-blank.ps
gv        $name-alo-blank.ps
ps2gif    $name-alo-blank.ps
ps2pdf    $name-alo-blank.ps

# permit the world to read
chmod a+r *

echo DONE with making $name
date
sound presto
