#!/bin/csh -f # # This shell script can run several commands, # given two sequence files (DNA or protein) as input # # The -f option tells the script to ignore your .cshrc file ######## Check to make sure you get two arguments (sequence files) if ($#argv != 2) then echo "Usage: $0 seq1 seq2"; exit 1 endif # turn the arguments into better names set seq1=$1 set seq2=$2 ######## check to make sure each sequence file really exists if (! -e $seq1) then echo $seq1 doesn't appear to exist; exit 1 endif if (! -e $seq2) then echo $seq2 doesn't appear to exist; exit 1 endif ############ real commands start here ############# # Do global alignment ("needle") set globalOut=$seq1.$seq2.needle.out needle $seq1 $seq2 -outfile $globalOut -filter echo Global alignment: $globalOut # Do local alignment ("water") set localOut=$seq1.$seq2.water.out water $seq1 $seq2 -outfile $localOut -filter echo Local alignment: $localOut echo All done!