9e87a928af4260e37c2054af239b6b411058fd7e
kate
  Thu Jun 4 11:24:29 2020 -0700
Adding make docs for ENCODE CCRE tracks. refs #24668

diff --git src/hg/makeDb/doc/mm10.txt src/hg/makeDb/doc/mm10.txt
index 2476208..819c8e3 100644
--- src/hg/makeDb/doc/mm10.txt
+++ src/hg/makeDb/doc/mm10.txt
@@ -17782,15 +17782,56 @@
     #	real    50m20.639s
 
     cat fb.canFam4.chainMm10Link.txt
     #	772902855 bases of 2481941580 (31.141%) in intersection
     cat fb.canFam4.chainSynMm10Link.txt
     #   737924732 bases of 2481941580 (29.732%) in intersection
 
     time (doRecipBest.pl -load -workhorse=hgwdev canFam4 mm10 \
       -buildDir=`pwd` -workhorse=hgwdev) > rbest.log 2>&1 &
     # real    173m38.016s
 
     cat fb.canFam4.chainRBest.Mm10.txt
     # 740357755 bases of 2481941580 (29.830%) in intersection
 
 ##############################################################################
+# ENCODE Registry of Candidate cis-Regulatory Elements
+#
+# 2020-05-12  kate
+#
+# From ENCODE 3 Data Analysis Center at U Mass Med Center (Zlab)
+# Data contacts:  Henry Pratt, Jill Moore, Zhiping Weng PI
+#
+# RM #24668
+#
+# Download BED file (hosted on their integrative hub)
+
+cd /hive/data/outside/encode3/ccre
+mkdir mouse
+cd mouse
+wget http://gcp.wenglab.org/hubs/integrative1/data/mm10/cta/mm10-ccres.bigbed
+
+###
+# Add scores
+wget -nd https://users.wenglab.org/moorej3/mouse-maxz-dnase.txt.gz
+gunzip Mouse-maxZ-DNase.txt.gz
+
+sort Mouse-maxZ-DNase.txt > Mouse-maxZ-DNase.sorted.txt
+# noting that order of accessions in score file doesn't match bed file ;-(
+sort -k 4 mm10-ccREs.bed > mm10-ccREs.sorted.bed
+paste mm10-ccREs.sorted.bed Mouse-maxZ-DNase.sorted.txt > ccres.prescored.bed
+# sanity check ids match
+
+# score using zscore,  min(zscore*100),1000), and reformat
+awk '{OFS="\t"; print $1, $2, $3, $4, ($13>10)? 1000 : int($13 * 100), $6, $7, $8, $9, $10, $13}' \
+        ccres.prescored.bed | bedSort stdin ccres.scored.bed
+set f = encodeCcreCombined
+
+# Reformat to add fields for filtering and mouseover, etc.
+perl ../makeCcreCombined.pl < ccres.scored.bed > $f.bed
+bedToBigBed -tab -type=bed9+6 -as=../$f.as $f.bed /hive/data/genomes/mm10/chrom.sizes $f.bb
+mkdir -p /gbdb/mm10/encode3/ccre
+ln -s `pwd`/$f.bb /gbdb/mm10/encode3/ccre
+
+
+##############################################################################
+