#!/bin/csh
# 15 Nov. 2004

# given a set of accessions, create a file
# containing the corresponding genbank entries
#
#  $1 file containing LOCUS names or ACCESSION numbers
#  $2 file to contain all of the GenBank entries

set JOBID = $$

# Uses Leash.java

# Convert names or accessions into GI numbers
leash -mn SHoundFindAccList -mpf $1 -of infile.$JOBID

# Retrieve GenBank flatfiles
leash -mn SHoundGetGenBankffList -mpf infile.$JOBID -of genbank.$JOBID

# SHoundGetGenBankffList omits '//' characters from the end
# of GenBank entries. Since these characters are required to
# indicate the end of an entry, SHound.fixGenBank.py adds them
# to the SHound output. When SHound is fixed, this script
# can be deleted.
python $BIRCH/script/SHound.fixGenBank.py genbank.$JOBID $2

/usr/bin/rm  infile.$JOBID genbank.$JOBID