staden-lg/src/indexseqlibs/swissaccession.script

53 lines
959 B
Tcsh

#! /bin/csh -f
#
# script to make an accession number index for the swissprot library
# newdata file
#
echo "swissaccession.script Version 1.0"
echo ""
set RM = "/bin/rm -f"
set SORT = sort
#
# LIBFILE is what you've called the sequence library
#
set LIBFILE = seq.dat
# get entry names and accession numbers
emblaccess1 $LIBFILE access.list
if ( $status ) goto abort
# sort on entry name
${SORT} access.list >! access.sorted
if ( $status ) goto abort
${RM} access.list
# assign entry numbers to entry names
access2 access.sorted access.entry
if ( $status ) goto abort
${RM} access.sorted
# sort on accession numbers
${SORT} -b +1 access.entry >! access.sorted2
if ( $status ) goto abort
${RM} access.entry
# create index files
access4 access.sorted2 acnum.trg acnum.hit
if ( $status ) goto abort
${RM} access.sorted2
echo "Completion successful"
echo ""
exit 0
#
# Abort
#
abort:
echo "swissaccession.script: aborting due to serious error"
exit 2