src/hg/makeDb/doc/sacCer2.txt 1.10

1.10 2009/07/02 22:25:06 hiram
Making upstream maf files from the 7-way alignment
Index: src/hg/makeDb/doc/sacCer2.txt
===================================================================
RCS file: /projects/compbio/cvsroot/kent/src/hg/makeDb/doc/sacCer2.txt,v
retrieving revision 1.9
retrieving revision 1.10
diff -b -B -U 4 -r1.9 -r1.10
--- src/hg/makeDb/doc/sacCer2.txt	1 Jul 2009 22:39:45 -0000	1.9
+++ src/hg/makeDb/doc/sacCer2.txt	2 Jul 2009 22:25:06 -0000	1.10
@@ -1001,8 +1001,35 @@
 
     zcat multiz7way.mafFrames.gz \
 	| sort -k1,1 -k2,2n | hgLoadMafFrames sacCer2 multiz7wayFrames stdin
 
+############################################################################
+# creating upstream mafs (DONE - 2009-06-26 - Hiram)
+    ssh hgwdev
+    cd /hive/data/genomes/sacCer2/goldenPath/multiz7way
+    # run this bash script
+    cat << '_EOF_' > mkUpstream.sh
+DB=sacCer2
+GENE=sgdGene
+NWAY=multiz7way
+export DB GENE
+
+for S in 1000 2000 5000
+do
+    echo "making upstream${S}.${GENE}.maf"
+    echo "featureBits ${DB} ${GENE}:upstream:${S} -fa=/dev/null -bed=stdout"
+    featureBits ${DB} ${GENE}:upstreamAll:${S} -fa=/dev/null -bed=stdout \
+        | perl -wpe 's/_up[^\t]+/\t0/' | sort -k1,1 -k2,2n \
+        | mafFrags ${DB} ${NWAY} stdin stdout \
+                -orgs=/hive/data/genomes/${DB}/bed/${NWAY}/species.list \
+        | gzip -c > upstream${S}.${GENE}.maf.gz
+    echo "done upstream${S}.${GENE}.maf.gz"
+done
+'_EOF_'
+    # << happy emacs
+    chmod +x mkUpstream.sh
+    ./mkUpstream.sh
+
 #########################################################################
 ## simpleRepeats (DONE - 2009-02-12 - Hiram)
     mkdir /hive/data/genomes/sacCer2/bed/simpleRepeat
     cd /hive/data/genomes/sacCer2/bed/simpleRepeat