    mkdir /hive/groups/encode/dcc/data/HudsonAlphaCNV
    cd /hive/groups/encode/dcc/data/HudsonAlphaCNV

    wget "http://illumina-mac.stanford.edu/ENCODE_1M_CNV_tracks/GM12878_CNV.bed"
    wget "http://illumina-mac.stanford.edu/ENCODE_1M_CNV_tracks/HepG2_CNV.bed"
    wget "http://illumina-mac.stanford.edu/ENCODE_1M_CNV_tracks/K562_CNV.bed"

    for i in *.bed
    do 
	f=`basename $i .bed`; 
	tail -n +2 $i | awk '{print $1,$2,$3,$5}' | sort -k 14,14 -k 16,16n -k 17,17n > "$f"_W.bed; 
	tail -n +2 $i | awk '{$5=0; print}'| sort -k 14,14 -k 16,16n -k 17,17n > "$f"_C.bed; 
	g=`basename $f _CNV`;  
	hgLoadBed hg18 wgEncodeHudsonalphaCnvRegions"$g" "$f"_C.bed -allowStartEqualEnd; 
	hgLoadBed hg18 wgEncodeHudsonalphaCnvSignal"$g" "$f"_W.bed -bedGraph=4 -allowStartEqualEnd; 
    done

    dd=/hive/groups/encode/dcc/pipeline/downloads/wgEncodeHudsonalphaCnv
    rm -rf $dd
    mkdir $dd

    for i in GM12878 HepG2 K562
    do
	echo $i
	cat "$i"_CNV_W.bed | gzip -c > $dd/wgEncodeHudsonalphaCnvSignal"$i".bedGraph4.gz
	cat "$i"_CNV_C.bed | gzip -c > $dd/wgEncodeHudsonalphaCnvRegions"$i".bed.gz
    done

    rm /usr/local/apache/htdocs/goldenPath/hg18/encodeDCC/wgEncodeHudsonalphaCnv

    ln -s $dd  /usr/local/apache/htdocs/goldenPath/hg18/encodeDCC
    cd /usr/local/apache/htdocs/goldenPath/hg18/encodeDCC/wgEncodeHudsonalphaCnv

    ~/kent/src/hg/encode/encodeDownloadsPage/encodeDownloadsPage.pl index.html

