Index: src/hg/makeDb/doc/aplCal1.txt
===================================================================
RCS file: /projects/compbio/cvsroot/kent/src/hg/makeDb/doc/aplCal1.txt,v
retrieving revision 1.2
retrieving revision 1.3
diff -b -B -U 4 -r1.2 -r1.3
--- src/hg/makeDb/doc/aplCal1.txt	14 May 2009 00:26:13 -0000	1.2
+++ src/hg/makeDb/doc/aplCal1.txt	14 May 2009 00:35:33 -0000	1.3
@@ -15,21 +15,47 @@
 cd download
 
 # get sequence from BROAD
 # http://www.broad.mit.edu/ftp/pub/assemblies/invertebrates/aplysia/
-vi fetch.sh
+
+    cat << '_EOF_' > fetch.sh
+#!/bin/sh
+
+wget --timestamping -r -np -l 2 -nd -L
+'ftp://ftp.broad.mit.edu/pub/assemblies/invertebrates/aplysia'
+
+'_EOF_'
+    # << happy emacs
+
 chmod +x fetch.sh
 ./fetch.sh
 
 
 # fixup ids for super fasta and quals
 #  change ">scaffold_0.1-1784514 (Draft_v1)" 
 #    to   ">scaffold_0"
 #  sed 's/\(>scaffold_[0-9]*\)[.].*/\1/'
-vi fix.csh
+
+    cat << '_EOF_' > fix.csh
+#!/bin/tcsh
+
+gunzip -c assembly_supers.fasta.gz | sed 's/\(>scaffold_[0-9]*\)[.].*/\1/' \
+  | gzip -c > assembly_supers.fasta.fix.gz
+
+gunzip -c assembly_supers.qual.gz | sed 's/\(>scaffold_[0-9]*\)[.].*/\1/' \
+  | gzip -c > assembly_supers.qual.fix.gz
+
+'_EOF_'
+    # << happy emacs
+
 chmod +x fix.csh
 ./fix.csh
 
+# totalKinds is something I made to add up the numbers of each kind
+# it just reveals that there are too many unplaced fragments
+# to consider making them all scaffolds, and as a chrUn it would
+# be too large.  We are going to just leave these out of the 
+# assembly like Broad did.  JK says ok.
 totalKinds assembly.unplaced 2 > unplaced.types
 cat unplaced.types
 #unplaced 4270994
 #low_quality 945330
@@ -37,9 +63,30 @@
 #deliberate 273497
 #vector_or_host 63932
 #multiple_instance 27153
 
-vi aplCal1.config.ra
+
+# Run automation to make the basic genome
+
+    cat << '_EOF_' > aplCal1.config.ra
+# Config parameters for makeGenomeDb.pl:
+db aplCal1
+scientificName Aplysia californica
+commonName Sea Hare
+assemblyDate Sept. 2008
+assemblyLabel Broad Institute v. 1.0
+orderKey 825
+clade other
+genomeCladePriority 19
+mitoAcc NC_005827
+fastaFiles /hive/data/genomes/aplCal1/download/assembly_supers.fasta.fix.gz
+agpFiles /hive/data/genomes/aplCal1/download/assembly.agp
+qualFiles /hive/data/genomes/aplCal1/download/assembly_supers.qual.fix.gz
+dbDbSpeciesDir seaHare
+taxId 6500
+'_EOF_'
+    # << happy emacs
+
 
 time makeGenomeDb.pl aplCal1.config.ra > & makeGenomeDb.pl.out &
 # took less than 10 minutes
 

