54 lines
944 B
Tcsh
54 lines
944 B
Tcsh
#! /bin/csh -f
|
|
#
|
|
# script to make an author index for the swissprot newdata library
|
|
#
|
|
|
|
echo "swissauthor.script Version 1.0"
|
|
echo ""
|
|
|
|
set RM = "/bin/rm -f"
|
|
set SORT = sort
|
|
set UNIQ = uniq
|
|
|
|
#
|
|
# LIBFILE is the name you've given to the library file
|
|
#
|
|
set LIBFILE = seq.dat
|
|
set WORDS = stopwords
|
|
|
|
# get free text
|
|
emblauthor $LIBFILE author.list
|
|
if ( $status ) goto abort
|
|
|
|
# sort on entry name
|
|
${SORT} -u author.list >! author.sorted
|
|
if ( $status ) goto abort
|
|
${RM} author.list
|
|
|
|
# include entry numbers in the file
|
|
freetext2 author.sorted author.entry
|
|
if ( $status ) goto abort
|
|
${RM} author.sorted
|
|
|
|
# sort on text
|
|
${SORT} -b +2 author.entry >! author.sorted2
|
|
if ( $status ) goto abort
|
|
${RM} author.entry
|
|
|
|
# create the index
|
|
hitNtrg author.sorted2 author.trg author.hit 35
|
|
if ( $status ) goto abort
|
|
${RM} author.sorted2
|
|
|
|
echo "Completion successful"
|
|
echo ""
|
|
|
|
exit 0
|
|
|
|
#
|
|
# Abort
|
|
#
|
|
abort:
|
|
echo "swissauthor.script: aborting due to serious error"
|
|
exit 2
|