#!/bin/bash

# Copyright 2003 Peter K. Rogan
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
# 
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
# 
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
#


hgc  cd /develop/script/autolister
     dehtml<hgc| awk '{print $1 $2}' >fin
     sed -e "s/ExtendedDNA//g" -e "s/\&nbsp;//g" -e "s/Home//g" -e "s/GenomeBrowser//g" -e "s/BlatSearch//g" -e "s/FAQ//g" -e "s/UserGuide//g" fin|noblank>sequ
     echo "fasta format"
     mkdb
     cp entries db
     echo "genbank fmt"
     exon
     dbbk
     cp l1 book
     echo "delila fmt"
     awk -F\> '{print $2}' sequ|noblank>piecename
     awk '{print "piece "$1"; get all piece;"}' piecename>halfinst
     cat instsav halfinst>inst
     echo "inst file made"
     /develop/bin/scan
     echo "scanned with ribl:"
     cat ribl
     cat exonfeatures scanfeatures >features
     lister
     echo "lister made"
     ghostview -landscape map
     rm einst dinst fin hgc scanfeatures ainst lengths features sequ exonfeatures map entries l1 book db piecename halfinst inst data scaninst
