src/hg/makeDb/doc/aplCal1.txt 1.3

1.3 2009/05/14 00:35:33 galt
Initial Aplysia californica
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 1000000 -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
@@ -1,68 +1,115 @@
 #########################################
 #
 # aplCal1 = Aplysia californica 
 #
 #
 
 # set up main genome directory
 
 ssh hgwdev
 cd /hive/data/genomes
 mkdir aplCal1
 cd aplCal1
 
 mkdir download
 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
 #other 1781
 #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
 
 # Organism Image
 wget -O /usr/local/apache/htdocs/images/Aplysia_californica.jpg \
  'http://upload.wikimedia.org/wikipedia/commons/thumb/e/ef/Aplysia_californica.jpg/250px-Aplysia_californica.jpg'
 
 # Edit and check-in templates for description.html, gold.html, gap.html, aplCal1/trackDb.ra
 
 
 # repeat mask
 time doRepeatMasker.pl aplCal1 > & doRepeatMasker.pl.out &
 
 
 # simple repeat masker trf
 time doSimpleRepeat.pl aplCal1 > & doSimpleRepeat.pl.out &
 
 # make final masked .2bit
 [hgwdev:aplCal1> twoBitMask aplCal1.rmsk.2bit -add bed/simpleRepeat.2009-05-13/trfMask.bed aplCal1.2bit
 #Warning: BED file bed/simpleRepeat.2009-05-13/trfMask.bed has >=13 fields
 #which means it might contain block coordinates, but this program uses only the
 #first three fields (the entire span -- no support for blocks).
 
 ln -s /cluster/data/aplCal1/aplCal1.2bit /gbdb/aplCal1/