2009-10-26 Start keeping track of HudsonAlpha ChipSeq changes
=============================================================
# clean up Rami's broadPeak files with negative chromStart:
# Sample:
ERROR: failed validateBroadPeak : Error [file=data/SL985_Peaks.bed.broadPeak, line=46142]: chromStart field invalid unsigned number (-68) [chrM	-68	1086	peak46142	214	.	693.100	-1	-1]
Aborting ... found 1 errors in total

validateFiles -type=broadPeak -chromDb=hg18 -genome=/cluster/data/hg18/hg18.2bit -printFailLines SL646_Peaks.bed.broadPeak > SL646_Peaks.bed.broadPeak.ok
validateFiles -type=broadPeak -chromDb=hg18 -genome=/cluster/data/hg18/hg18.2bit -printFailLines SL673_Peaks.bed.broadPeak > SL673_Peaks.bed.broadPeak.ok
validateFiles -type=broadPeak -chromDb=hg18 -genome=/cluster/data/hg18/hg18.2bit -printFailLines SL705_Peaks.bed.broadPeak > SL705_Peaks.bed.broadPeak.ok
validateFiles -type=broadPeak -chromDb=hg18 -genome=/cluster/data/hg18/hg18.2bit -printFailLines SL839_Peaks.bed.broadPeak > SL839_Peaks.bed.broadPeak.ok
validateFiles -type=broadPeak -chromDb=hg18 -genome=/cluster/data/hg18/hg18.2bit -printFailLines SL842_Peaks.bed.broadPeak > SL842_Peaks.bed.broadPeak.ok
validateFiles -type=broadPeak -chromDb=hg18 -genome=/cluster/data/hg18/hg18.2bit -printFailLines SL949_Peaks.bed.broadPeak > SL949_Peaks.bed.broadPeak.ok
validateFiles -type=broadPeak -chromDb=hg18 -genome=/cluster/data/hg18/hg18.2bit -printFailLines SL985_Peaks.bed.broadPeak > SL985_Peaks.bed.broadPeak.ok
validateFiles -type=broadPeak -chromDb=hg18 -genome=/cluster/data/hg18/hg18.2bit -printFailLines SL986_Peaks.bed.broadPeak > SL986_Peaks.bed.broadPeak.ok
validateFiles -type=broadPeak -chromDb=hg18 -genome=/cluster/data/hg18/hg18.2bit -printFailLines SL988_Peaks.bed.broadPeak > SL988_Peaks.bed.broadPeak.ok

validateFiles -type=broadPeak -chromDb=hg18 -genome=/cluster/data/hg18/hg18.2bit -printFailLines SL646_Peaks.bed.broadPeak > SL646_Peaks.bed.broadPeak.err
validateFiles -type=broadPeak -chromDb=hg18 -genome=/cluster/data/hg18/hg18.2bit -printFailLines SL673_Peaks.bed.broadPeak > SL673_Peaks.bed.broadPeak.err
validateFiles -type=broadPeak -chromDb=hg18 -genome=/cluster/data/hg18/hg18.2bit -printFailLines SL705_Peaks.bed.broadPeak > SL705_Peaks.bed.broadPeak.err
validateFiles -type=broadPeak -chromDb=hg18 -genome=/cluster/data/hg18/hg18.2bit -printFailLines SL839_Peaks.bed.broadPeak > SL839_Peaks.bed.broadPeak.err
validateFiles -type=broadPeak -chromDb=hg18 -genome=/cluster/data/hg18/hg18.2bit -printFailLines SL842_Peaks.bed.broadPeak > SL842_Peaks.bed.broadPeak.err
validateFiles -type=broadPeak -chromDb=hg18 -genome=/cluster/data/hg18/hg18.2bit -printFailLines SL949_Peaks.bed.broadPeak > SL949_Peaks.bed.broadPeak.err
validateFiles -type=broadPeak -chromDb=hg18 -genome=/cluster/data/hg18/hg18.2bit -printFailLines SL985_Peaks.bed.broadPeak > SL985_Peaks.bed.broadPeak.err
validateFiles -type=broadPeak -chromDb=hg18 -genome=/cluster/data/hg18/hg18.2bit -printFailLines SL986_Peaks.bed.broadPeak > SL986_Peaks.bed.broadPeak.err
validateFiles -type=broadPeak -chromDb=hg18 -genome=/cluster/data/hg18/hg18.2bit -printFailLines SL988_Peaks.bed.broadPeak > SL988_Peaks.bed.broadPeak.err

e *.err

cat SL646_Peaks.bed.broadPeak.err >> SL646_Peaks.bed.broadPeak.ok
cat SL673_Peaks.bed.broadPeak.err >> SL673_Peaks.bed.broadPeak.ok
cat SL705_Peaks.bed.broadPeak.err >> SL705_Peaks.bed.broadPeak.ok
cat SL839_Peaks.bed.broadPeak.err >> SL839_Peaks.bed.broadPeak.ok
cat SL842_Peaks.bed.broadPeak.err >> SL842_Peaks.bed.broadPeak.ok
cat SL949_Peaks.bed.broadPeak.err >> SL949_Peaks.bed.broadPeak.ok
cat SL985_Peaks.bed.broadPeak.err >> SL985_Peaks.bed.broadPeak.ok
cat SL986_Peaks.bed.broadPeak.err >> SL986_Peaks.bed.broadPeak.ok
cat SL988_Peaks.bed.broadPeak.err >> SL988_Peaks.bed.broadPeak.ok

mv SL646_Peaks.bed.broadPeak SL646_Peaks.bed.broadPeak.old
mv SL673_Peaks.bed.broadPeak SL673_Peaks.bed.broadPeak.old
mv SL705_Peaks.bed.broadPeak SL705_Peaks.bed.broadPeak.old
mv SL839_Peaks.bed.broadPeak SL839_Peaks.bed.broadPeak.old
mv SL842_Peaks.bed.broadPeak SL842_Peaks.bed.broadPeak.old
mv SL949_Peaks.bed.broadPeak SL949_Peaks.bed.broadPeak.old
mv SL985_Peaks.bed.broadPeak SL985_Peaks.bed.broadPeak.old
mv SL986_Peaks.bed.broadPeak SL986_Peaks.bed.broadPeak.old
mv SL988_Peaks.bed.broadPeak SL988_Peaks.bed.broadPeak.old

mv SL646_Peaks.bed.broadPeak.ok SL646_Peaks.bed.broadPeak
mv SL673_Peaks.bed.broadPeak.ok SL673_Peaks.bed.broadPeak
mv SL705_Peaks.bed.broadPeak.ok SL705_Peaks.bed.broadPeak
mv SL839_Peaks.bed.broadPeak.ok SL839_Peaks.bed.broadPeak
mv SL842_Peaks.bed.broadPeak.ok SL842_Peaks.bed.broadPeak
mv SL949_Peaks.bed.broadPeak.ok SL949_Peaks.bed.broadPeak
mv SL985_Peaks.bed.broadPeak.ok SL985_Peaks.bed.broadPeak
mv SL986_Peaks.bed.broadPeak.ok SL986_Peaks.bed.broadPeak
mv SL988_Peaks.bed.broadPeak.ok SL988_Peaks.bed.broadPeak

# edited DDF to for proper antibody names
# edited DAF for nMatch (allow and ignore Ns in the sequence) and quick=100 (already validated so this shoud speed things up)
# edited DDF to exclude GM12878/TCF12 since peaks were not submitted
# restart validation 

# new validation error.  Raw Signals must be built because HAIB provides no signals.  But Raw signal build turns up 12 tagAlign files with negative chromStarts!!! (all chrM)
# exclude negative numbers
grep -v ^chrM.*\-[0-9].*$ SL646.TagAlign >  SL646.TagAlign.ok
grep -v ^chrM.*\-[0-9].*$ SL705.TagAlign >  SL705.TagAlign.ok
grep -v ^chrM.*\-[0-9].*$ SL745.TagAlign >  SL745.TagAlign.ok
grep -v ^chrM.*\-[0-9].*$ SL839.TagAlign >  SL839.TagAlign.ok
grep -v ^chrM.*\-[0-9].*$ SL842.TagAlign >  SL842.TagAlign.ok
grep -v ^chrM.*\-[0-9].*$ SL845.TagAlign >  SL845.TagAlign.ok
grep -v ^chrM.*\-[0-9].*$ SL949.TagAlign >  SL949.TagAlign.ok
grep -v ^chrM.*\-[0-9].*$ SL950.TagAlign >  SL950.TagAlign.ok
grep -v ^chrM.*\-[0-9].*$ SL985.TagAlign >  SL985.TagAlign.ok
grep -v ^chrM.*\-[0-9].*$ SL986.TagAlign >  SL986.TagAlign.ok
grep -v ^chrM.*\-[0-9].*$ SL987.TagAlign >  SL987.TagAlign.ok
grep -v ^chrM.*\-[0-9].*$ SL988.TagAlign >  SL988.TagAlign.ok

grep ^chr.*\-[0-9].*$ SL646.TagAlign > SL646.TagAlign.neg
grep ^chr.*\-[0-9].*$ SL705.TagAlign > SL705.TagAlign.neg
grep ^chr.*\-[0-9].*$ SL745.TagAlign > SL745.TagAlign.neg
grep ^chr.*\-[0-9].*$ SL839.TagAlign > SL839.TagAlign.neg
grep ^chr.*\-[0-9].*$ SL842.TagAlign > SL842.TagAlign.neg
grep ^chr.*\-[0-9].*$ SL845.TagAlign > SL845.TagAlign.neg
grep ^chr.*\-[0-9].*$ SL949.TagAlign > SL949.TagAlign.neg
grep ^chr.*\-[0-9].*$ SL950.TagAlign > SL950.TagAlign.neg
grep ^chr.*\-[0-9].*$ SL985.TagAlign > SL985.TagAlign.neg
grep ^chr.*\-[0-9].*$ SL986.TagAlign > SL986.TagAlign.neg
grep ^chr.*\-[0-9].*$ SL987.TagAlign > SL987.TagAlign.neg
grep ^chr.*\-[0-9].*$ SL988.TagAlign > SL988.TagAlign.neg

wl SL646.TagAlign*
  6687019 SL646.TagAlign
       10 SL646.TagAlign.neg
  6687009 SL646.TagAlign.ok
wl SL705.TagAlign*
  6908754 SL705.TagAlign
        6 SL705.TagAlign.neg
  6908748 SL705.TagAlign.ok
wl SL745.TagAlign*
   9700070 SL745.TagAlign
         7 SL745.TagAlign.neg
   9700063 SL745.TagAlign.ok
wl SL839.TagAlign*
  15328082 SL839.TagAlign
        11 SL839.TagAlign.neg
  15328071 SL839.TagAlign.ok
wl SL842.TagAlign*
  14904855 SL842.TagAlign
         8 SL842.TagAlign.neg
  14904847 SL842.TagAlign.ok
wl SL845.TagAlign*
  15187957 SL845.TagAlign
         5 SL845.TagAlign.neg
  15187952 SL845.TagAlign.ok
wl SL949.TagAlign*
  17695757 SL949.TagAlign
         2 SL949.TagAlign.neg
  17695755 SL949.TagAlign.ok
wl SL950.TagAlign*
  16999702 SL950.TagAlign
         1 SL950.TagAlign.neg
  16999701 SL950.TagAlign.ok
wl SL985.TagAlign*
  16419103 SL985.TagAlign
        10 SL985.TagAlign.neg
  16419093 SL985.TagAlign.ok
wl SL986.TagAlign*
  14772569 SL986.TagAlign
         8 SL986.TagAlign.neg
  14772561 SL986.TagAlign.ok
wl SL987.TagAlign*
  15442480 SL987.TagAlign
         9 SL987.TagAlign.neg
  15442471 SL987.TagAlign.ok
wl SL988.TagAlign*
  14809751 SL988.TagAlign
         5 SL988.TagAlign.neg
  14809746 SL988.TagAlign.ok


mv SL646.TagAlign.ok SL646.TagAlign
mv SL705.TagAlign.ok SL705.TagAlign
mv SL745.TagAlign.ok SL745.TagAlign
mv SL839.TagAlign.ok SL839.TagAlign
mv SL842.TagAlign.ok SL842.TagAlign
mv SL845.TagAlign.ok SL845.TagAlign
mv SL949.TagAlign.ok SL949.TagAlign
mv SL950.TagAlign.ok SL950.TagAlign
mv SL985.TagAlign.ok SL985.TagAlign
mv SL986.TagAlign.ok SL986.TagAlign
mv SL987.TagAlign.ok SL987.TagAlign
mv SL988.TagAlign.ok SL988.TagAlign

# Now go back and handle the members of the submission which were single replicates
tar -cpzf haibNoReps.tgz DAF_HudsonAlphaChip.DAF DDF_HudsonAlpha_ChIP-seq-Oct09_A.noreps.DDF data/SL838.TagAlign data/SL838_Peaks.bed.broadPeak data/SL673.TagAlign data/SL673_Peaks.bed.broadPeak 

grep -v ^chrM.*\-[0-9].*$ SL673.TagAlign >  SL673.TagAlign.ok
grep ^chrM.*\-[0-9].*$ SL673.TagAlign >  SL673.TagAlign.neg
wl SL673.TagAlign*
  6284456 SL673.TagAlign
        6 SL673.TagAlign.neg
  6284450 SL673.TagAlign.ok
grep -v ^chrM.*\-[0-9].*$ SL838.TagAlign >  SL838.TagAlign.ok
grep ^chrM.*\-[0-9].*$ SL838.TagAlign >  SL838.TagAlign.neg
wl SL838.TagAlign*
  14852308 SL838.TagAlign
        10 SL838.TagAlign.neg
  14852298 SL838.TagAlign.ok

mv SL673.TagAlign.ok SL673.TagAlign
mv SL838.TagAlign.ok SL838.TagAlign

### Problems:
1) Missing 741/data/SL1019_Peaks.bed.broadPeak
2) Missing SK-N-MC/Input (provisional)
3) GM12878, K562 problem with 2 types of inputs, different PCR cycles??
4) What is with rep3 and rep5?  Oct2, Pbx3, Pu.1, TAF-1 (3 reps?  No peaks on 2)
5) What to do about provisional
6) HepG2/Srf/Rep2 only; RawSignal/Rep2/Gm12878/Tafii only
         Rep1Gm12878Irf4
         Rep1Gm12878Tcf12
         Rep1K562Tafii
         Rep1Helas3Control
         Rep2Hepg2Srf                                      2->1
             SknmcControl Not found                        provisional-1
         Rep3Gm12878Oct2 Rep5Gm12878Oct2                                 handled 3->1,5->2
         Rep3Gm12878Pbx3 Rep5Gm12878Pbx3                                 handled 3->1,5->2
         Rep3Gm12878Pu1  Rep5Gm12878Pu1                                  handled 3->1,5->2
RawSignalRep2Gm12878Tafii Rep3Gm12878Tafii Rep5Gm12878Tafii              handled 2 dropped!! 3->2

# What is up with Gm12878 and K562 Input??
+----------------------------------------------------------------------+----------+
| wgEncodeHudsonalphaChipSeqRawSignalRep1K562Control                   |  1862501 | 1.00 1734.00 stepped on beta 
| wgEncodeHudsonalphaChipSeqRawSignalRep1K562Control1                  |  2059222 | 1.00 6252.00
| wgEncodeHudsonalphaChipSeqRawSignalRep1K562Control2                  |  2324260 | 1.00 3825.00
| wgEncodeHudsonalphaChipSeqRawSignalRep2K562Control                   |  1741188 | 1.00 1482.00 stepped on beta 
| wgEncodeHudsonalphaChipSeqRawSignalRep2K562Control1                  |  1911410 | 1.00 3777.00
| wgEncodeHudsonalphaChipSeqRawSignalRep2K562Control2                  |  2500485 | 1.00 6656.00 
+----------------------------------------------------------------------+----------+
| wgEncodeHudsonalphaChipSeqRawSignalRep1Gm12878Control                |  1328955 | 1.00 509.00  stepped on beta 
| wgEncodeHudsonalphaChipSeqRawSignalRep1Gm12878Control1               |  2325323 | 1.00 2399.00
| wgEncodeHudsonalphaChipSeqRawSignalRep2Gm12878Control                |  1235707 | 1.00 472.00  stepped on beta 
| wgEncodeHudsonalphaChipSeqRawSignalRep2Gm12878Control1               |  2378799 | 1.00 2714.00
+----------------------------------------------------------------------+----------+
### There is a alpha control that stepped on all 4 beta controls!!! 

raToLines
linesToRa

cd {downloadsDir}
cp fileDb.ra fileDb.ra.2009-10-28
rm tmp.txt
grep metadata /hive/groups/encode/dcc/pipeline/encpipeline_prod/741/out/fileDb.ra | grep parentTable >> tmp.txt
grep metadata /hive/groups/encode/dcc/pipeline/encpipeline_prod/756/out/fileDb.ra | grep parentTable >> tmp.txt
cat tmp.txt >> fileDb.ra

# More missing
rm tmp.txt
grep metadata /hive/groups/encode/dcc/pipeline/encpipeline_prod/259/out/fileDb.ra | grep parentTable >> tmp.txt
grep metadata /hive/groups/encode/dcc/pipeline/encpipeline_prod/260/out/fileDb.ra | grep parentTable >> tmp.txt
grep metadata /hive/groups/encode/dcc/pipeline/encpipeline_prod/261/out/fileDb.ra | grep parentTable >> tmp.txt
grep metadata /hive/groups/encode/dcc/pipeline/encpipeline_prod/422/out/fileDb.ra | grep parentTable >> tmp.txt
grep metadata /hive/groups/encode/dcc/pipeline/encpipeline_prod/432/out/fileDb.ra | grep parentTable >> tmp.txt
grep metadata /hive/groups/encode/dcc/pipeline/encpipeline_prod/433/out/fileDb.ra | grep parentTable >> tmp.txt
grep metadata /hive/groups/encode/dcc/pipeline/encpipeline_prod/434/out/fileDb.ra | grep parentTable >> tmp.txt
grep metadata /hive/groups/encode/dcc/pipeline/encpipeline_prod/435/out/fileDb.ra | grep parentTable >> tmp.txt
grep metadata /hive/groups/encode/dcc/pipeline/encpipeline_prod/436/out/fileDb.ra | grep parentTable >> tmp.txt
grep metadata /hive/groups/encode/dcc/pipeline/encpipeline_prod/437/out/fileDb.ra | grep parentTable >> tmp.txt
grep metadata /hive/groups/encode/dcc/pipeline/encpipeline_prod/438/out/fileDb.ra | grep parentTable >> tmp.txt

# Still...
grep "wgEncodeHudsonalphaChipSeqRawDataRep2Gm12878Egr1\.fastq\.gz"  /hive/groups/encode/dcc/pipeline/encpipeline_prod/260/out/fileDb.ra

grep metadata /hive/groups/encode/dcc/pipeline/encpipeline_prod/268/out/fileDb.ra | grep parentTable
### Now the mystery of 268 is solved
/cluster/data/encode/pipeline/bin/encodeStatus.pl 268 displayed
grep metadata /hive/groups/encode/dcc/pipeline/encpipeline_prod/268/out/fileDb.ra | grep parentTable >> fileDb.ra

mkdir saveForResolution
mv *A549*.gz saveForResolution/
mv *Control2.* saveForResolution/

# edit fileDb.ra for duplicates and for replicate 3 and 5
# Now we are finally ready to:
encodeDownloadsPage.pl index.html
/cluster/data/encode/pipeline/bin/encodeStatus.pl 741 displayed
/cluster/data/encode/pipeline/bin/encodeStatus.pl 756 displayed

### Resolution of GM12878/TAF
submission 125 using SL288 is bad.
submission 126 is bad.
mv *Rep1Gm12878Taf* saveForResolution/
mv *Rep1K562Taf* saveForResolution/
# edit trackDb and fileDb
make alpha DBS=hg18
encodeDownloadsPage.pl index.html

### Namme changes to close this issue!
# peaks first (easiest):
drop table wgEncodeHudsonalphaChipSeqPeaksRep1Gm12878Tafii;
drop table wgEncodeHudsonalphaChipSeqPeaksRep1K562Tafii;

rename table wgEncodeHudsonalphaChipSeqPeaksRep3Gm12878Oct2      to wgEncodeHudsonalphaChipSeqPeaksRep1Gm12878Oct2 ;
rename table wgEncodeHudsonalphaChipSeqPeaksRep3Gm12878Pbx3      to wgEncodeHudsonalphaChipSeqPeaksRep1Gm12878Pbx3 ;
rename table wgEncodeHudsonalphaChipSeqPeaksRep3Gm12878Pu1       to wgEncodeHudsonalphaChipSeqPeaksRep1Gm12878Pu1  ;
rename table wgEncodeHudsonalphaChipSeqPeaksRep3Gm12878Tafii     to wgEncodeHudsonalphaChipSeqPeaksRep1Gm12878Tafii;
rename table wgEncodeHudsonalphaChipSeqPeaksRep5Gm12878Oct2      to wgEncodeHudsonalphaChipSeqPeaksRep2Gm12878Oct2 ;
rename table wgEncodeHudsonalphaChipSeqPeaksRep5Gm12878Pbx3      to wgEncodeHudsonalphaChipSeqPeaksRep2Gm12878Pbx3 ;
rename table wgEncodeHudsonalphaChipSeqPeaksRep5Gm12878Pu1       to wgEncodeHudsonalphaChipSeqPeaksRep2Gm12878Pu1  ;
cd {downloadsDir}
mv wgEncodeHudsonalphaChipSeqPeaksRep3Gm12878Oct2.broadPeak.gz  wgEncodeHudsonalphaChipSeqPeaksRep1Gm12878Oct2.broadPeak.gz
mv wgEncodeHudsonalphaChipSeqPeaksRep3Gm12878Pbx3.broadPeak.gz  wgEncodeHudsonalphaChipSeqPeaksRep1Gm12878Pbx3.broadPeak.gz
mv wgEncodeHudsonalphaChipSeqPeaksRep3Gm12878Pu1.broadPeak.gz   wgEncodeHudsonalphaChipSeqPeaksRep1Gm12878Pu1.broadPeak.gz
mv wgEncodeHudsonalphaChipSeqPeaksRep3Gm12878Tafii.broadPeak.gz wgEncodeHudsonalphaChipSeqPeaksRep1Gm12878Tafii.broadPeak.gz
mv wgEncodeHudsonalphaChipSeqPeaksRep5Gm12878Oct2.broadPeak.gz  wgEncodeHudsonalphaChipSeqPeaksRep2Gm12878Oct2.broadPeak.gz
mv wgEncodeHudsonalphaChipSeqPeaksRep5Gm12878Pbx3.broadPeak.gz  wgEncodeHudsonalphaChipSeqPeaksRep2Gm12878Pbx3.broadPeak.gz
mv wgEncodeHudsonalphaChipSeqPeaksRep5Gm12878Pu1.broadPeak.gz   wgEncodeHudsonalphaChipSeqPeaksRep2Gm12878Pu1.broadPeak.gz

# RawSignals (a pain):
drop table wgEncodeHudsonalphaChipSeqRawSignalRep1Gm12878Tafii;
drop table wgEncodeHudsonalphaChipSeqRawSignalRep1K562Tafii;
rm /gbdb/hg18/wib/wgEncodeHudsonalphaChipSeqRawSignalRep1Gm12878Tafii.wib
rm /gbdb/hg18/wib/wgEncodeHudsonalphaChipSeqRawSignalRep1K562Tafii.wib

rename table wgEncodeHudsonalphaChipSeqRawSignalRep3Gm12878Oct2  to wgEncodeHudsonalphaChipSeqRawSignalRep1Gm12878Oct2 ;
rename table wgEncodeHudsonalphaChipSeqRawSignalRep3Gm12878Pbx3  to wgEncodeHudsonalphaChipSeqRawSignalRep1Gm12878Pbx3 ;
rename table wgEncodeHudsonalphaChipSeqRawSignalRep3Gm12878Pu1   to wgEncodeHudsonalphaChipSeqRawSignalRep1Gm12878Pu1  ;
rename table wgEncodeHudsonalphaChipSeqRawSignalRep3Gm12878Tafii to wgEncodeHudsonalphaChipSeqRawSignalRep1Gm12878Tafii;
rename table wgEncodeHudsonalphaChipSeqRawSignalRep5Gm12878Oct2  to wgEncodeHudsonalphaChipSeqRawSignalRep2Gm12878Oct2 ;
rename table wgEncodeHudsonalphaChipSeqRawSignalRep5Gm12878Pbx3  to wgEncodeHudsonalphaChipSeqRawSignalRep2Gm12878Pbx3 ;
rename table wgEncodeHudsonalphaChipSeqRawSignalRep5Gm12878Pu1   to wgEncodeHudsonalphaChipSeqRawSignalRep2Gm12878Pu1  ;

# wibs too?? Yes.
update wgEncodeHudsonalphaChipSeqRawSignalRep1Gm12878Tafii set file = "/gbdb/hg18/wib/wgEncodeHudsonalphaChipSeqRawSignalRep1Gm12878Tafii.wib";
update wgEncodeHudsonalphaChipSeqRawSignalRep1Gm12878Oct2  set file = "/gbdb/hg18/wib/wgEncodeHudsonalphaChipSeqRawSignalRep1Gm12878Oct2.wib";
update wgEncodeHudsonalphaChipSeqRawSignalRep1Gm12878Pbx3  set file = "/gbdb/hg18/wib/wgEncodeHudsonalphaChipSeqRawSignalRep1Gm12878Pbx3.wib";
update wgEncodeHudsonalphaChipSeqRawSignalRep1Gm12878Pu1   set file = "/gbdb/hg18/wib/wgEncodeHudsonalphaChipSeqRawSignalRep1Gm12878Pu1.wib";
update wgEncodeHudsonalphaChipSeqRawSignalRep2Gm12878Oct2  set file = "/gbdb/hg18/wib/wgEncodeHudsonalphaChipSeqRawSignalRep2Gm12878Oct2.wib";
update wgEncodeHudsonalphaChipSeqRawSignalRep2Gm12878Pbx3  set file = "/gbdb/hg18/wib/wgEncodeHudsonalphaChipSeqRawSignalRep2Gm12878Pbx3.wib";
update wgEncodeHudsonalphaChipSeqRawSignalRep2Gm12878Pu1   set file = "/gbdb/hg18/wib/wgEncodeHudsonalphaChipSeqRawSignalRep2Gm12878Pu1.wib";
pushd /gbdb/hg18/wib/
mv wgEncodeHudsonalphaChipSeqRawSignalRep3Gm12878Tafii.wib wgEncodeHudsonalphaChipSeqRawSignalRep1Gm12878Tafii.wib
mv wgEncodeHudsonalphaChipSeqRawSignalRep3Gm12878Oct2.wib  wgEncodeHudsonalphaChipSeqRawSignalRep1Gm12878Oct2.wib
mv wgEncodeHudsonalphaChipSeqRawSignalRep3Gm12878Pbx3.wib  wgEncodeHudsonalphaChipSeqRawSignalRep1Gm12878Pbx3.wib
mv wgEncodeHudsonalphaChipSeqRawSignalRep3Gm12878Pu1.wib   wgEncodeHudsonalphaChipSeqRawSignalRep1Gm12878Pu1.wib
mv wgEncodeHudsonalphaChipSeqRawSignalRep5Gm12878Oct2.wib  wgEncodeHudsonalphaChipSeqRawSignalRep2Gm12878Oct2.wib
mv wgEncodeHudsonalphaChipSeqRawSignalRep5Gm12878Pbx3.wib  wgEncodeHudsonalphaChipSeqRawSignalRep2Gm12878Pbx3.wib
mv wgEncodeHudsonalphaChipSeqRawSignalRep5Gm12878Pu1.wib   wgEncodeHudsonalphaChipSeqRawSignalRep2Gm12878Pu1.wib
pop 

# tagAligns ad fastqs (only files)
mv wgEncodeHudsonalphaChipSeqAlignmentsRep3Gm12878Tafii.tagAlign.gz wgEncodeHudsonalphaChipSeqAlignmentsRep1Gm12878Tafii.tagAlign.gz
mv wgEncodeHudsonalphaChipSeqAlignmentsRep3Gm12878Pu1.tagAlign.gz   wgEncodeHudsonalphaChipSeqAlignmentsRep1Gm12878Pu1.tagAlign.gz
mv wgEncodeHudsonalphaChipSeqAlignmentsRep3Gm12878Oct2.tagAlign.gz  wgEncodeHudsonalphaChipSeqAlignmentsRep1Gm12878Oct2.tagAlign.gz
mv wgEncodeHudsonalphaChipSeqAlignmentsRep3Gm12878Pbx3.tagAlign.gz  wgEncodeHudsonalphaChipSeqAlignmentsRep1Gm12878Pbx3.tagAlign.gz
mv wgEncodeHudsonalphaChipSeqAlignmentsRep5Gm12878Pbx3.tagAlign.gz  wgEncodeHudsonalphaChipSeqAlignmentsRep2Gm12878Pbx3.tagAlign.gz
mv wgEncodeHudsonalphaChipSeqAlignmentsRep5Gm12878Oct2.tagAlign.gz  wgEncodeHudsonalphaChipSeqAlignmentsRep2Gm12878Oct2.tagAlign.gz
mv wgEncodeHudsonalphaChipSeqAlignmentsRep5Gm12878Pu1.tagAlign.gz   wgEncodeHudsonalphaChipSeqAlignmentsRep2Gm12878Pu1.tagAlign.gz
### No fastq for these!!!

# edit trackDb edit fileDb.ra
make alpha DBS=hg18
encodeDownloadsPage.pl index.html

### Should do this, but they are currently marked as "released" update projects set status = "revoked" where id in (125,126);

# Before any more harm, should make release1 dir:
mkdir release1
cd release1/
mv ../saveForResolution/*Tafii* .
# vew source of downloads index.html on RR and save to /cse/staff/tdreszer/docs/ENCODE/haibTfbsRel1index.html
cp /cse/staff/tdreszer/docs/ENCODE/haibTfbsRel1index.html index.html
cp ../fileDb.ra.2009-10-28 fileDb.ra
ln ../wgEncodeHudsonalphaChipSeqRawDataRep1Gm12878Control.fastq.gz .
ln ../wgEncodeHudsonalphaChipSeqRawDataRep2Gm12878Control.fastq.gz .
ln ../wgEncodeHudsonalphaChipSeqAlignmentsRep1Gm12878Control.tagAlign.gz .
ln ../wgEncodeHudsonalphaChipSeqAlignmentsRep2Gm12878Control.tagAlign.gz .
ln ../wgEncodeHudsonalphaChipSeqRawDataRep1Gm12878Gabp.fastq.gz .
ln ../wgEncodeHudsonalphaChipSeqRawDataRep2Gm12878Gabp.fastq.gz .
ln ../wgEncodeHudsonalphaChipSeqAlignmentsRep1Gm12878Gabp.tagAlign.gz .
ln ../wgEncodeHudsonalphaChipSeqAlignmentsRep2Gm12878Gabp.tagAlign.gz .
ln ../wgEncodeHudsonalphaChipSeqRawDataRep1Gm12878Nrsf.fastq.gz .
ln ../wgEncodeHudsonalphaChipSeqRawDataRep2Gm12878Nrsf.fastq.gz .
ln ../wgEncodeHudsonalphaChipSeqAlignmentsRep1Gm12878Nrsf.tagAlign.gz .
ln ../wgEncodeHudsonalphaChipSeqAlignmentsRep2Gm12878Nrsf.tagAlign.gz .
ln ../wgEncodeHudsonalphaChipSeqRawDataRep1Gm12878Pol2.fastq.gz .
ln ../wgEncodeHudsonalphaChipSeqRawDataRep2Gm12878Pol2.fastq.gz .
ln ../wgEncodeHudsonalphaChipSeqAlignmentsRep1Gm12878Pol2.tagAlign.gz .
ln ../wgEncodeHudsonalphaChipSeqAlignmentsRep2Gm12878Pol2.tagAlign.gz .
ln ../wgEncodeHudsonalphaChipSeqRawDataRep1Gm12878Srf.fastq.gz .
ln ../wgEncodeHudsonalphaChipSeqRawDataRep2Gm12878Srf.fastq.gz .
ln ../wgEncodeHudsonalphaChipSeqAlignmentsRep1Gm12878Srf.tagAlign.gz .
ln ../wgEncodeHudsonalphaChipSeqAlignmentsRep2Gm12878Srf.tagAlign.gz .
ln ../wgEncodeHudsonalphaChipSeqRawDataRep1K562Control.fastq.gz .
ln ../wgEncodeHudsonalphaChipSeqRawDataRep2K562Control.fastq.gz .
ln ../wgEncodeHudsonalphaChipSeqAlignmentsRep1K562Control.tagAlign.gz .
ln ../wgEncodeHudsonalphaChipSeqAlignmentsRep2K562Control.tagAlign.gz .
ln ../wgEncodeHudsonalphaChipSeqRawDataRep1K562Gabp.fastq.gz .
ln ../wgEncodeHudsonalphaChipSeqRawDataRep2K562Gabp.fastq.gz .
ln ../wgEncodeHudsonalphaChipSeqAlignmentsRep1K562Gabp.tagAlign.gz .
ln ../wgEncodeHudsonalphaChipSeqAlignmentsRep2K562Gabp.tagAlign.gz .
ln ../wgEncodeHudsonalphaChipSeqRawDataRep1K562Nrsf.fastq.gz .
ln ../wgEncodeHudsonalphaChipSeqRawDataRep2K562Nrsf.fastq.gz .
ln ../wgEncodeHudsonalphaChipSeqAlignmentsRep1K562Nrsf.tagAlign.gz .
ln ../wgEncodeHudsonalphaChipSeqAlignmentsRep2K562Nrsf.tagAlign.gz .
ln ../wgEncodeHudsonalphaChipSeqRawDataRep1K562Pol2.fastq.gz .
ln ../wgEncodeHudsonalphaChipSeqRawDataRep2K562Pol2.fastq.gz .
ln ../wgEncodeHudsonalphaChipSeqAlignmentsRep1K562Pol2.tagAlign.gz .
ln ../wgEncodeHudsonalphaChipSeqAlignmentsRep2K562Pol2.tagAlign.gz .
ln ../wgEncodeHudsonalphaChipSeqRawDataRep1K562Srf.fastq.gz .
ln ../wgEncodeHudsonalphaChipSeqRawDataRep2K562Srf.fastq.gz .
ln ../wgEncodeHudsonalphaChipSeqAlignmentsRep1K562Srf.tagAlign.gz .
ln ../wgEncodeHudsonalphaChipSeqAlignmentsRep2K562Srf.tagAlign.gz .
### Note: I have stepped on GM12878/TAF1/Rep1 and K562/TAF1/Rep1 wib files.  Those currently on RR are different from those on hgwdev !!

### Cleanup validation_error 
update projects set status = "superseded" where id = 103;

### Outstanding problems:
1) Fastqs missing for:
GM12878/BATF both replicates
GM12878/EBF both replicates
GM12878/Egr-1 rep 1 only (have rep2)
GM12878/IRF4 rep 1 only (no rep2)
GM12878/Oct-2 both replicates
GM12878/Pbx3 both replicates
GM12878/PU.1 both replicates
GM12878/TAF1 rep 1 only (rep2 incomplete anyway)
GM12878/TAF12 rep 1 only (no rep2)
K562/HEY1 both replicates
K562/SIX5 both replicates
HeLa-S3/Pol2 both replicates
HeLa-S3/Input rep 1 only (no rep2)
HepG2/JunD both replicates # all HepG2 (submission 419 validation failed)
HepG2/NRSF both replicates
HepG2/p300 both replicates
HepG2/Pol2 both replicates
HepG2/Sin3Ak-20 both replicates
HepG2/SRF rep 2 only (no rep1)
HepG2/U87 both replicates
HepG2/Input both replicates
BE2_C/NRSF both replicates
BE2_C/Input both replicates
PANC-1/NRSF both replicates
PANC-1/Input both replicates
PFSK-1/FOXP2 rep 1 (have rep2)
PFSK-1/NRSF both replicates
PFSK-1/Input both replicates
SK-N-MC/FOXP2 rep 1 (have rep2)
SK-N-SH_RA/NRSF both replicates
SK-N-SH_RA/Input both replicates
U87/NRSF both replicates
U87/Input both replicates
      
2009-10-29 Completing the Sep freeze submissions??
==================================================
cd {pip}759
mv ../741/data/SL1019.TagAlign data/ 
grep ^chr.*\-[0-9].*$ SL1019.TagAlign > SL1019.TagAlign.neg
grep -v ^chrM.*\-[0-9].*$ SL1019.TagAlign >  SL1019.TagAlign.ok
grep ^chr.*\-[0-9].*$ SL951.TagAlign > SL951.TagAlign.neg
grep -v ^chrM.*\-[0-9].*$ SL951.TagAlign >  SL951.TagAlign.ok
mv SL1019.TagAlign.ok SL1019.TagAlign 
mv SL951.TagAlign.ok SL951.TagAlign 

validateFiles -type=broadPeak -chromDb=hg18 -genome=/cluster/data/hg18/hg18.2bit -printFailLines SL1019_Peaks.bed.broadPeak > SL1019_Peaks.bed.broadPeak.err
validateFiles -type=broadPeak -chromDb=hg18 -genome=/cluster/data/hg18/hg18.2bit -printFailLines SL951_Peaks.bed.broadPeak > SL951_Peaks.bed.broadPeak.err
ll *.err  none!
# left out of the DDF submitted by Rami so do this one by hand:
validateFiles -type=tagAlign -chromDb=hg18 -genome=/cluster/data/hg18/hg18.2bit -mmCheckOneInN=100 -mismatches=2 -matchFirst=32 -nMatch SL1019.TagAlign

grep ^chrM.*1657[1-9].*$ SL951.TagAlign > SL951.TagAlign.over
grep -v ^chrM.*1657[1-9].*$ SL951.TagAlign > SL951.TagAlign.ok
mv SL951.TagAlign.ok SL951.TagAlign
grep ^chrM.*1657[1-9].*$ SL1019.TagAlign > SL1019.TagAlign.over
grep -v ^chrM.*1657[1-9].*$ SL1019.TagAlign > SL1019.TagAlign.ok
mv SL1019.TagAlign.ok SL1019.TagAlign

# edit trackDb
make alpha

### round and round.  It is now clear that GM12878/TAF1 is a versioning of already released data and needs to be renamed as such!!!
rename table wgEncodeHudsonalphaChipSeqPeaksRep1Gm12878Tafii      to wgEncodeHudsonalphaChipSeqPeaksRep1Gm12878TafiiV2 ;
rename table wgEncodeHudsonalphaChipSeqRawSignalRep1Gm12878Tafii  to wgEncodeHudsonalphaChipSeqRawSignalRep1Gm12878TafiiV2 ;
rename table wgEncodeHudsonalphaChipSeqRawSignalRep2Gm12878Tafii  to wgEncodeHudsonalphaChipSeqRawSignalRep2Gm12878TafiiV2 ;

mv wgEncodeHudsonalphaChipSeqPeaksRep1Gm12878Tafii.broadPeak.gz     wgEncodeHudsonalphaChipSeqPeaksRep1Gm12878TafiiV2.broadPeak.gz 
mv wgEncodeHudsonalphaChipSeqAlignmentsRep1Gm12878Tafii.tagAlign.gz wgEncodeHudsonalphaChipSeqAlignmentsRep1Gm12878TafiiV2.tagAlign.gz
mv wgEncodeHudsonalphaChipSeqAlignmentsRep2Gm12878Tafii.tagAlign.gz wgEncodeHudsonalphaChipSeqAlignmentsRep2Gm12878TafiiV2.tagAlign.gz

pushd /gbdb/hg18/wib/
mv wgEncodeHudsonalphaChipSeqRawSignalRep1Gm12878Tafii.wib wgEncodeHudsonalphaChipSeqRawSignalRep1Gm12878TafiiV2.wib
mv wgEncodeHudsonalphaChipSeqRawSignalRep2Gm12878Tafii.wib wgEncodeHudsonalphaChipSeqRawSignalRep2Gm12878TafiiV2.wib
pop

update wgEncodeHudsonalphaChipSeqRawSignalRep1Gm12878TafiiV2 set file = "/gbdb/hg18/wib/wgEncodeHudsonalphaChipSeqRawSignalRep1Gm12878TafiiV2.wib";
update wgEncodeHudsonalphaChipSeqRawSignalRep2Gm12878TafiiV2 set file = "/gbdb/hg18/wib/wgEncodeHudsonalphaChipSeqRawSignalRep2Gm12878TafiiV2.wib";

# edit tracDb, fileDb

### Working through the GM12878 and K562 controls issue:
# From Rami: 262 includes all datasets in 51, plus 2 more controls. So we can delete 51.
# "Single PCR, 15 Cycles"  "Single PCR, 18 Cycles".  Which is which?  Brian says 18C was already released.
# From Flo (helps alot):
>> Tim, we've used 2 methods to generate control (and ChIP) libraries.  The first used two rounds of PCR.  
>> The second uses one round of PCR.  When we were switching over to one round, we initially tried 18 cycles 
>> and then settled on 15.  However, there were only a few 18 cycle experiments and we did not and will not 
>> submit any data with 18 cycles.  When we pair ChIP and control libraries for Rami to submit, we make sure 
>> that we pair the methods, so this was done on our side already.  However, it sounds like you need to know 
>> what is what.  Correct?  I don't know if you get our SL numbers in our submission, but this may help:
> Original protocol:
> SL217 - GM12878 Rep.1, 2 rounds PCR
> SL218 - GM12878 Rep.2, 2 rounds PCR
> SL233 - K562 Rep.1, 2 rounds PCR
> SL234 - K562 Rep.2, 2 rounds PCR
>
> New protocol:
> SL516 - GM12878 Rep.1, 1 round PCR (15 cycles)
> SL517 - GM12878 Rep.2, 1 round PCR (15 cycles)
> SL518 - K562 Rep.1, 1 round PCR (15 cycles)
> SL519 - K562 Rep.2, 1 round PCR (15 cycles)
# Now the DDF from subId=262
files   view    cell    replicate       antibody        softwareVersion labVersion
ctrl_data/SL217_Bg_GM12878_Rep1_hg18.TagAlign   Alignments      GM12878 1       Control 1       1
ctrl_data/SL218_Bg_GM12878_Rep2_hg18.TagAlign   Alignments      GM12878 2       Control 1       1
ctrl_data/SL233_Bg_K562_Rep1_hg18.TagAlign      Alignments      K562    1       Control 1       1
ctrl_data/SL234_Bg_K562_Rep2_hg18.TagAlign      Alignments      K562    2       Control 1       1
ctrl_data/SL518_Bg_K562_Rep1_hg18.TagAlign      Alignments      K562    1       Control 1       2
ctrl_data/SL519_Bg_K562_Rep2_hg18.TagAlign      Alignments      K562    2       Control 1       2
### Conclusion? OLD VERSION is named as "Control1" and new version was "Control2" but has been superseded on hgwdev with "Control" (because Rami resubmits over and over). 

# lost download files!
save them from RR downloads
mv /hive/groups/encode/dcc/pipeline/encpipeline_prod/262/save/*.gz {downloadsDir}/release1
touch -t 200811202359 *Gm12878Control*.gz  # date on RR
touch -t 200811202359 *K562Control*.gz
# still, this is NOT what was submitted for Control1
So back to first principles
gzip --stdout /hive/groups/encode/dcc/pipeline/encpipeline_prod/262/ctrl_data/SL217_Bg_GM12878_Rep1_hg18.TagAlign > wgEncodeHudsonalphaChipSeqAlignmentsRep1Gm12878Control1.tagAlign.gz
gzip --stdout /hive/groups/encode/dcc/pipeline/encpipeline_prod/262/ctrl_data/SL218_Bg_GM12878_Rep2_hg18.TagAlign > wgEncodeHudsonalphaChipSeqAlignmentsRep2Gm12878Control1.tagAlign.gz
gzip --stdout /hive/groups/encode/dcc/pipeline/encpipeline_prod/262/ctrl_data/SL233_Bg_K562_Rep1_hg18.TagAlign > wgEncodeHudsonalphaChipSeqAlignmentsRep1K562Control1.tagAlign.gz
gzip --stdout /hive/groups/encode/dcc/pipeline/encpipeline_prod/262/ctrl_data/SL234_Bg_K562_Rep2_hg18.TagAlign > wgEncodeHudsonalphaChipSeqAlignmentsRep2K562Control1.tagAlign.gz
mv wgEncodeHudsonalphaChipSeqAlignmentsRep1Gm12878Control1.tagAlign.gz wgEncodeHudsonalphaChipSeqAlignmentsRep1Gm12878ControlPcr2x.tagAlign.gz
mv wgEncodeHudsonalphaChipSeqAlignmentsRep2Gm12878Control1.tagAlign.gz wgEncodeHudsonalphaChipSeqAlignmentsRep2Gm12878ControlPcr2x.tagAlign.gz
mv wgEncodeHudsonalphaChipSeqAlignmentsRep1K562Control1.tagAlign.gz wgEncodeHudsonalphaChipSeqAlignmentsRep1K562ControlPcr2x.tagAlign.gz
mv wgEncodeHudsonalphaChipSeqAlignmentsRep2K562Control1.tagAlign.gz wgEncodeHudsonalphaChipSeqAlignmentsRep2K562ControlPcr2x.tagAlign.gz

rename table wgEncodeHudsonalphaChipSeqRawSignalRep1Gm12878Control1 to wgEncodeHudsonalphaChipSeqRawSignalRep1Gm12878ControlPcr2x;
rename table wgEncodeHudsonalphaChipSeqRawSignalRep1K562Control1    to wgEncodeHudsonalphaChipSeqRawSignalRep1K562ControlPcr2x; 
rename table wgEncodeHudsonalphaChipSeqRawSignalRep2Gm12878Control1 to wgEncodeHudsonalphaChipSeqRawSignalRep2Gm12878ControlPcr2x; 
rename table wgEncodeHudsonalphaChipSeqRawSignalRep2K562Control1    to wgEncodeHudsonalphaChipSeqRawSignalRep2K562ControlPcr2x; 

update wgEncodeHudsonalphaChipSeqRawSignalRep1Gm12878ControlPcr2x set file = "/gbdb/hg18/wib/wgEncodeHudsonalphaChipSeqRawSignalRep1Gm12878ControlPcr2x.wib";
update wgEncodeHudsonalphaChipSeqRawSignalRep1K562ControlPcr2x set file = "/gbdb/hg18/wib/wgEncodeHudsonalphaChipSeqRawSignalRep1K562ControlPcr2x.wib";
update wgEncodeHudsonalphaChipSeqRawSignalRep2Gm12878ControlPcr2x set file = "/gbdb/hg18/wib/wgEncodeHudsonalphaChipSeqRawSignalRep2Gm12878ControlPcr2x.wib";
update wgEncodeHudsonalphaChipSeqRawSignalRep2K562ControlPcr2x set file = "/gbdb/hg18/wib/wgEncodeHudsonalphaChipSeqRawSignalRep2K562ControlPcr2x.wib";

pushd /gbdb/hg18/wib
mv wgEncodeHudsonalphaChipSeqRawSignalRep1Gm12878Control1_262.wib wgEncodeHudsonalphaChipSeqRawSignalRep1Gm12878Control1Pcr2x.wib
mv wgEncodeHudsonalphaChipSeqRawSignalRep1K562Control1_262.wib    wgEncodeHudsonalphaChipSeqRawSignalRep1K562Control1Pcr2x.wib
mv wgEncodeHudsonalphaChipSeqRawSignalRep2Gm12878Control1_262.wib wgEncodeHudsonalphaChipSeqRawSignalRep2Gm12878Control1Pcr2x.wib
mv wgEncodeHudsonalphaChipSeqRawSignalRep2K562Control1_262.wib    wgEncodeHudsonalphaChipSeqRawSignalRep2K562Control1Pcr2x.wib
pop
touch -t 200902272359 *ControlPcr2x.*.gz  # date of subId=262

grep metadata /hive/groups/encode/dcc/pipeline/encpipeline_prod/759/out/fileDb.ra | grep parentTable >> fileDb.ra
encodeDownloadsPage.pl index.html
/cluster/data/encode/pipeline/bin/encodeStatus.pl 759 displayed

################### Not done:
#mv wgEncodeHudsonalphaChipSeqAlignmentsRep1Gm12878Control.tagAlign.gz wgEncodeHudsonalphaChipSeqAlignmentsRep1Gm12878ControlPcr1x.tagAlign.gz
#mv wgEncodeHudsonalphaChipSeqAlignmentsRep2Gm12878Control.tagAlign.gz wgEncodeHudsonalphaChipSeqAlignmentsRep2Gm12878ControlPcr1x.tagAlign.gz
#mv wgEncodeHudsonalphaChipSeqAlignmentsRep1K562Control.tagAlign.gz wgEncodeHudsonalphaChipSeqAlignmentsRep1K562ControlPcr1x.tagAlign.gz
#mv wgEncodeHudsonalphaChipSeqAlignmentsRep2K562Control.tagAlign.gz wgEncodeHudsonalphaChipSeqAlignmentsRep2K562ControlPcr1x.tagAlign.gz
#
#rename table wgEncodeHudsonalphaChipSeqRawSignalRep1Gm12878Control to wgEncodeHudsonalphaChipSeqRawSignalRep1Gm12878ControlPcr1x;
#rename table wgEncodeHudsonalphaChipSeqRawSignalRep1K562Control    to wgEncodeHudsonalphaChipSeqRawSignalRep1K562ControlPcr1x; 
#rename table wgEncodeHudsonalphaChipSeqRawSignalRep2Gm12878Control to wgEncodeHudsonalphaChipSeqRawSignalRep2Gm12878ControlPcr1x; 
#rename table wgEncodeHudsonalphaChipSeqRawSignalRep2K562Control    to wgEncodeHudsonalphaChipSeqRawSignalRep2K562ControlPcr1x; 
#
#update wgEncodeHudsonalphaChipSeqRawSignalRep1Gm12878ControlPcr1x set file = "/gbdb/hg18/wib/wgEncodeHudsonalphaChipSeqRawSignalRep1Gm12878ControlPcr1x.wib";
#update wgEncodeHudsonalphaChipSeqRawSignalRep1K562ControlPcr1x set file = "/gbdb/hg18/wib/wgEncodeHudsonalphaChipSeqRawSignalRep1K562ControlPcr1x.wib";
#update wgEncodeHudsonalphaChipSeqRawSignalRep2Gm12878ControlPcr1x set file = "/gbdb/hg18/wib/wgEncodeHudsonalphaChipSeqRawSignalRep2Gm12878ControlPcr1x.wib";
#update wgEncodeHudsonalphaChipSeqRawSignalRep2K562ControlPcr1x set file = "/gbdb/hg18/wib/wgEncodeHudsonalphaChipSeqRawSignalRep2K562ControlPcr1x.wib";
#
#pushd /gbdb/hg18/wib
#mv wgEncodeHudsonalphaChipSeqRawSignalRep1Gm12878Control.wib wgEncodeHudsonalphaChipSeqRawSignalRep1Gm12878Control1Pcr1x.wib
#mv wgEncodeHudsonalphaChipSeqRawSignalRep2Gm12878Control.wib wgEncodeHudsonalphaChipSeqRawSignalRep2Gm12878Control1Pcr1x.wib
#mv wgEncodeHudsonalphaChipSeqRawSignalRep1K562Control.wib    wgEncodeHudsonalphaChipSeqRawSignalRep1K562Control1Pcr1x.wib
#mv wgEncodeHudsonalphaChipSeqRawSignalRep2K562Control.wib    wgEncodeHudsonalphaChipSeqRawSignalRep2K562Control1Pcr1x.wib
#pop

2009-11-03 Back to the PCR2x controversy
========================================
# The PCR2x guilty:
# GM12878 & K562: Erg-1 GABP NRSF Pol2 Sin3Ak-20 SRF USF-1
# with exceptions: NRSF Pol2 Sin3Ak-20 SRF USF-1

# mock up Flo's p1 idea but don't check it in.
# the 'p1' idea is to have antibody names with superscript of the protocol used.  
# p1 would be the first protocol (PCR2x) and p2 would be the more recent (PCR1x)
# Unfortinately, since there are different protocols used for different antibodies, 
# the superscript should be by the matrix CB not the antibody.  But this will require much bigger changes

# Now haib would like the p1 idea by the matrix CB and they have declared 4 different protocols!
# This will not be done at this time.

# Now need to revert the mockup.  Of course I also added OpenChromatin changes, so I need to get the prior release.

### NOTE: this old submission was released a long time ago!
/cluster/data/encode/pipeline/bin/encodeStatus.pl 204 reviewing
/cluster/data/encode/pipeline/bin/encodeStatus.pl 204 released

2009-11-03 Get some new submissions loaded
==========================================
# edit trackDb to add 774, 776 and 780.  768 is fastq only
make alpha DBS=hg18

cd {downloadsDir}
rm tmp.txt
grep metadata /hive/groups/encode/dcc/pipeline/encpipeline_prod/774/out/fileDb.ra | grep parentTable >> tmp.txt
grep metadata /hive/groups/encode/dcc/pipeline/encpipeline_prod/776/out/fileDb.ra | grep parentTable >> tmp.txt
grep metadata /hive/groups/encode/dcc/pipeline/encpipeline_prod/780/out/fileDb.ra | grep parentTable >> tmp.txt
grep metadata /hive/groups/encode/dcc/pipeline/encpipeline_prod/768/out/fileDb.ra | grep parentTable >> tmp.txt
e tmp.txt
# problem: no fastq metadata in 768.  Are the files there? NO!!!
mv out/ oldOut/
mv HA_GR.ddf to oldOut/
# edit the fastq's *.ddf to remove duplicate controls.
ll SL516.* SL517.*
-rw-rw-r-- 1 qateam protein 698138031 Oct 17 22:25 SL516.fastq.gz
-rw-rw-r-- 1 qateam protein 708073019 Oct 17 22:25 SL517.fastq.gz
ll *Gm12878Control.fastq.gz
-rw-rw-r-- 1 qateam protein 556803234 Jul  6 15:06 wgEncodeHudsonalphaChipSeqRawDataRep1Gm12878Control.fastq.gz
-rw-rw-r-- 1 qateam protein 920696125 Jul  6 15:13 wgEncodeHudsonalphaChipSeqRawDataRep2Gm12878Control.fastq.gz
# Not the same!
[hgwdev:tdreszer 768> ll SL518.* SL519.*
-rw-rw-r-- 1 qateam protein         0 Oct 17 22:19 SL518.fastq.gz
-rw-rw-r-- 1 qateam protein 544022201 Oct 17 22:23 SL519.fastq.gz
[hgwdev:tdreszer wgEncodeHudsonalphaChipSeq> ll *K562Control.fastq.gz
-rw-rw-r-- 1 qateam protein 1311405003 Jul  6 13:56 wgEncodeHudsonalphaChipSeqRawDataRep1K562Control.fastq.gz
-rw-rw-r-- 1 qateam protein  985839568 Jul  6 14:56 wgEncodeHudsonalphaChipSeqRawDataRep2K562Control.fastq.gz
# Not the same AND empty 518 which is K562/Control/1
-rw-rw-r--   1 qateam   protein           0 Oct 17 22:19 SL518.fastq.gz
-rw-rw-r--   1 qateam   protein           0 Oct 17 22:26 SL646.fastq.gz
-rw-rw-r--   1 qateam   protein           0 Oct 17 22:32 SL673.fastq.gz
# Three are empty

### Plus Rami screwed up 774 since 774 and 768 were run simultaneously and loaded the same data.
# So will have to reload 774.

# But first continue with this:
# edit tmp.txt to for resubmit of 2 HepG2 controls
grep -v wgEncodeHudsonalphaChipSeqRawSignalRep.Hepg2Control fileDb.ra > fileDb2.ra
mv fileDb2.ra fileDb.ra
cat tmp.txt >> fileDb.ra
encodeDownloadsPage.pl index.html 

## Deal with evidence that old fastQs for GM12878 and K562 controls are the Pcr2x version
ls *Gm12878Control*.fastq.gz
wgEncodeHudsonalphaChipSeqRawDataRep1Gm12878Control.fastq.gz
wgEncodeHudsonalphaChipSeqRawDataRep2Gm12878Control.fastq.gz

mv wgEncodeHudsonalphaChipSeqRawDataRep1Gm12878Control.fastq.gz wgEncodeHudsonalphaChipSeqRawDataRep1Gm12878ControlPcr2x.fastq.gz
mv wgEncodeHudsonalphaChipSeqRawDataRep2Gm12878Control.fastq.gz wgEncodeHudsonalphaChipSeqRawDataRep2Gm12878ControlPcr2x.fastq.gz
# edit fileDb.ra for this change
encodeDownloadsPage.pl index.html


mv wgEncodeHudsonalphaChipSeqRawDataRep1Gm12878Gabp.fastq.gz      wgEncodeHudsonalphaChipSeqRawDataRep1Gm12878GabpPcr2x.fastq.gz
mv wgEncodeHudsonalphaChipSeqRawDataRep2Gm12878Gabp.fastq.gz      wgEncodeHudsonalphaChipSeqRawDataRep2Gm12878GabpPcr2x.fastq.gz
mv wgEncodeHudsonalphaChipSeqRawDataRep1Gm12878Nrsf.fastq.gz      wgEncodeHudsonalphaChipSeqRawDataRep1Gm12878NrsfPcr2x.fastq.gz
mv wgEncodeHudsonalphaChipSeqRawDataRep2Gm12878Nrsf.fastq.gz      wgEncodeHudsonalphaChipSeqRawDataRep2Gm12878NrsfPcr2x.fastq.gz
mv wgEncodeHudsonalphaChipSeqRawDataRep1Gm12878Pol2.fastq.gz      wgEncodeHudsonalphaChipSeqRawDataRep1Gm12878Pol2Pcr2x.fastq.gz
mv wgEncodeHudsonalphaChipSeqRawDataRep2Gm12878Pol2.fastq.gz      wgEncodeHudsonalphaChipSeqRawDataRep2Gm12878Pol2Pcr2x.fastq.gz
mv wgEncodeHudsonalphaChipSeqRawDataRep1Gm12878Srf.fastq.gz       wgEncodeHudsonalphaChipSeqRawDataRep1Gm12878SrfPcr2x.fastq.gz
mv wgEncodeHudsonalphaChipSeqRawDataRep2Gm12878Srf.fastq.gz       wgEncodeHudsonalphaChipSeqRawDataRep2Gm12878SrfPcr2x.fastq.gz
mv wgEncodeHudsonalphaChipSeqRawDataRep1K562Gabp.fastq.gz         wgEncodeHudsonalphaChipSeqRawDataRep1K562GabpPcr2x.fastq.gz
mv wgEncodeHudsonalphaChipSeqRawDataRep2K562Gabp.fastq.gz         wgEncodeHudsonalphaChipSeqRawDataRep2K562GabpPcr2x.fastq.gz
mv wgEncodeHudsonalphaChipSeqRawDataRep1K562Nrsf.fastq.gz         wgEncodeHudsonalphaChipSeqRawDataRep1K562NrsfPcr2x.fastq.gz
mv wgEncodeHudsonalphaChipSeqRawDataRep2K562Nrsf.fastq.gz         wgEncodeHudsonalphaChipSeqRawDataRep2K562NrsfPcr2x.fastq.gz
mv wgEncodeHudsonalphaChipSeqRawDataRep1K562Pol2.fastq.gz         wgEncodeHudsonalphaChipSeqRawDataRep1K562Pol2Pcr2x.fastq.gz
mv wgEncodeHudsonalphaChipSeqRawDataRep2K562Pol2.fastq.gz         wgEncodeHudsonalphaChipSeqRawDataRep2K562Pol2Pcr2x.fastq.gz
mv wgEncodeHudsonalphaChipSeqRawDataRep1K562Srf.fastq.gz          wgEncodeHudsonalphaChipSeqRawDataRep1K562SrfPcr2x.fastq.gz
mv wgEncodeHudsonalphaChipSeqRawDataRep2K562Srf.fastq.gz          wgEncodeHudsonalphaChipSeqRawDataRep2K562SrfPcr2x.fastq.gz
mv wgEncodeHudsonalphaChipSeqRawDataRep1Gm12878Sin3ak20.fastq.gz  wgEncodeHudsonalphaChipSeqRawDataRep1Gm12878Sin3ak20Pcr2x.fastq.gz
mv wgEncodeHudsonalphaChipSeqRawDataRep2Gm12878Sin3ak20.fastq.gz  wgEncodeHudsonalphaChipSeqRawDataRep2Gm12878Sin3ak20Pcr2x.fastq.gz
mv wgEncodeHudsonalphaChipSeqRawDataRep1K562Sin3ak20.fastq.gz     wgEncodeHudsonalphaChipSeqRawDataRep1K562Sin3ak20Pcr2x.fastq.gz
mv wgEncodeHudsonalphaChipSeqRawDataRep2K562Sin3ak20.fastq.gz     wgEncodeHudsonalphaChipSeqRawDataRep2K562Sin3ak20Pcr2x.fastq.gz
mv wgEncodeHudsonalphaChipSeqRawDataRep2Gm12878Egr1.fastq.gz      wgEncodeHudsonalphaChipSeqRawDataRep2Gm12878Egr1Pcr2x.fastq.gz
mv wgEncodeHudsonalphaChipSeqRawDataRep1K562Egr1.fastq.gz         wgEncodeHudsonalphaChipSeqRawDataRep1K562Egr1Pcr2x.fastq.gz
mv wgEncodeHudsonalphaChipSeqRawDataRep2K562Egr1.fastq.gz         wgEncodeHudsonalphaChipSeqRawDataRep2K562Egr1Pcr2x.fastq.gz
mv wgEncodeHudsonalphaChipSeqRawDataRep1Gm12878Usf1.fastq.gz      wgEncodeHudsonalphaChipSeqRawDataRep1Gm12878Usf1Pcr2x.fastq.gz
mv wgEncodeHudsonalphaChipSeqRawDataRep2Gm12878Usf1.fastq.gz      wgEncodeHudsonalphaChipSeqRawDataRep2Gm12878Usf1Pcr2x.fastq.gz
mv wgEncodeHudsonalphaChipSeqRawDataRep1K562Usf1.fastq.gz         wgEncodeHudsonalphaChipSeqRawDataRep1K562Usf1Pcr2x.fastq.gz
mv wgEncodeHudsonalphaChipSeqRawDataRep2K562Usf1.fastq.gz         wgEncodeHudsonalphaChipSeqRawDataRep2K562Usf1Pcr2x.fastq.gz

grep PCR2x fileDb.ra | grep fastq > fileDb.ra.pcr.fasta 
 grep -v PCR2x fileDb.ra > fileDb.ra.npcr
grep PCR2x fileDb.ra > fileDb.ra.pcr
grep -v fastq fileDb.ra.pcr >> fileDb.ra.npcr 
cat fileDb.ra.pcr2x >> fileDb.ra.npcr 
wl fileDb.ra      147 fileDb.ra
wl fileDb.ra.npcr 147 fileDb.ra.npcr
mv fileDb.ra.npcr fileDb.ra 
rm fileDb.ra.pcr.fasta
rm fileDb.ra.pcr

## After editing the daf/ddf a few times, all the fastq's (except the three empties) finally loaded.
# Also, reload of 774 was successful, so I can be confident that erroroneous  and conflicting 768 simultaneous with correct 774 did not leave a mess.

grep metadata /hive/groups/encode/dcc/pipeline/encpipeline_prod/768/out/fileDb.ra | grep parentTable > tmp.txt
# edit txt.tmp.  Looks fine.
cat tmp.txt >> fileDb.ra
[hgwdev:tdreszer wgEncodeHudsonalphaChipSeq> encodeDownloadsPage.pl index.html

/cluster/data/encode/pipeline/bin/encodeStatus.pl 774 displayed
/cluster/data/encode/pipeline/bin/encodeStatus.pl 776 displayed
/cluster/data/encode/pipeline/bin/encodeStatus.pl 780 displayed
/cluster/data/encode/pipeline/bin/encodeStatus.pl 768 displayed

grep metadata /hive/groups/encode/dcc/pipeline/encpipeline_prod/768/out/fileDb.ra | grep parentTable > tmp.txt
# edit txt.tmp.  Looks fine.

2009-12-01 Catching up with some submissions
============================================
| 419 | HudsonAlpha_HepG2_Jul-09_FASTQ                     | validate failed |  Rami needs to correct these fastq's
| 781 | HudsonAlpha_ChIP-seq_HeLa_GABPa-Nov09              | validate failed |  Rami needs to correct (numerous start and end overruns for chrM, HeLa cell?)
| 782 | HudsonAlpha_ChIP-seq_HeLa_TAFIIp250-Nov09          | validate failed |  Rami needs to correct (numerous start and end overruns for chrM, HeLa cell?)
| 783 | HudsonAlpha_ChIP-seq_GM12878_Bcl11a-Nov09          | loaded          | 
| 795 | HAIB_Chipseq_p300_GM12878-Nov09                    | validate failed | Rami needs to correct (numerous off by 1 tagAlign errors)
| 798 | HudsonAlpha_Chipseq_ZBTB33_GM12878-Nov09           | loaded          | 

Add 783,798 to trackDb.wgEncode.ra ci and make alpha DBS=hg18
cd {gold}/wgEncodeHudsonalphaChipSeq/
cp fileDb.ra fileDb.ra.2009-12-01
grep metadata /hive/groups/encode/dcc/pipeline/encpipeline_prod/783/out/fileDb.ra | grep parentTable > tmp.txt
grep metadata /hive/groups/encode/dcc/pipeline/encpipeline_prod/798/out/fileDb.ra | grep parentTable >> tmp.txt
e tmp.txt
# No changes
cat tmp.txt >> fileDb.ra
encodeDownloadsPage.pl index.html
# all looks well.
/cluster/data/encode/pipeline/bin/encodeStatus.pl 783 displayed
/cluster/data/encode/pipeline/bin/encodeStatus.pl 798 displayed

2009-12-14 A few more loaded in
===============================
# 801,802,803,804,813
# Had to play with prot ant treat subGroups to get this to work.
cp fileDb.ra fileDb.ra.2009-12-14
grep metadata /hive/groups/encode/dcc/pipeline/encpipeline_prod/801/out/fileDb.ra | grep parentTable > tmp.txt
grep metadata /hive/groups/encode/dcc/pipeline/encpipeline_prod/802/out/fileDb.ra | grep parentTable >> tmp.txt
grep metadata /hive/groups/encode/dcc/pipeline/encpipeline_prod/803/out/fileDb.ra | grep parentTable >> tmp.txt
grep metadata /hive/groups/encode/dcc/pipeline/encpipeline_prod/804/out/fileDb.ra | grep parentTable >> tmp.txt
# check tmp.txt
cat tmp.txt >> fileDb.ra
encodeDownloadsPage.pl index.html

/cluster/data/encode/pipeline/bin/encodeStatus.pl 801 displayed
/cluster/data/encode/pipeline/bin/encodeStatus.pl 802 displayed
/cluster/data/encode/pipeline/bin/encodeStatus.pl 803 displayed
/cluster/data/encode/pipeline/bin/encodeStatus.pl 804 displayed

# test doEncodeValidate change for setting up name, subGroups and for validating cv terms 
~/bin/scripts/doEncodeValidate.pl -quick -skipAutoCreation x /cluster/data/encode/pipeline/encpipeline_prod/813
doEncodeValidate.pl -quick -skipAutoCreation x /cluster/data/encode/pipeline/encpipeline_prod/814

2010-01-11 Jan 2010 freeze
==========================
| 781 | HudsonAlpha_ChIP-seq_HeLa_GABPa-Nov09      | loaded |       8 | 
| 782 | HudsonAlpha_ChIP-seq_HeLa_TAFIIp250-Nov09  | loaded |       8 | 
| 795 | HAIB_Chipseq_p300_GM12878-Nov09            | loaded |       8 | 
| 806 | HudsonAlpha_Chipseq_GM12878_Pax5-N19_Dec09 | loaded |       8 | 
| 807 | HudsonAlpha_Chipseq_K562_TAF1_Dec09        | loaded |       8 | 
| 809 | HudsonAlpha_Chipseq_A549_Pol2_Dex_Dec09    | loaded |       8 | 
| 812 | HudsonAlpha_Chipseq_GM12878_Bcl3_Dec09     | loaded |       8 | 
| 813 | HudsonAlpha_ChIPSeq_A549_Pol2_1hEtOH_Dec09 | loaded |       8 | 
| 814 | HudsonAlpha_Chipseq_hESC_NRSF_Dec09        | loaded |       8 | 
| 830 | HudsonAlpha_Chipseq_GM12878_Sp1            | loaded |       8 | 
| 832 | HudsonAlpha_Chipseq_ZBTB33_HepG2           | loaded |       8 | 
| 833 | HudsonAlpha_ChIPSeq_H1-hESC_Taf1           | loaded |       8 | 
| 867 | HAIB_Chipseq_HepG2_FosL2                   | loaded |       8 | 
| 876 | HAIB_Chipseq_HepG2_HEY1_Dec09              | loaded |       8 | 
| 878 | HAIB_Chipseq_HepG2_RXRA_Dec09              | loaded |       8 | 
| 879 | HAIB_Chipseq_H1-hESC_Pol2_Dec09            | loaded |       8 | 
| 899 | HudsonAlpha_Chipseq_A549_CTCF_Jan10        | loaded |       8 | 
| 913 | HudsonAlpha_ChipSeq_USF1_A549_Dex_Jan10    | loaded |       8 | 
| 920 | HudsonAlpha_Chipseq_Pol2-4H8_GM12878_Jan10 | loaded |       8 | 
| 958 | HudsonAlpha_Chipseq_Pol2-4H8_hESC_Jan10    | loaded |       8 | 
| 973 | HudsonAlpha_ChIP-seq_GM12891_SPI1_Jan10    | loaded |       8 | 

# edit all the trackDbs
encodePatchTdb /hive/groups/encode/dcc/pipeline/encpipeline_prod/781/out/trackDb.ra trackDb.wgEncode.ra
encodePatchTdb /hive/groups/encode/dcc/pipeline/encpipeline_prod/782/out/trackDb.ra trackDb.wgEncode.ra
encodePatchTdb /hive/groups/encode/dcc/pipeline/encpipeline_prod/795/out/trackDb.ra trackDb.wgEncode.ra
encodePatchTdb /hive/groups/encode/dcc/pipeline/encpipeline_prod/806/out/trackDb.ra trackDb.wgEncode.ra
encodePatchTdb /hive/groups/encode/dcc/pipeline/encpipeline_prod/807/out/trackDb.ra trackDb.wgEncode.ra
encodePatchTdb /hive/groups/encode/dcc/pipeline/encpipeline_prod/809/out/trackDb.ra trackDb.wgEncode.ra
encodePatchTdb /hive/groups/encode/dcc/pipeline/encpipeline_prod/812/out/trackDb.ra trackDb.wgEncode.ra
encodePatchTdb /hive/groups/encode/dcc/pipeline/encpipeline_prod/813/out/trackDb.ra trackDb.wgEncode.ra
encodePatchTdb /hive/groups/encode/dcc/pipeline/encpipeline_prod/814/out/trackDb.ra trackDb.wgEncode.ra
encodePatchTdb /hive/groups/encode/dcc/pipeline/encpipeline_prod/830/out/trackDb.ra trackDb.wgEncode.ra
encodePatchTdb /hive/groups/encode/dcc/pipeline/encpipeline_prod/832/out/trackDb.ra trackDb.wgEncode.ra
encodePatchTdb /hive/groups/encode/dcc/pipeline/encpipeline_prod/833/out/trackDb.ra trackDb.wgEncode.ra
encodePatchTdb /hive/groups/encode/dcc/pipeline/encpipeline_prod/867/out/trackDb.ra trackDb.wgEncode.ra
encodePatchTdb /hive/groups/encode/dcc/pipeline/encpipeline_prod/876/out/trackDb.ra trackDb.wgEncode.ra
encodePatchTdb /hive/groups/encode/dcc/pipeline/encpipeline_prod/878/out/trackDb.ra trackDb.wgEncode.ra
encodePatchTdb /hive/groups/encode/dcc/pipeline/encpipeline_prod/879/out/trackDb.ra trackDb.wgEncode.ra
encodePatchTdb /hive/groups/encode/dcc/pipeline/encpipeline_prod/899/out/trackDb.ra trackDb.wgEncode.ra
encodePatchTdb /hive/groups/encode/dcc/pipeline/encpipeline_prod/913/out/trackDb.ra trackDb.wgEncode.ra
encodePatchTdb /hive/groups/encode/dcc/pipeline/encpipeline_prod/920/out/trackDb.ra trackDb.wgEncode.ra
encodePatchTdb /hive/groups/encode/dcc/pipeline/encpipeline_prod/958/out/trackDb.ra trackDb.wgEncode.ra
encodePatchTdb /hive/groups/encode/dcc/pipeline/encpipeline_prod/973/out/trackDb.ra trackDb.wgEncode.ra
# examine tracks in my browser
cvs ci
make alpha hg18

cp fileDb.ra fileDb.ra.2010-01-13
grep metadata /hive/groups/encode/dcc/pipeline/encpipeline_prod/781/out/fileDb.ra | grep parentTable > tmp.txt
grep metadata /hive/groups/encode/dcc/pipeline/encpipeline_prod/782/out/fileDb.ra | grep parentTable >> tmp.txt
grep metadata /hive/groups/encode/dcc/pipeline/encpipeline_prod/795/out/fileDb.ra | grep parentTable >> tmp.txt
grep metadata /hive/groups/encode/dcc/pipeline/encpipeline_prod/806/out/fileDb.ra | grep parentTable >> tmp.txt
grep metadata /hive/groups/encode/dcc/pipeline/encpipeline_prod/807/out/fileDb.ra | grep parentTable >> tmp.txt
grep metadata /hive/groups/encode/dcc/pipeline/encpipeline_prod/809/out/fileDb.ra | grep parentTable >> tmp.txt
grep metadata /hive/groups/encode/dcc/pipeline/encpipeline_prod/812/out/fileDb.ra | grep parentTable >> tmp.txt
grep metadata /hive/groups/encode/dcc/pipeline/encpipeline_prod/813/out/fileDb.ra | grep parentTable >> tmp.txt
grep metadata /hive/groups/encode/dcc/pipeline/encpipeline_prod/814/out/fileDb.ra | grep parentTable >> tmp.txt
grep metadata /hive/groups/encode/dcc/pipeline/encpipeline_prod/830/out/fileDb.ra | grep parentTable >> tmp.txt
grep metadata /hive/groups/encode/dcc/pipeline/encpipeline_prod/832/out/fileDb.ra | grep parentTable >> tmp.txt
grep metadata /hive/groups/encode/dcc/pipeline/encpipeline_prod/833/out/fileDb.ra | grep parentTable >> tmp.txt
grep metadata /hive/groups/encode/dcc/pipeline/encpipeline_prod/867/out/fileDb.ra | grep parentTable >> tmp.txt
grep metadata /hive/groups/encode/dcc/pipeline/encpipeline_prod/876/out/fileDb.ra | grep parentTable >> tmp.txt
grep metadata /hive/groups/encode/dcc/pipeline/encpipeline_prod/878/out/fileDb.ra | grep parentTable >> tmp.txt
grep metadata /hive/groups/encode/dcc/pipeline/encpipeline_prod/879/out/fileDb.ra | grep parentTable >> tmp.txt
grep metadata /hive/groups/encode/dcc/pipeline/encpipeline_prod/899/out/fileDb.ra | grep parentTable >> tmp.txt
grep metadata /hive/groups/encode/dcc/pipeline/encpipeline_prod/913/out/fileDb.ra | grep parentTable >> tmp.txt
grep metadata /hive/groups/encode/dcc/pipeline/encpipeline_prod/920/out/fileDb.ra | grep parentTable >> tmp.txt
grep metadata /hive/groups/encode/dcc/pipeline/encpipeline_prod/958/out/fileDb.ra | grep parentTable >> tmp.txt
grep metadata /hive/groups/encode/dcc/pipeline/encpipeline_prod/973/out/fileDb.ra | grep parentTable >> tmp.txt
# check tmp.txt
cat tmp.txt >> fileDb.ra
encodeDownloadsPage.pl index.html

/cluster/data/encode/pipeline/bin/encodeStatus.pl 781 displayed
/cluster/data/encode/pipeline/bin/encodeStatus.pl 782 displayed
/cluster/data/encode/pipeline/bin/encodeStatus.pl 795 displayed
/cluster/data/encode/pipeline/bin/encodeStatus.pl 806 displayed
/cluster/data/encode/pipeline/bin/encodeStatus.pl 807 displayed
/cluster/data/encode/pipeline/bin/encodeStatus.pl 809 displayed
/cluster/data/encode/pipeline/bin/encodeStatus.pl 812 displayed
/cluster/data/encode/pipeline/bin/encodeStatus.pl 813 displayed
/cluster/data/encode/pipeline/bin/encodeStatus.pl 814 displayed
/cluster/data/encode/pipeline/bin/encodeStatus.pl 830 displayed
/cluster/data/encode/pipeline/bin/encodeStatus.pl 832 displayed
/cluster/data/encode/pipeline/bin/encodeStatus.pl 833 displayed
/cluster/data/encode/pipeline/bin/encodeStatus.pl 867 displayed
/cluster/data/encode/pipeline/bin/encodeStatus.pl 876 displayed
/cluster/data/encode/pipeline/bin/encodeStatus.pl 878 displayed
/cluster/data/encode/pipeline/bin/encodeStatus.pl 879 displayed
/cluster/data/encode/pipeline/bin/encodeStatus.pl 899 displayed
/cluster/data/encode/pipeline/bin/encodeStatus.pl 913 displayed
/cluster/data/encode/pipeline/bin/encodeStatus.pl 920 displayed
/cluster/data/encode/pipeline/bin/encodeStatus.pl 958 displayed
/cluster/data/encode/pipeline/bin/encodeStatus.pl 973 displayed

|  901 | HudsonAlpha__Chipseq_A549_USF1_Jan10        | loaded |       8 | 
|  976 | HAIB_Chipseq_pol2-4H8-GM12891               | loaded |       8 | 
|  977 | HudsonAlpha_Chipseq_pol2WG-GM12891_Jan10    | loaded |       8 | 
|  978 | HudsonAlpha_Chipseq_Oct2_GM12891_Jan10      | loaded |       8 | 
|  979 | HudsonAlpha_ChIP-seq_GM12891_TAF1_Jan10     | loaded |       8 | 
|  980 | HudsonAlpha_ChIP-seq_GM12892_Pol2_Jan10     | loaded |       8 | 
|  981 | HudsonAlpha_ChIP-seq_GM12892_Pol2-4H8_Jan10 | loaded |       8 | 
|  994 | HudsonAlpha_ChIP-seq_GM12892_TAF1_Jan10     | loaded |       8 | 
| 1003 | HudsonAlpha_Chipseq_CTCF_A549_EtOH_Jan10    | loaded |       8 | 

# edit the trackDb.ra templates
encodePatchTdb /hive/groups/encode/dcc/pipeline/encpipeline_prod/901/out/trackDb.ra trackDb.wgEncode.ra
encodePatchTdb /hive/groups/encode/dcc/pipeline/encpipeline_prod/976/out/trackDb.ra trackDb.wgEncode.ra
encodePatchTdb /hive/groups/encode/dcc/pipeline/encpipeline_prod/977/out/trackDb.ra trackDb.wgEncode.ra
encodePatchTdb /hive/groups/encode/dcc/pipeline/encpipeline_prod/978/out/trackDb.ra trackDb.wgEncode.ra
encodePatchTdb /hive/groups/encode/dcc/pipeline/encpipeline_prod/979/out/trackDb.ra trackDb.wgEncode.ra
encodePatchTdb /hive/groups/encode/dcc/pipeline/encpipeline_prod/980/out/trackDb.ra trackDb.wgEncode.ra
encodePatchTdb /hive/groups/encode/dcc/pipeline/encpipeline_prod/981/out/trackDb.ra trackDb.wgEncode.ra
encodePatchTdb /hive/groups/encode/dcc/pipeline/encpipeline_prod/994/out/trackDb.ra trackDb.wgEncode.ra
encodePatchTdb /hive/groups/encode/dcc/pipeline/encpipeline_prod/1003/out/trackDb.ra trackDb.wgEncode.ra

# examine tracks in my browser
cvs ci
make alpha hg18
grep metadata /hive/groups/encode/dcc/pipeline/encpipeline_prod/901/out/fileDb.ra | grep parentTable > tmp.txt
grep metadata /hive/groups/encode/dcc/pipeline/encpipeline_prod/976/out/fileDb.ra | grep parentTable >> tmp.txt
grep metadata /hive/groups/encode/dcc/pipeline/encpipeline_prod/977/out/fileDb.ra | grep parentTable >> tmp.txt
grep metadata /hive/groups/encode/dcc/pipeline/encpipeline_prod/978/out/fileDb.ra | grep parentTable >> tmp.txt
grep metadata /hive/groups/encode/dcc/pipeline/encpipeline_prod/979/out/fileDb.ra | grep parentTable >> tmp.txt
grep metadata /hive/groups/encode/dcc/pipeline/encpipeline_prod/980/out/fileDb.ra | grep parentTable >> tmp.txt
grep metadata /hive/groups/encode/dcc/pipeline/encpipeline_prod/981/out/fileDb.ra | grep parentTable >> tmp.txt
grep metadata /hive/groups/encode/dcc/pipeline/encpipeline_prod/994/out/fileDb.ra | grep parentTable >> tmp.txt
grep metadata /hive/groups/encode/dcc/pipeline/encpipeline_prod/1003/out/fileDb.ra | grep parentTable >> tmp.txt
# check tmp.txt
cat tmp.txt >> fileDb.ra
encodeDownloadsPage.pl index.html

/cluster/data/encode/pipeline/bin/encodeStatus.pl 901 displayed
/cluster/data/encode/pipeline/bin/encodeStatus.pl 976 displayed
/cluster/data/encode/pipeline/bin/encodeStatus.pl 977 displayed
/cluster/data/encode/pipeline/bin/encodeStatus.pl 978 displayed
/cluster/data/encode/pipeline/bin/encodeStatus.pl 979 displayed
/cluster/data/encode/pipeline/bin/encodeStatus.pl 980 displayed
/cluster/data/encode/pipeline/bin/encodeStatus.pl 981 displayed
/cluster/data/encode/pipeline/bin/encodeStatus.pl 994 displayed
/cluster/data/encode/pipeline/bin/encodeStatus.pl 1003 displayed

# after the freeze:
select id,name,status,user_id from projects where status = "loaded" and user_id = 8 order by id;
+------+---------------------------------------+--------+---------+
| id   | name                                  | status | user_id |
+------+---------------------------------------+--------+---------+
|  880 | HAIB FASTQ_Submissions_Dec09          | loaded |       8 | 
| 1028 | HudsonAlpha_Chipseq_Jurkat_Pol2_Jan10 | loaded |       8 | 
| 1060 | HudsonAlpha_Chipseq_Dec1_HepG2_Jan10  | loaded |       8 | 
+------+---------------------------------------+--------+---------+
3 rows in set (0.00 sec)

### Melissa is taking the lead here.

# Melissa marked as displayed, but not yet!
/cluster/data/encode/pipeline/bin/encodeStatus.pl 1060 loaded
/cluster/data/encode/pipeline/bin/encodeStatus.pl 1060 displayed

### One fastq does not match any experiments currently on site!
    metadata project=wgEncode grant=Myers lab=HudsonAlpha dataType=ChipSeq cell=GM12878 antibody=POU2F2 protocol=PCR1x treatment=None view=RawData replicate=2 labVersion=SL648 dataVersion="ENCODE Jan 2010 Freeze" subId=880 dateSubmitted=2010-01-15 dateUnrestricted=2010-10-15 composite=wgEncodeHudsonalphaChipSeq parentTable=wgEncodeHudsonalphaChipSeqRawSignalRep2Gm12878Pou2f2Pcr1x fileName=wgEncodeHudsonalphaChipSeqRawDataRep2Gm12878Pou2f2Pcr1x.fastq.gz

grep metadata /hive/groups/encode/dcc/pipeline/encpipeline_prod/1060/out/fileDb.ra | grep parentTable >> fileDb.ra
grep metadata /hive/groups/encode/dcc/pipeline/encpipeline_prod/1028/out/fileDb.ra | grep parentTable >> fileDb.ra

### In downloads dir but missing metadata:
### A549Pol2 Misnamed files
2010-09-10	wgEncodeHudsonalphaChipSeqAlignmentsRep1A549Pol2Pcr2xPol2.tagAlign.gz	  	248M	  2009-12-10  	type=tagAlign
2010-09-10	wgEncodeHudsonalphaChipSeqAlignmentsRep2A549Pol2Pcr2xPol2.tagAlign.gz	  	264M	  2009-12-10  	type=tagAlign
2010-09-10	wgEncodeHudsonalphaChipSeqPeaksRep1A549Pol2Pcr2xPol2.broadPeak.gz	  		442K	  2009-12-10  	type=broadPeak
2010-09-10	wgEncodeHudsonalphaChipSeqPeaksRep2A549Pol2Pcr2xPol2.broadPeak.gz	  		589K	  2009-12-10  	type=broadPeak
mv wgEncodeHudsonalphaChipSeqAlignmentsRep1A549Pol2Pcr2xPol2.tagAlign.gz wgEncodeHudsonalphaChipSeqAlignmentsRep1A549Pol2Pcr2x.tagAlign.gz
mv wgEncodeHudsonalphaChipSeqAlignmentsRep2A549Pol2Pcr2xPol2.tagAlign.gz wgEncodeHudsonalphaChipSeqAlignmentsRep2A549Pol2Pcr2x.tagAlign.gz
mv wgEncodeHudsonalphaChipSeqPeaksRep1A549Pol2Pcr2xPol2.broadPeak.gz wgEncodeHudsonalphaChipSeqPeaksRep1A549Pol2Pcr2x.broadPeak.gz
mv wgEncodeHudsonalphaChipSeqPeaksRep2A549Pol2Pcr2xPol2.broadPeak.gz wgEncodeHudsonalphaChipSeqPeaksRep2A549Pol2Pcr2x.broadPeak.gz

# GM12878 Sp1 Duplicate submission, remove older files
2010-09-16	wgEncodeHudsonalphaChipSeqAlignmentsRep1Gm12878Sp1Pcr1xSp1.tagAlign.gz	  	596M	  2009-12-16  	type=tagAlign
2010-09-16	wgEncodeHudsonalphaChipSeqAlignmentsRep2Gm12878Sp1Pcr1xSp1.tagAlign.gz	  	354M	  2009-12-16  	type=tagAlign
2010-09-16	wgEncodeHudsonalphaChipSeqPeaksRep1Gm12878Sp1Pcr1xSp1.broadPeak.gz	  		313K	  2009-12-16  	type=broadPeak
2010-09-16	wgEncodeHudsonalphaChipSeqPeaksRep2Gm12878Sp1Pcr1xSp1.broadPeak.gz	  		358K	  2009-12-16  	type=broadPeak
-rw-rw-r-- 2 qateam protein  624092588 Dec 18 12:19 wgEncodeHudsonalphaChipSeqAlignmentsRep1Gm12878Sp1Pcr1x.tagAlign.gz
-rw-rw-r-- 2 qateam protein  624092588 Dec 16 23:37 wgEncodeHudsonalphaChipSeqAlignmentsRep1Gm12878Sp1Pcr1xSp1.tagAlign.gz
-rw-rw-r-- 2 qateam protein  370328567 Dec 18 12:27 wgEncodeHudsonalphaChipSeqAlignmentsRep2Gm12878Sp1Pcr1x.tagAlign.gz
-rw-rw-r-- 2 qateam protein  370328567 Dec 16 23:44 wgEncodeHudsonalphaChipSeqAlignmentsRep2Gm12878Sp1Pcr1xSp1.tagAlign.gz
-rw-rw-r-- 2 qateam protein     320330 Dec 18 12:08 wgEncodeHudsonalphaChipSeqPeaksRep1Gm12878Sp1Pcr1x.broadPeak.gz
-rw-rw-r-- 2 qateam protein     320330 Dec 16 23:49 wgEncodeHudsonalphaChipSeqPeaksRep1Gm12878Sp1Pcr1xSp1.broadPeak.gz
-rw-rw-r-- 2 qateam protein     366122 Dec 18 12:19 wgEncodeHudsonalphaChipSeqPeaksRep2Gm12878Sp1Pcr1x.broadPeak.gz
-rw-rw-r-- 2 qateam protein     366122 Dec 16 23:40 wgEncodeHudsonalphaChipSeqPeaksRep2Gm12878Sp1Pcr1xSp1.broadPeak.gz
rm wgEncodeHudsonalphaChipSeqAlignmentsRep1Gm12878Sp1Pcr1xSp1.tagAlign.gz
rm wgEncodeHudsonalphaChipSeqAlignmentsRep2Gm12878Sp1Pcr1xSp1.tagAlign.gz
rm wgEncodeHudsonalphaChipSeqPeaksRep1Gm12878Sp1Pcr1xSp1.broadPeak.gz
rm wgEncodeHudsonalphaChipSeqPeaksRep2Gm12878Sp1Pcr1xSp1.broadPeak.gz

# H1-hESC/TAF1 Duplicate submission, remove older files
2010-09-18	wgEncodeHudsonalphaChipSeqAlignmentsRep1H1hescTaf1Pcr1xTaf1.tagAlign.gz	  	301M	  2009-12-18  	type=tagAlign
2010-09-18	wgEncodeHudsonalphaChipSeqAlignmentsRep2H1hescTaf1Pcr1xTaf1.tagAlign.gz	  	281M	  2009-12-18  	type=tagAlign
2010-09-18	wgEncodeHudsonalphaChipSeqPeaksRep1H1hescTaf1Pcr1xTaf1.broadPeak.gz	  		335K	  2009-12-18  	type=broadPeak
2010-09-18	wgEncodeHudsonalphaChipSeqPeaksRep2H1hescTaf1Pcr1xTaf1.broadPeak.gz	  		296K	  2009-12-18  	type=broadPeak
-rw-rw-r-- 2 qateam protein 315011830 Dec 18 15:27 wgEncodeHudsonalphaChipSeqAlignmentsRep1H1hescTaf1Pcr1x.tagAlign.gz
-rw-rw-r-- 2 qateam protein 315011830 Dec 18 13:49 wgEncodeHudsonalphaChipSeqAlignmentsRep1H1hescTaf1Pcr1xTaf1.tagAlign.gz
-rw-rw-r-- 2 qateam protein 294440048 Dec 18 15:19 wgEncodeHudsonalphaChipSeqAlignmentsRep2H1hescTaf1Pcr1x.tagAlign.gz
-rw-rw-r-- 2 qateam protein 294440048 Dec 18 14:01 wgEncodeHudsonalphaChipSeqAlignmentsRep2H1hescTaf1Pcr1xTaf1.tagAlign.gz
-rw-rw-r-- 2 qateam protein    342186 Dec 18 15:16 wgEncodeHudsonalphaChipSeqPeaksRep1H1hescTaf1Pcr1x.broadPeak.gz
-rw-rw-r-- 2 qateam protein    342186 Dec 18 13:54 wgEncodeHudsonalphaChipSeqPeaksRep1H1hescTaf1Pcr1xTaf1.broadPeak.gz
-rw-rw-r-- 2 qateam protein    302834 Dec 18 15:16 wgEncodeHudsonalphaChipSeqPeaksRep2H1hescTaf1Pcr1x.broadPeak.gz
-rw-rw-r-- 2 qateam protein    302834 Dec 18 13:54 wgEncodeHudsonalphaChipSeqPeaksRep2H1hescTaf1Pcr1xTaf1.broadPeak.gz
rm wgEncodeHudsonalphaChipSeqAlignmentsRep1H1hescTaf1Pcr1xTaf1.tagAlign.gz
rm wgEncodeHudsonalphaChipSeqAlignmentsRep2H1hescTaf1Pcr1xTaf1.tagAlign.gz
rm wgEncodeHudsonalphaChipSeqPeaksRep1H1hescTaf1Pcr1xTaf1.broadPeak.gz
rm wgEncodeHudsonalphaChipSeqPeaksRep2H1hescTaf1Pcr1xTaf1.broadPeak.gz

# HepG2/ZBTB33 Duplicate submission, remove older files
2010-09-16	wgEncodeHudsonalphaChipSeqAlignmentsRep1Hepg2Zbtb33Pcr1xZbtb33.tagAlign.gz	314M	  2009-12-16  	type=tagAlign
2010-09-16	wgEncodeHudsonalphaChipSeqAlignmentsRep2Hepg2Zbtb33Pcr1xZbtb33.tagAlign.gz  369M	  2009-12-16  	type=tagAlign
2010-09-16	wgEncodeHudsonalphaChipSeqPeaksRep1Hepg2Zbtb33Pcr1xZbtb33.broadPeak.gz	 	 25K	  2009-12-16  	type=broadPeak
2010-09-16	wgEncodeHudsonalphaChipSeqPeaksRep2Hepg2Zbtb33Pcr1xZbtb33.broadPeak.gz	 	 22K	  2009-12-16  	type=broadPeak
-rw-rw-r-- 2 qateam protein  328481915 Dec 18 10:50 wgEncodeHudsonalphaChipSeqAlignmentsRep1Hepg2Zbtb33Pcr1x.tagAlign.gz
-rw-rw-r-- 2 qateam protein  328481915 Dec 16 21:11 wgEncodeHudsonalphaChipSeqAlignmentsRep1Hepg2Zbtb33Pcr1xZbtb33.tagAlign.gz
-rw-rw-r-- 2 qateam protein  386066263 Dec 18 10:47 wgEncodeHudsonalphaChipSeqAlignmentsRep2Hepg2Zbtb33Pcr1x.tagAlign.gz
-rw-rw-r-- 2 qateam protein  386066263 Dec 16 21:14 wgEncodeHudsonalphaChipSeqAlignmentsRep2Hepg2Zbtb33Pcr1xZbtb33.tagAlign.gz
-rw-rw-r-- 2 qateam protein      25389 Dec 18 10:50 wgEncodeHudsonalphaChipSeqPeaksRep1Hepg2Zbtb33Pcr1x.broadPeak.gz
-rw-rw-r-- 2 qateam protein      25389 Dec 16 21:04 wgEncodeHudsonalphaChipSeqPeaksRep1Hepg2Zbtb33Pcr1xZbtb33.broadPeak.gz
-rw-rw-r-- 2 qateam protein      22128 Dec 18 10:43 wgEncodeHudsonalphaChipSeqPeaksRep2Hepg2Zbtb33Pcr1x.broadPeak.gz
-rw-rw-r-- 2 qateam protein      22128 Dec 16 21:04 wgEncodeHudsonalphaChipSeqPeaksRep2Hepg2Zbtb33Pcr1xZbtb33.broadPeak.gz
rm wgEncodeHudsonalphaChipSeqAlignmentsRep1Hepg2Zbtb33Pcr1xZbtb33.tagAlign.gz
rm wgEncodeHudsonalphaChipSeqAlignmentsRep2Hepg2Zbtb33Pcr1xZbtb33.tagAlign.gz
rm wgEncodeHudsonalphaChipSeqPeaksRep1Hepg2Zbtb33Pcr1xZbtb33.broadPeak.gz
rm wgEncodeHudsonalphaChipSeqPeaksRep2Hepg2Zbtb33Pcr1xZbtb33.broadPeak.gz

### A549Pol2 Duplicate submission, remove older files
  2010-09-10	wgEncodeHudsonalphaChipSeqAlignmentsRep1A549Pol2Pcr2x.tagAlign.gz	  248M	  2009-12-10  	type=tagAlign
  2010-09-10	wgEncodeHudsonalphaChipSeqAlignmentsRep2A549Pol2Pcr2x.tagAlign.gz	  264M	  2009-12-10  	type=tagAlign
  2010-09-10	wgEncodeHudsonalphaChipSeqPeaksRep1A549Pol2Pcr2x.broadPeak.gz	  442K	  2009-12-10  	type=broadPeak
  2010-09-10	wgEncodeHudsonalphaChipSeqPeaksRep2A549Pol2Pcr2x.broadPeak.gz	  589K	  2009-12-10  	type=broadPeak
-rw-rw-r-- 2 qateam protein 259073963 Dec 10 19:30 wgEncodeHudsonalphaChipSeqAlignmentsRep1A549Pol2Pcr2x.tagAlign.gz
-rw-rw-r-- 2 qateam protein 259073963 Dec 15 12:41 wgEncodeHudsonalphaChipSeqAlignmentsRep1A549Pol2Pcr2xEtoh02.tagAlign.gz
-rw-rw-r-- 2 qateam protein 276381814 Dec 10 19:33 wgEncodeHudsonalphaChipSeqAlignmentsRep2A549Pol2Pcr2x.tagAlign.gz
-rw-rw-r-- 2 qateam protein 276381814 Dec 15 12:37 wgEncodeHudsonalphaChipSeqAlignmentsRep2A549Pol2Pcr2xEtoh02.tagAlign.gz
-rw-rw-r-- 2 qateam protein    451785 Dec 10 19:35 wgEncodeHudsonalphaChipSeqPeaksRep1A549Pol2Pcr2x.broadPeak.gz
-rw-rw-r-- 2 qateam protein    451785 Dec 15 12:38 wgEncodeHudsonalphaChipSeqPeaksRep1A549Pol2Pcr2xEtoh02.broadPeak.gz
-rw-rw-r-- 2 qateam protein    602710 Dec 10 19:35 wgEncodeHudsonalphaChipSeqPeaksRep2A549Pol2Pcr2x.broadPeak.gz
-rw-rw-r-- 2 qateam protein    602710 Dec 15 12:45 wgEncodeHudsonalphaChipSeqPeaksRep2A549Pol2Pcr2xEtoh02.broadPeak.gz
rm wgEncodeHudsonalphaChipSeqAlignmentsRep1A549Pol2Pcr2x.tagAlign.gz
rm wgEncodeHudsonalphaChipSeqAlignmentsRep2A549Pol2Pcr2x.tagAlign.gz
rm wgEncodeHudsonalphaChipSeqPeaksRep1A549Pol2Pcr2x.broadPeak.gz
rm wgEncodeHudsonalphaChipSeqPeaksRep2A549Pol2Pcr2x.broadPeak.gz

### A549Gr mess:
2010-09-02	wgEncodeHudsonalphaChipSeqAlignmentsRep1A549Gr.tagAlign.gz	  			  	372M	  2009-12-02  	type=tagAlign
2010-09-02	wgEncodeHudsonalphaChipSeqAlignmentsRep2A549Gr.tagAlign.gz	  				280M	  2009-12-02  	type=tagAlign
2010-09-02	wgEncodeHudsonalphaChipSeqPeaksRep1A549Gr.broadPeak.gz	  					 18K	  2009-12-02  	type=broadPeak
2010-09-02	wgEncodeHudsonalphaChipSeqPeaksRep2A549Gr.broadPeak.gz	  					9.9K	  2009-12-02  	type=broadPeak
# two tables and 6 files:
| wgEncodeHudsonalphaChipSeqPeaksA549Gr              | 
| wgEncodeHudsonalphaChipSeqRawSignalA549Gr          | 
-rw-rw-r-- 2 qateam protein 505760278 Nov 19 18:24 wgEncodeHudsonalphaChipSeqAlignmentsA549Gr.tagAlign.gz
-rw-rw-r-- 2 qateam protein 389122231 Dec  2 12:45 wgEncodeHudsonalphaChipSeqAlignmentsRep1A549Gr.tagAlign.gz
-rw-rw-r-- 2 qateam protein 292935687 Dec  2 12:35 wgEncodeHudsonalphaChipSeqAlignmentsRep2A549Gr.tagAlign.gz
-rw-rw-r-- 2 qateam protein    329720 Nov 19 18:33 wgEncodeHudsonalphaChipSeqPeaksA549Gr.broadPeak.gz
-rw-rw-r-- 2 qateam protein     18309 Dec  2 12:38 wgEncodeHudsonalphaChipSeqPeaksRep1A549Gr.broadPeak.gz
-rw-rw-r-- 2 qateam protein     10064 Dec  2 12:42 wgEncodeHudsonalphaChipSeqPeaksRep2A549Gr.broadPeak.gz
The rep1 and rep2 were submitted more recently.  But were they a mistake that were resubmitted with a treatment?
-rw-rw-r-- 2 qateam protein  389122231 Dec  2 12:45 wgEncodeHudsonalphaChipSeqAlignmentsRep1A549Gr.tagAlign.gz
-rw-rw-r-- 2 qateam protein  389122231 Dec  9 13:49 wgEncodeHudsonalphaChipSeqAlignmentsRep1A549GrPcr1xDex500pm.tagAlign.gz
-rw-rw-r-- 2 qateam protein  292935687 Dec  2 12:35 wgEncodeHudsonalphaChipSeqAlignmentsRep2A549Gr.tagAlign.gz
-rw-rw-r-- 2 qateam protein  292935687 Dec  9 13:42 wgEncodeHudsonalphaChipSeqAlignmentsRep2A549GrPcr1xDex500pm.tagAlign.gz
-rw-rw-r-- 2 qateam protein      18309 Dec  2 12:38 wgEncodeHudsonalphaChipSeqPeaksRep1A549Gr.broadPeak.gz
-rw-rw-r-- 2 qateam protein      18309 Dec  9 13:42 wgEncodeHudsonalphaChipSeqPeaksRep1A549GrPcr1xDex500pm.broadPeak.gz
-rw-rw-r-- 2 qateam protein      10064 Dec  2 12:42 wgEncodeHudsonalphaChipSeqPeaksRep2A549Gr.broadPeak.gz
-rw-rw-r-- 2 qateam protein      10064 Dec  9 13:49 wgEncodeHudsonalphaChipSeqPeaksRep2A549GrPcr1xDex500pm.broadPeak.gz
# Duplicates!!!
rm wgEncodeHudsonalphaChipSeqAlignmentsRep1A549Gr.tagAlign.gz
rm wgEncodeHudsonalphaChipSeqAlignmentsRep2A549Gr.tagAlign.gz
rm wgEncodeHudsonalphaChipSeqPeaksRep1A549Gr.broadPeak.gz
rm wgEncodeHudsonalphaChipSeqPeaksRep2A549Gr.broadPeak.gz

### Problems with A549 Control
2010-09-10	wgEncodeHudsonalphaChipSeqAlignmentsRep2A549ControlPcr2xControl.tagAlign.gz	217M	  2009-12-10  	type=tagAlign
# 4 tables, 5 files
| wgEncodeHudsonalphaChipSeqRawSignalA549Control                | 
| wgEncodeHudsonalphaChipSeqRawSignalRep1A549ControlPcr1xDexa   | 
| wgEncodeHudsonalphaChipSeqRawSignalRep1A549ControlPcr1xEtoh02 | 
| wgEncodeHudsonalphaChipSeqRawSignalRep2A549ControlPcr2xEtoh02 | 
-rw-rw-r-- 2 qateam protein 542465567 Nov 19 18:29 wgEncodeHudsonalphaChipSeqAlignmentsA549Control.tagAlign.gz
-rw-rw-r-- 2 qateam protein 308638987 Jan  6 17:48 wgEncodeHudsonalphaChipSeqAlignmentsRep1A549ControlPcr1xDexa.tagAlign.gz
-rw-rw-r-- 2 qateam protein 214030331 Jan 12 15:06 wgEncodeHudsonalphaChipSeqAlignmentsRep1A549ControlPcr1xEtoh02.tagAlign.gz
-rw-rw-r-- 2 qateam protein 227337165 Dec 10 19:37 wgEncodeHudsonalphaChipSeqAlignmentsRep2A549ControlPcr2xControl.tagAlign.gz
-rw-rw-r-- 2 qateam protein 227337165 Dec 15 12:47 wgEncodeHudsonalphaChipSeqAlignmentsRep2A549ControlPcr2xEtoh02.tagAlign.gz
### Looks like Dec submission was meant to be Rep2A549Control or RepA549ControlPcr2x, but no table in either case!
-rw-rw-r-- 2 qateam protein 227337165 Dec 10 19:37 wgEncodeHudsonalphaChipSeqAlignmentsRep2A549ControlPcr2xControl.tagAlign.gz
-rw-rw-r-- 2 qateam protein 227337165 Dec 15 12:47 wgEncodeHudsonalphaChipSeqAlignmentsRep2A549ControlPcr2xEtoh02.tagAlign.gz
### Duplicate!
rm wgEncodeHudsonalphaChipSeqAlignmentsRep2A549ControlPcr2xControl.tagAlign.gz

encodeDownloadsPage.pl index.html .

### STILL in downloads dir but missing metadata:

### GM12878/POU2F2 awaiting word from HA: fastq submitted but no corresponding high level data
2010-07-23	wgEncodeHudsonalphaChipSeqRawDataRep2Gm12878Pou2f2Pcr1x.fastq.gz	  		1.1G	  2009-10-23  	type=fastq
### ### Not yet resolved! 

### go ahead and mark as displayed even though that one file is not yet resolved!
/cluster/data/encode/pipeline/bin/encodeStatus.pl 880 displayed

# At the freeze:
select id,name,status,user_id,created_at from projects where status = "displayed" and user_id = 8 and created_at > date('2009-11-01') order by name;
+------+---------------------------------------------+-----------+---------+---------------------+
| id   | name                                        | status    | user_id | created_at          |
+------+---------------------------------------------+-----------+---------+---------------------+
|  880 | HAIB FASTQ_Submissions_Dec09                | displayed |       8 | 2009-12-26 18:09:38 | 
|  768 | HAIBChIPseq_RawData_Oct09                   | displayed |       8 | 2009-11-05 14:04:35 | 
|  879 | HAIB_Chipseq_H1-hESC_Pol2_Dec09             | displayed |       8 | 2009-12-24 12:14:31 | 
|  867 | HAIB_Chipseq_HepG2_FosL2                    | displayed |       8 | 2009-12-22 12:54:34 | 
|  876 | HAIB_Chipseq_HepG2_HEY1_Dec09               | displayed |       8 | 2009-12-23 15:13:11 | 
|  878 | HAIB_Chipseq_HepG2_RXRA_Dec09               | displayed |       8 | 2009-12-24 12:13:45 | 
|  795 | HAIB_Chipseq_p300_GM12878-Nov09             | displayed |       8 | 2009-11-25 12:52:24 | 
|  976 | HAIB_Chipseq_pol2-4H8-GM12891               | displayed |       8 | 2010-01-11 11:59:03 | 
|  783 | HudsonAlpha_ChIP-seq_GM12878_Bcl11a-Nov09   | displayed |       8 | 2009-11-16 22:09:28 | 
|  973 | HudsonAlpha_ChIP-seq_GM12891_SPI1_Jan10     | displayed |       8 | 2010-01-10 18:09:47 | 
|  979 | HudsonAlpha_ChIP-seq_GM12891_TAF1_Jan10     | displayed |       8 | 2010-01-11 14:46:00 | 
|  981 | HudsonAlpha_ChIP-seq_GM12892_Pol2-4H8_Jan10 | displayed |       8 | 2010-01-11 15:11:28 | 
|  980 | HudsonAlpha_ChIP-seq_GM12892_Pol2_Jan10     | displayed |       8 | 2010-01-11 14:46:41 | 
|  994 | HudsonAlpha_ChIP-seq_GM12892_TAF1_Jan10     | displayed |       8 | 2010-01-11 17:11:54 | 
|  781 | HudsonAlpha_ChIP-seq_HeLa_GABPa-Nov09       | displayed |       8 | 2009-11-16 20:08:25 | 
|  782 | HudsonAlpha_ChIP-seq_HeLa_TAFIIp250-Nov09   | displayed |       8 | 2009-11-16 20:32:17 | 
|  776 | HudsonAlpha_ChIP-seq_HepG2_GABPa-Nov09      | displayed |       8 | 2009-11-13 10:15:42 | 
|  780 | HudsonAlpha_ChIP-seq_HepG2_TAF250-Nov09     | displayed |       8 | 2009-11-16 19:35:43 | 
|  899 | HudsonAlpha_Chipseq_A549_CTCF_Jan10         | displayed |       8 | 2010-01-06 11:53:06 | 
|  803 | HudsonAlpha_Chipseq_A549_GR_500pMDex_Dec09  | displayed |       8 | 2009-12-02 11:13:44 | 
|  802 | HudsonAlpha_Chipseq_A549_GR_50nMDex_Dec09   | displayed |       8 | 2009-12-02 10:43:37 | 
|  801 | Hudsonalpha_Chipseq_A549_GR_5nMDex_09Dec    | displayed |       8 | 2009-12-02 07:19:56 | 
|  813 | HudsonAlpha_ChIPSeq_A549_Pol2_1hEtOH_Dec09  | displayed |       8 | 2009-12-10 16:15:29 | 
|  809 | HudsonAlpha_Chipseq_A549_Pol2_Dex_Dec09     | displayed |       8 | 2009-12-07 14:08:57 | 
| 1003 | HudsonAlpha_Chipseq_CTCF_A549_EtOH_Jan10    | displayed |       8 | 2010-01-12 14:49:38 | 
| 1060 | HudsonAlpha_Chipseq_Dec1_HepG2_Jan10        | displayed |       8 | 2010-01-14 19:53:42 | 
|  812 | HudsonAlpha_Chipseq_GM12878_Bcl3_Dec09      | displayed |       8 | 2009-12-10 09:49:04 | 
|  806 | HudsonAlpha_Chipseq_GM12878_Pax5-N19_Dec09  | displayed |       8 | 2009-12-04 09:16:57 | 
|  804 | HudsonAlpha_Chipseq_GM12878_Pax5_c20_Dec09  | displayed |       8 | 2009-12-02 12:04:43 | 
|  830 | HudsonAlpha_Chipseq_GM12878_Sp1             | displayed |       8 | 2009-12-16 14:14:20 | 
|  833 | HudsonAlpha_ChIPSeq_H1-hESC_Taf1            | displayed |       8 | 2009-12-16 19:02:20 | 
|  814 | HudsonAlpha_Chipseq_hESC_NRSF_Dec09         | displayed |       8 | 2009-12-15 11:09:32 | 
| 1028 | HudsonAlpha_Chipseq_Jurkat_Pol2_Jan10       | displayed |       8 | 2010-01-13 08:35:53 | 
|  807 | HudsonAlpha_Chipseq_K562_TAF1_Dec09         | displayed |       8 | 2009-12-04 11:23:23 | 
|  978 | HudsonAlpha_Chipseq_Oct2_GM12891_Jan10      | displayed |       8 | 2010-01-11 13:49:51 | 
|  920 | HudsonAlpha_Chipseq_Pol2-4H8_GM12878_Jan10  | displayed |       8 | 2010-01-07 20:08:24 | 
|  958 | HudsonAlpha_Chipseq_Pol2-4H8_hESC_Jan10     | displayed |       8 | 2010-01-09 12:52:19 | 
|  977 | HudsonAlpha_Chipseq_pol2WG-GM12891_Jan10    | displayed |       8 | 2010-01-11 12:42:59 | 
|  913 | HudsonAlpha_ChipSeq_USF1_A549_Dex_Jan10     | displayed |       8 | 2010-01-07 16:17:53 | 
|  798 | HudsonAlpha_Chipseq_ZBTB33_GM12878-Nov09    | displayed |       8 | 2009-11-30 10:12:58 | 
|  832 | HudsonAlpha_Chipseq_ZBTB33_HepG2            | displayed |       8 | 2009-12-16 15:17:46 | 
|  774 | HudsonAlpha_GR_ChIP-seq                     | displayed |       8 | 2009-11-10 10:56:22 | 
|  901 | HudsonAlpha__Chipseq_A549_USF1_Jan10        | displayed |       8 | 2010-01-06 12:58:14 | 
+------+---------------------------------------------+-----------+---------+---------------------+
43 rows (removed methyl and RNAseqs)

### Problem with GM12878/POU2F2  Turns out Oct2 is actually POU2F2
Edit trackDb.wgEncode.ra OCT >> POU2F2; Oct-2 POU2F2; treatment=None removed
make alpha DBS-hg18
Edit donwloads dir fileDb.ra;  Oct-2 POU2F2; add 1 missing fastq and set dates to match; treatment=None removed
encodeDownlaodsPage.pl index.html .

### Post call problems:
Do something about light grey bed items (low score) gray scale range: Done
Add treatment into longLabels: Done
Solicited default wiggle settings.

/cluster/data/encode/pipeline/bin/encodeStatus.pl  259 approved
/cluster/data/encode/pipeline/bin/encodeStatus.pl  260 approved
/cluster/data/encode/pipeline/bin/encodeStatus.pl  261 approved
/cluster/data/encode/pipeline/bin/encodeStatus.pl  262 approved
/cluster/data/encode/pipeline/bin/encodeStatus.pl  268 approved
/cluster/data/encode/pipeline/bin/encodeStatus.pl  422 approved
/cluster/data/encode/pipeline/bin/encodeStatus.pl  432 approved
/cluster/data/encode/pipeline/bin/encodeStatus.pl  433 approved
/cluster/data/encode/pipeline/bin/encodeStatus.pl  434 approved
/cluster/data/encode/pipeline/bin/encodeStatus.pl  435 approved
/cluster/data/encode/pipeline/bin/encodeStatus.pl  436 approved
/cluster/data/encode/pipeline/bin/encodeStatus.pl  437 approved
/cluster/data/encode/pipeline/bin/encodeStatus.pl  438 approved
/cluster/data/encode/pipeline/bin/encodeStatus.pl  741 approved
/cluster/data/encode/pipeline/bin/encodeStatus.pl  756 approved
/cluster/data/encode/pipeline/bin/encodeStatus.pl  759 approved
/cluster/data/encode/pipeline/bin/encodeStatus.pl  768 approved
/cluster/data/encode/pipeline/bin/encodeStatus.pl  774 approved
/cluster/data/encode/pipeline/bin/encodeStatus.pl  776 approved
/cluster/data/encode/pipeline/bin/encodeStatus.pl  780 approved
/cluster/data/encode/pipeline/bin/encodeStatus.pl  781 approved
/cluster/data/encode/pipeline/bin/encodeStatus.pl  782 approved
/cluster/data/encode/pipeline/bin/encodeStatus.pl  783 approved
/cluster/data/encode/pipeline/bin/encodeStatus.pl  795 approved
/cluster/data/encode/pipeline/bin/encodeStatus.pl  798 approved
/cluster/data/encode/pipeline/bin/encodeStatus.pl  801 approved
/cluster/data/encode/pipeline/bin/encodeStatus.pl  802 approved
/cluster/data/encode/pipeline/bin/encodeStatus.pl  803 approved
/cluster/data/encode/pipeline/bin/encodeStatus.pl  804 approved
/cluster/data/encode/pipeline/bin/encodeStatus.pl  806 approved
/cluster/data/encode/pipeline/bin/encodeStatus.pl  807 approved
/cluster/data/encode/pipeline/bin/encodeStatus.pl  809 approved
/cluster/data/encode/pipeline/bin/encodeStatus.pl  812 approved
/cluster/data/encode/pipeline/bin/encodeStatus.pl  813 approved
/cluster/data/encode/pipeline/bin/encodeStatus.pl  814 approved
/cluster/data/encode/pipeline/bin/encodeStatus.pl  830 approved
/cluster/data/encode/pipeline/bin/encodeStatus.pl  832 approved
/cluster/data/encode/pipeline/bin/encodeStatus.pl  833 approved
/cluster/data/encode/pipeline/bin/encodeStatus.pl  867 approved
/cluster/data/encode/pipeline/bin/encodeStatus.pl  876 approved
/cluster/data/encode/pipeline/bin/encodeStatus.pl  878 approved
/cluster/data/encode/pipeline/bin/encodeStatus.pl  879 approved
/cluster/data/encode/pipeline/bin/encodeStatus.pl  880 approved
/cluster/data/encode/pipeline/bin/encodeStatus.pl  899 approved
/cluster/data/encode/pipeline/bin/encodeStatus.pl  901 approved
/cluster/data/encode/pipeline/bin/encodeStatus.pl  913 approved
/cluster/data/encode/pipeline/bin/encodeStatus.pl  920 approved
/cluster/data/encode/pipeline/bin/encodeStatus.pl  958 approved
/cluster/data/encode/pipeline/bin/encodeStatus.pl  973 approved
/cluster/data/encode/pipeline/bin/encodeStatus.pl  976 approved
/cluster/data/encode/pipeline/bin/encodeStatus.pl  977 approved
/cluster/data/encode/pipeline/bin/encodeStatus.pl  978 approved
/cluster/data/encode/pipeline/bin/encodeStatus.pl  979 approved
/cluster/data/encode/pipeline/bin/encodeStatus.pl  980 approved
/cluster/data/encode/pipeline/bin/encodeStatus.pl  981 approved
/cluster/data/encode/pipeline/bin/encodeStatus.pl  994 approved
/cluster/data/encode/pipeline/bin/encodeStatus.pl 1003 approved
/cluster/data/encode/pipeline/bin/encodeStatus.pl 1028 approved
/cluster/data/encode/pipeline/bin/encodeStatus.pl 1060 approved


2010-02-22 Prepare release2 for pushQ
=====================================
cd {downloadsDir}/release2
ln ../*.gz .
mkdir mystery
mv S*.gz myystery
ls mystery/
SL1051.fastq.gz  SL1206.fastq.gz  SL611.fastq.gz  SL736.fastq.gz  SL911.fastq.gz
SL1059.fastq.gz  SL1207.fastq.gz  SL629.fastq.gz  SL738.fastq.gz  SL918.fastq.gz
SL1077.fastq.gz  SL275.fastq.gz   SL630.fastq.gz  SL748.fastq.gz  SL920.fastq.gz
SL1078.fastq.gz  SL514.fastq.gz   SL631.fastq.gz  SL749.fastq.gz  SL921.fastq.gz
SL1079.fastq.gz  SL523.fastq.gz   SL634.fastq.gz  SL802.fastq.gz  SL922.fastq.gz
SL1080.fastq.gz  SL551.fastq.gz   SL635.fastq.gz  SL817.fastq.gz  SL944.fastq.gz
SL116.fastq.gz   SL564.fastq.gz   SL636.fastq.gz  SL818.fastq.gz  SL945.fastq.gz
SL1169.fastq.gz  SL582.fastq.gz   SL637.fastq.gz  SL847.fastq.gz  SL946.fastq.gz
SL117.fastq.gz   SL588.fastq.gz   SL648.fastq.gz  SL908.fastq.gz  SL948.fastq.gz
SL1204.fastq.gz  SL590.fastq.gz   SL649.fastq.gz  SL909.fastq.gz  SL977.fastq.gz
SL1205.fastq.gz  SL610.fastq.gz   SL706.fastq.gz  SL910.fastq.gz  SL979.fastq.gz
# come back to this mystery
ls -1 *.gz | sort > ../tmp2.txt
cd ..
ls -1 *.gz | sort > tmp.txt
diff tmp.txt tmp2.txt
# Some files in release2 which should not be there!
> wgEncodeHudsonalphaChipSeqAlignmentsRep1A549Gr.tagAlign.gz
> wgEncodeHudsonalphaChipSeqAlignmentsRep2A549Gr.tagAlign.gz
> wgEncodeHudsonalphaChipSeqPeaksRep1A549Gr.broadPeak.gz
> wgEncodeHudsonalphaChipSeqPeaksRep2A549Gr.broadPeak.gz
# replaced by ones with protocol Pcr1 and treatments Dex..

> wgEncodeHudsonalphaChipSeqAlignmentsRep1A549Pol2Pcr2xPol2.tagAlign.gz
> wgEncodeHudsonalphaChipSeqAlignmentsRep2A549Pol2Pcr2xPol2.tagAlign.gz
> wgEncodeHudsonalphaChipSeqPeaksRep1A549Pol2Pcr2xPol2.broadPeak.gz
> wgEncodeHudsonalphaChipSeqPeaksRep2A549Pol2Pcr2xPol2.broadPeak.gz
# replaced by ones with Treatment Etoh02

> wgEncodeHudsonalphaChipSeqAlignmentsRep1Gm12878Sp1Pcr1xSp1.tagAlign.gz
> wgEncodeHudsonalphaChipSeqAlignmentsRep2Gm12878Sp1Pcr1xSp1.tagAlign.gz
> wgEncodeHudsonalphaChipSeqPeaksRep1Gm12878Sp1Pcr1xSp1.broadPeak.gz
> wgEncodeHudsonalphaChipSeqPeaksRep2Gm12878Sp1Pcr1xSp1.broadPeak.gz
# replaced by ones with Treatment Sp1 removed

> wgEncodeHudsonalphaChipSeqAlignmentsRep1Hepg2Zbtb33Pcr1xZbtb33.tagAlign.gz
> wgEncodeHudsonalphaChipSeqAlignmentsRep2Hepg2Zbtb33Pcr1xZbtb33.tagAlign.gz
> wgEncodeHudsonalphaChipSeqPeaksRep1Hepg2Zbtb33Pcr1xZbtb33.broadPeak.gz
> wgEncodeHudsonalphaChipSeqPeaksRep2Hepg2Zbtb33Pcr1xZbtb33.broadPeak.gz
# replaced by ones with Treatment Zbtb33 removed

> wgEncodeHudsonalphaChipSeqAlignmentsRep1H1hescTaf1Pcr1xTaf1.tagAlign.gz
> wgEncodeHudsonalphaChipSeqAlignmentsRep2H1hescTaf1Pcr1xTaf1.tagAlign.gz
> wgEncodeHudsonalphaChipSeqPeaksRep1H1hescTaf1Pcr1xTaf1.broadPeak.gz
> wgEncodeHudsonalphaChipSeqPeaksRep2H1hescTaf1Pcr1xTaf1.broadPeak.gz
# replaced by ones with Treatment Taf1 removed

> wgEncodeHudsonalphaChipSeqAlignmentsRep2A549ControlPcr2xControl.tagAlign.gz
# replaced by ones with Treatment Etoh02
# first moved all to mystery/ then when satisfied that they were actually replaced, removed them entirely

diff tmp.txt tmp2.txt
# They are the same!
cp index.html release2/
cp files.txt release2/
cp md5sum.txt release2/

# still all those release2/mystery/SL*.fastq.gz
# Confirmed all are duplicated in downloads dir and properly named there.  Must be detritus from failed fastq load.

## Now making files list haibTfsbRelease2Lists.txt

### Big mess!  Stuff is missing from release1 dir!  Stuff is missing from downloads dir.

Where is: 
wgEncodeHudsonalphaChipSeqPeaksRep1Gm12878Gabp
wgEncodeHudsonalphaChipSeqPeaksRep2Gm12878Gabp
wgEncodeHudsonalphaChipSeqPeaksRep1K562Gabp
wgEncodeHudsonalphaChipSeqPeaksRep2K562Gabp
wgEncodeHudsonalphaChipSeqPeaksRep1Gm12878Nrsf
wgEncodeHudsonalphaChipSeqPeaksRep2Gm12878Nrsf
wgEncodeHudsonalphaChipSeqPeaksRep1K562Nrsf
wgEncodeHudsonalphaChipSeqPeaksRep2K562Nrsf
wgEncodeHudsonalphaChipSeqPeaksRep1Gm12878Pol2
wgEncodeHudsonalphaChipSeqPeaksRep2Gm12878Pol2
wgEncodeHudsonalphaChipSeqPeaksRep1K562Pol2
wgEncodeHudsonalphaChipSeqPeaksRep2K562Pol2
wgEncodeHudsonalphaChipSeqPeaksRep1Gm12878Srf
wgEncodeHudsonalphaChipSeqPeaksRep2Gm12878Srf
wgEncodeHudsonalphaChipSeqPeaksRep1K562Srf
wgEncodeHudsonalphaChipSeqPeaksRep2K562Srf
All are missing!   All are declared as narrowPeaks, while broadPeaks is what is used later.  All tagAligns are there.
Gm12878/Taf narrowPeaks are fine (in release1 and versioned).  
Controls have no peaks but tagAligns are fine and have been replaced (NOT VERSIONED!)

### Fix improperly versioned controls.  Don't bother changing wib which have already been overwritten!
mv wgEncodeHudsonalphaChipSeqAlignmentsRep1Gm12878Control.tagAlign.gz wgEncodeHudsonalphaChipSeqAlignmentsRep1Gm12878ControlV2.tagAlign.gz
mv wgEncodeHudsonalphaChipSeqAlignmentsRep1K562Control.tagAlign.gz    wgEncodeHudsonalphaChipSeqAlignmentsRep1K562ControlV2.tagAlign.gz
mv wgEncodeHudsonalphaChipSeqAlignmentsRep2Gm12878Control.tagAlign.gz wgEncodeHudsonalphaChipSeqAlignmentsRep2Gm12878ControlV2.tagAlign.gz
mv wgEncodeHudsonalphaChipSeqAlignmentsRep2K562Control.tagAlign.gz    wgEncodeHudsonalphaChipSeqAlignmentsRep2K562ControlV2.tagAlign.gz
mv wgEncodeHudsonalphaChipSeqRawDataRep1Gm12878Control.fastq.gz       wgEncodeHudsonalphaChipSeqRawDataRep1Gm12878ControlV2.fastq.gz
mv wgEncodeHudsonalphaChipSeqRawDataRep1K562Control.fastq.gz          wgEncodeHudsonalphaChipSeqRawDataRep1K562ControlV2.fastq.gz
mv wgEncodeHudsonalphaChipSeqRawDataRep2Gm12878Control.fastq.gz       wgEncodeHudsonalphaChipSeqRawDataRep2Gm12878ControlV2.fastq.gz
mv wgEncodeHudsonalphaChipSeqRawDataRep2K562Control.fastq.gz          wgEncodeHudsonalphaChipSeqRawDataRep2K562ControlV2.fastq.gz

cd release2/
rm wgEncodeHudsonalphaChipSeqAlignmentsRep1Gm12878Control.tagAlign.gz
rm wgEncodeHudsonalphaChipSeqAlignmentsRep1K562Control.tagAlign.gz
rm wgEncodeHudsonalphaChipSeqAlignmentsRep2Gm12878Control.tagAlign.gz
rm wgEncodeHudsonalphaChipSeqAlignmentsRep2K562Control.tagAlign.gz
rm wgEncodeHudsonalphaChipSeqRawDataRep1Gm12878Control.fastq.gz
rm wgEncodeHudsonalphaChipSeqRawDataRep1K562Control.fastq.gz
rm wgEncodeHudsonalphaChipSeqRawDataRep2Gm12878Control.fastq.gz
rm wgEncodeHudsonalphaChipSeqRawDataRep2K562Control.fastq.gz

ln ../wgEncodeHudsonalphaChipSeqAlignmentsRep1Gm12878ControlV2.tagAlign.gz .
ln ../wgEncodeHudsonalphaChipSeqAlignmentsRep1K562ControlV2.tagAlign.gz    .
ln ../wgEncodeHudsonalphaChipSeqAlignmentsRep2Gm12878ControlV2.tagAlign.gz .
ln ../wgEncodeHudsonalphaChipSeqAlignmentsRep2K562ControlV2.tagAlign.gz    .
ln ../wgEncodeHudsonalphaChipSeqRawDataRep1Gm12878ControlV2.fastq.gz       .
ln ../wgEncodeHudsonalphaChipSeqRawDataRep1K562ControlV2.fastq.gz          .
ln ../wgEncodeHudsonalphaChipSeqRawDataRep2Gm12878ControlV2.fastq.gz       .
ln ../wgEncodeHudsonalphaChipSeqRawDataRep2K562ControlV2.fastq.gz          .
   

rename table wgEncodeHudsonalphaChipSeqRawSignalRep1Gm12878Control to wgEncodeHudsonalphaChipSeqRawSignalRep1Gm12878ControlV2;
rename table wgEncodeHudsonalphaChipSeqRawSignalRep1K562Control    to wgEncodeHudsonalphaChipSeqRawSignalRep1K562ControlV2;
rename table wgEncodeHudsonalphaChipSeqRawSignalRep2Gm12878Control to wgEncodeHudsonalphaChipSeqRawSignalRep2Gm12878ControlV2;
rename table wgEncodeHudsonalphaChipSeqRawSignalRep2K562Control    to wgEncodeHudsonalphaChipSeqRawSignalRep2K562ControlV2;

### Fix missing peaks
# found them in subId dirs.
cp, gzip, cd release1/ ln
edit trackDb
make alpha DBS=hg18
encodeDownloadsPage.pl

cp /hive/groups/encode/dcc/pipeline/encpipeline_prod/7/data/FoxP2_PFSK-1_SL13_peakcalls.narrowPeak /usr/local/apache/htdocs/goldenPath/hg18/encodeDCC/wgEncodeHudsonalphaChipSeq/wgEncodeHudsonalphaChipSeqPeaksRep1Pfsk1Foxp2.narrowPeaks
cp /hive/groups/encode/dcc/pipeline/encpipeline_prod/7/data/FoxP2_PFSK-1_SL14_peakcalls.narrowPeak /usr/local/apache/htdocs/goldenPath/hg18/encodeDCC/wgEncodeHudsonalphaChipSeq/wgEncodeHudsonalphaChipSeqPeaksRep2Pfsk1Foxp2.narrowPeaks
cp /hive/groups/encode/dcc/pipeline/encpipeline_prod/7/data/FoxP2_SK-N-MC_SL144_peakcalls.narrowPeak /usr/local/apache/htdocs/goldenPath/hg18/encodeDCC/wgEncodeHudsonalphaChipSeq/wgEncodeHudsonalphaChipSeqPeaksRep1SknmcFoxp2.narrowPeaks
cp /hive/groups/encode/dcc/pipeline/encpipeline_prod/7/data/FoxP2_SK-N-MC_SL167_peakcalls.narrowPeak /usr/local/apache/htdocs/goldenPath/hg18/encodeDCC/wgEncodeHudsonalphaChipSeq/wgEncodeHudsonalphaChipSeqPeaksRep2SknmcFoxp2.narrowPeaks
gzip *.narrowPeaks
cd release2/
ln ../wgEncodeHudsonalphaChipSeqPeaksRep1Pfsk1Foxp2.narrowPeaks.gz .                 
ln ../wgEncodeHudsonalphaChipSeqPeaksRep2Pfsk1Foxp2.narrowPeaks.gz .
ln ../wgEncodeHudsonalphaChipSeqPeaksRep1SknmcFoxp2.narrowPeaks.gz .
ln ../wgEncodeHudsonalphaChipSeqPeaksRep2SknmcFoxp2.narrowPeaks.gz .
cd ..

### Fixed a bunch of metadata problems in fileDb.ra and a couple in trackDb.wgEncode.ra


Missing:
### All of replicate 1 but only tags for replicate 2
wgEncodeHudsonalphaChipSeqPeaksRep1Gm12878TafiiV2.broadPeak.gz                  cell=GM12878; antibody=TAF1; protocol=PCR1x; subId=422;
wgEncodeHudsonalphaChipSeqAlignmentsRep1Gm12878TafiiV2.tagAlign.gz              cell=GM12878; antibody=TAF1; protocol=PCR1x; subId=422;
wgEncodeHudsonalphaChipSeqRawDataRep2Gm12878Taf1Pcr1x.fastq.gz                  cell=GM12878; antibody=TAF1; protocol=PCR1x; subId=880;
wgEncodeHudsonalphaChipSeqAlignmentsRep2Gm12878TafiiV2.tagAlign.gz              cell=GM12878; antibody=TAF1; protocol=PCR1x; subId=422;

### Replicate 2 but no replicate one!
wgEncodeHudsonalphaChipSeqPeaksRep2Hepg2Srf.broadPeak.gz                        cell=HepG2; antibody=SRF; protocol=PCR1x; subId=432;
wgEncodeHudsonalphaChipSeqAlignmentsRep2Hepg2Srf.tagAlign.gz                    cell=HepG2; antibody=SRF; protocol=PCR1x; subId=432;

### Replicate 1 only
wgEncodeHudsonalphaChipSeqPeaksA549Gr.broadPeak.gz                                      cell=A549; antibody=GR; protocol=PCR1x; Peaks; replicate=1; subId=774;
wgEncodeHudsonalphaChipSeqAlignmentsA549Gr.tagAlign.gz                                  cell=A549; antibody=GR; protocol=PCR1x; Alignments; subId=774;

### Now resume with making files lists
cd release2/
rm *.gz
ln ../*.gz .
ls -l *.gz | wl
cp ../index.html .
cp ../fileDb.ra .
cp ../preamble.html .
cp ../files.txt .
cd release1/
ls ../tmp1.txt
cd ../release2/
ls ../tmp2.txt
diff -w tmp1.txt tmp2.txt | grep "<" > tmpOld.txt
diff -w tmp1.txt tmp2.txt | grep ">" > tmpNew.txt
e tmpOld.txt tmpNew.txt tmp2.txt
# remove leading '> '
diff -w tmp2.txt tmpNew.txt | grep "<" > tmpSame.txt

# New and old were easy.  What about replaced or obsoleted or ...

# fix wib mismatches
select file from wgEncodeHudsonalphaChipSeqRawSignalRep1Pfsk1Control limit 1;
select file from wgEncodeHudsonalphaChipSeqRawSignalRep1Pfsk1Nrsf    limit 1;
select file from wgEncodeHudsonalphaChipSeqRawSignalRep2Pfsk1Control limit 1;
select file from wgEncodeHudsonalphaChipSeqRawSignalRep2Pfsk1Nrsf    limit 1;
wgEncodeHudsonalphaChipSeqRawSignalRep1Pfsk1Control        | /gbdb/hg18/wib/wgEncodeHudsonalphaChipSeqRawSignalRep1Pfsk1Control_436.wib
wgEncodeHudsonalphaChipSeqRawSignalRep1Pfsk1Nrsf           | /gbdb/hg18/wib/wgEncodeHudsonalphaChipSeqRawSignalRep1Pfsk1Nrsf_436.wib
wgEncodeHudsonalphaChipSeqRawSignalRep2Pfsk1Control        | /gbdb/hg18/wib/wgEncodeHudsonalphaChipSeqRawSignalRep2Pfsk1Control_436.wib
wgEncodeHudsonalphaChipSeqRawSignalRep2Pfsk1Nrsf           | /gbdb/hg18/wib/wgEncodeHudsonalphaChipSeqRawSignalRep2Pfsk1Nrsf_436.wib

update wgEncodeHudsonalphaChipSeqRawSignalRep1Pfsk1Control set file = "/gbdb/hg18/wib/wgEncodeHudsonalphaChipSeqRawSignalRep1Pfsk1Control.wib";
update wgEncodeHudsonalphaChipSeqRawSignalRep1Pfsk1Nrsf    set file = "/gbdb/hg18/wib/wgEncodeHudsonalphaChipSeqRawSignalRep1Pfsk1Nrsf.wib";
update wgEncodeHudsonalphaChipSeqRawSignalRep2Pfsk1Control set file = "/gbdb/hg18/wib/wgEncodeHudsonalphaChipSeqRawSignalRep2Pfsk1Control.wib";
update wgEncodeHudsonalphaChipSeqRawSignalRep2Pfsk1Nrsf    set file = "/gbdb/hg18/wib/wgEncodeHudsonalphaChipSeqRawSignalRep2Pfsk1Nrsf.wib";

cd /hive/groups/encode/dcc/pipeline/downloads/hg18/wgEncodeHudsonalphaChipSeq/gbdb/
mv wgEncodeHudsonalphaChipSeqRawSignalRep1Pfsk1Control_436.wib wgEncodeHudsonalphaChipSeqRawSignalRep1Pfsk1Control.wib
mv wgEncodeHudsonalphaChipSeqRawSignalRep1Pfsk1Nrsf_436.wib wgEncodeHudsonalphaChipSeqRawSignalRep1Pfsk1Nrsf.wib
mv wgEncodeHudsonalphaChipSeqRawSignalRep2Pfsk1Control_436.wib wgEncodeHudsonalphaChipSeqRawSignalRep2Pfsk1Control.wib
mv wgEncodeHudsonalphaChipSeqRawSignalRep2Pfsk1Nrsf_436.wib wgEncodeHudsonalphaChipSeqRawSignalRep2Pfsk1Nrsf.wib
cd /gbdb/hg18/wib
rm wgEncodeHudsonalphaChipSeqRawSignalRep1Pfsk1Control_436.wib
rm wgEncodeHudsonalphaChipSeqRawSignalRep1Pfsk1Nrsf_436.wib
rm wgEncodeHudsonalphaChipSeqRawSignalRep2Pfsk1Control_436.wib
rm wgEncodeHudsonalphaChipSeqRawSignalRep2Pfsk1Nrsf_436.wib

ln -sf /hive/groups/encode/dcc/pipeline/downloads/hg18/wgEncodeHudsonalphaChipSeq/gbdb/wgEncodeHudsonalphaChipSeqRawSignalRep1Pfsk1Control.wib wgEncodeHudsonalphaChipSeqRawSignalRep1Pfsk1Control.wib
ln -sf /hive/groups/encode/dcc/pipeline/downloads/hg18/wgEncodeHudsonalphaChipSeq/gbdb/wgEncodeHudsonalphaChipSeqRawSignalRep1Pfsk1Nrsf.wib wgEncodeHudsonalphaChipSeqRawSignalRep1Pfsk1Nrsf.wib
ln -sf /hive/groups/encode/dcc/pipeline/downloads/hg18/wgEncodeHudsonalphaChipSeq/gbdb/wgEncodeHudsonalphaChipSeqRawSignalRep2Pfsk1Control.wib wgEncodeHudsonalphaChipSeqRawSignalRep2Pfsk1Control.wib
ln -sf /hive/groups/encode/dcc/pipeline/downloads/hg18/wgEncodeHudsonalphaChipSeq/gbdb/wgEncodeHudsonalphaChipSeqRawSignalRep2Pfsk1Nrsf.wib wgEncodeHudsonalphaChipSeqRawSignalRep2Pfsk1Nrsf.wib

select file from wgEncodeHudsonalphaChipSeqRawSignalRep1Gm12878ControlV2 limit 1;
select file from wgEncodeHudsonalphaChipSeqRawSignalRep1K562ControlV2    limit 1;
select file from wgEncodeHudsonalphaChipSeqRawSignalRep2Gm12878ControlV2 limit 1;
select file from wgEncodeHudsonalphaChipSeqRawSignalRep2K562ControlV2    limit 1;
wgEncodeHudsonalphaChipSeqRawSignalRep1Gm12878ControlV2 | /gbdb/hg18/wib/wgEncodeHudsonalphaChipSeqRawSignalRep1Gm12878Control.wib 
wgEncodeHudsonalphaChipSeqRawSignalRep1K562ControlV2    | /gbdb/hg18/wib/wgEncodeHudsonalphaChipSeqRawSignalRep1K562Control.wib 
wgEncodeHudsonalphaChipSeqRawSignalRep2Gm12878ControlV2 | /gbdb/hg18/wib/wgEncodeHudsonalphaChipSeqRawSignalRep2Gm12878Control.wib 
wgEncodeHudsonalphaChipSeqRawSignalRep2K562ControlV2    | /gbdb/hg18/wib/wgEncodeHudsonalphaChipSeqRawSignalRep2K562Control.wib 

update wgEncodeHudsonalphaChipSeqRawSignalRep1Gm12878ControlV2 set file = "/gbdb/hg18/wib/wgEncodeHudsonalphaChipSeqRawSignalRep1Gm12878ControlV2.wib";
update wgEncodeHudsonalphaChipSeqRawSignalRep1K562ControlV2    set file = "/gbdb/hg18/wib/wgEncodeHudsonalphaChipSeqRawSignalRep1K562ControlV2.wib";
update wgEncodeHudsonalphaChipSeqRawSignalRep2Gm12878ControlV2 set file = "/gbdb/hg18/wib/wgEncodeHudsonalphaChipSeqRawSignalRep2Gm12878ControlV2.wib";
update wgEncodeHudsonalphaChipSeqRawSignalRep2K562ControlV2    set file = "/gbdb/hg18/wib/wgEncodeHudsonalphaChipSeqRawSignalRep2K562ControlV2.wib";

cd /hive/groups/encode/dcc/pipeline/downloads/hg18/wgEncodeHudsonalphaChipSeq/gbdb/
mv wgEncodeHudsonalphaChipSeqRawSignalRep1Gm12878Control.wib wgEncodeHudsonalphaChipSeqRawSignalRep1Gm12878ControlV2.wib
mv wgEncodeHudsonalphaChipSeqRawSignalRep1K562Control.wib    wgEncodeHudsonalphaChipSeqRawSignalRep1K562ControlV2.wib
mv wgEncodeHudsonalphaChipSeqRawSignalRep2Gm12878Control.wib wgEncodeHudsonalphaChipSeqRawSignalRep2Gm12878ControlV2.wib
mv wgEncodeHudsonalphaChipSeqRawSignalRep2K562Control.wib    wgEncodeHudsonalphaChipSeqRawSignalRep2K562ControlV2.wib
cd /gbdb/hg18/wib
rm wgEncodeHudsonalphaChipSeqRawSignalRep1Gm12878Control.wib
rm wgEncodeHudsonalphaChipSeqRawSignalRep1K562Control.wib
rm wgEncodeHudsonalphaChipSeqRawSignalRep2Gm12878Control.wib
rm wgEncodeHudsonalphaChipSeqRawSignalRep2K562Control.wib

ln -sf /hive/groups/encode/dcc/pipeline/downloads/hg18/wgEncodeHudsonalphaChipSeq/gbdb/wgEncodeHudsonalphaChipSeqRawSignalRep1Gm12878ControlV2.wib wgEncodeHudsonalphaChipSeqRawSignalRep1Gm12878ControlV2.wib
ln -sf /hive/groups/encode/dcc/pipeline/downloads/hg18/wgEncodeHudsonalphaChipSeq/gbdb/wgEncodeHudsonalphaChipSeqRawSignalRep1K562ControlV2.wib    wgEncodeHudsonalphaChipSeqRawSignalRep1K562ControlV2.wib
ln -sf /hive/groups/encode/dcc/pipeline/downloads/hg18/wgEncodeHudsonalphaChipSeq/gbdb/wgEncodeHudsonalphaChipSeqRawSignalRep2Gm12878ControlV2.wib wgEncodeHudsonalphaChipSeqRawSignalRep2Gm12878ControlV2.wib
ln -sf /hive/groups/encode/dcc/pipeline/downloads/hg18/wgEncodeHudsonalphaChipSeq/gbdb/wgEncodeHudsonalphaChipSeqRawSignalRep2K562ControlV2.wib    wgEncodeHudsonalphaChipSeqRawSignalRep2K562ControlV2.wib

### Big problems remain!!!
wgEncodeHudsonalphaChipSeqRawSignalRep1Gm12878ControlPcr2x | /gbdb/hg18/wib/wgEncodeHudsonalphaChipSeqRawSignalRep1Gm12878ControlPcr2x.wib
   ls: /gbdb/hg18/wib/wgEncodeHudsonalphaChipSeqRawSignalRep1Gm12878ControlPcr2x.wib: No such file or directory
wgEncodeHudsonalphaChipSeqRawSignalRep1K562ControlPcr2x    | /gbdb/hg18/wib/wgEncodeHudsonalphaChipSeqRawSignalRep1K562ControlPcr2x.wib
   ls: /gbdb/hg18/wib/wgEncodeHudsonalphaChipSeqRawSignalRep1K562ControlPcr2x.wib: No such file or directory
wgEncodeHudsonalphaChipSeqRawSignalRep2Gm12878ControlPcr2x | /gbdb/hg18/wib/wgEncodeHudsonalphaChipSeqRawSignalRep2Gm12878ControlPcr2x.wib
   ls: /gbdb/hg18/wib/wgEncodeHudsonalphaChipSeqRawSignalRep2Gm12878ControlPcr2x.wib: No such file or directory
wgEncodeHudsonalphaChipSeqRawSignalRep2K562ControlPcr2x    | /gbdb/hg18/wib/wgEncodeHudsonalphaChipSeqRawSignalRep2K562ControlPcr2x.wib
   ls: /gbdb/hg18/wib/wgEncodeHudsonalphaChipSeqRawSignalRep2K562ControlPcr2x.wib: No such file or directory

   ls /gbdb/hg18/wib/wgEncodeHudsonalphaChipSeqRawSignalRep1Gm12878ControlPcr2x.wib
   ls /gbdb/hg18/wib/wgEncodeHudsonalphaChipSeqRawSignalRep1K562ControlPcr2x.wib
   ls /gbdb/hg18/wib/wgEncodeHudsonalphaChipSeqRawSignalRep2Gm12878ControlPcr2x.wib
   ls /gbdb/hg18/wib/wgEncodeHudsonalphaChipSeqRawSignalRep2K562ControlPcr2x.wib

   ls /gbdb/hg18/wib/wgEncodeHudsonalphaChipSeqRawSignal*K562Control*.wib

# Should be 4 but i have six:
/gbdb/hg18/wib/wgEncodeHudsonalphaChipSeqRawSignalRep1K562ControlV2.wib   Is this pcr1 as it should be???
/gbdb/hg18/wib/wgEncodeHudsonalphaChipSeqRawSignalRep2K562ControlV2.wib

/gbdb/hg18/wib/wgEncodeHudsonalphaChipSeqRawSignalRep1K562Control1Pcr2x.wib  Is this pcr2 as it should be???
/gbdb/hg18/wib/wgEncodeHudsonalphaChipSeqRawSignalRep2K562Control1Pcr2x.wib

/gbdb/hg18/wib/wgEncodeHudsonalphaChipSeqRawSignalRep1K562Control2_262.wib  What is this??
/gbdb/hg18/wib/wgEncodeHudsonalphaChipSeqRawSignalRep2K562Control2_262.wib

ll /gbdb/hg18/wib/wgEncodeHudsonalphaChipSeqRawSignal*K562Control*.wib
/gbdb/hg18/wib/wgEncodeHudsonalphaChipSeqRawSignalRep1K562Control1Pcr2x.wib -> /hive/groups/encode/dcc/pipeline/downloads/hg18/wgEncodeHudsonalphaChipSeq/gbdb/wgEncodeHudsonalphaChipSeqRawSignalRep1K562Control1Pcr2x.wib
/gbdb/hg18/wib/wgEncodeHudsonalphaChipSeqRawSignalRep1K562Control2_262.wib  -> /hive/groups/encode/dcc/pipeline/downloads/hg18/wgEncodeHudsonalphaChipSeq/gbdb/wgEncodeHudsonalphaChipSeqRawSignalRep1K562Control2_262.wib
/gbdb/hg18/wib/wgEncodeHudsonalphaChipSeqRawSignalRep1K562ControlV2.wib     -> /hive/groups/encode/dcc/pipeline/downloads/hg18/wgEncodeHudsonalphaChipSeq/gbdb/wgEncodeHudsonalphaChipSeqRawSignalRep1K562ControlV2.wib
/gbdb/hg18/wib/wgEncodeHudsonalphaChipSeqRawSignalRep2K562Control1Pcr2x.wib -> /hive/groups/encode/dcc/pipeline/downloads/hg18/wgEncodeHudsonalphaChipSeq/gbdb/wgEncodeHudsonalphaChipSeqRawSignalRep2K562Control1Pcr2x.wib
/gbdb/hg18/wib/wgEncodeHudsonalphaChipSeqRawSignalRep2K562Control2_262.wib  -> /hive/groups/encode/dcc/pipeline/downloads/hg18/wgEncodeHudsonalphaChipSeq/gbdb/wgEncodeHudsonalphaChipSeqRawSignalRep2K562Control2_262.wib
/gbdb/hg18/wib/wgEncodeHudsonalphaChipSeqRawSignalRep2K562ControlV2.wib     -> /hive/groups/encode/dcc/pipeline/downloads/hg18/wgEncodeHudsonalphaChipSeq/gbdb/wgEncodeHudsonalphaChipSeqRawSignalRep2K562ControlV2.wib

cd /hive/groups/encode/dcc/pipeline/downloads/hg18/wgEncodeHudsonalphaChipSeq/gbdb/
ll wgEncodeHudsonalphaChipSeqRawSignal*K562Control*.wib
# Nothing is the same!
-rw-rw-r-- 2 braney protein 1667635612 Jul 15  2009 wgEncodeHudsonalphaChipSeqRawSignalRep1K562Control1Pcr2x.wib
-rw-rw-r-- 2 braney protein 2061259610 Jul 15  2009 wgEncodeHudsonalphaChipSeqRawSignalRep1K562Control2_262.wib
-rw-rw-r-- 2 qateam protein 1354570971 Oct 27 10:58 wgEncodeHudsonalphaChipSeqRawSignalRep1K562ControlV2.wib
-rw-rw-r-- 2 braney protein 1473572093 Jul 15  2009 wgEncodeHudsonalphaChipSeqRawSignalRep2K562Control1Pcr2x.wib
-rw-rw-r-- 2 braney protein 2376731710 Jul 15  2009 wgEncodeHudsonalphaChipSeqRawSignalRep2K562Control2_262.wib
-rw-rw-r-- 2 qateam protein 1198698265 Oct 27 11:46 wgEncodeHudsonalphaChipSeqRawSignalRep2K562ControlV2.wib


cd /hive/groups/encode/dcc/pipeline/downloads/hg18/wgEncodeHudsonalphaChipSeq/gbdb/
ll wgEncodeHudsonalphaChipSeqRawSignal*K562Control*.wib
-rw-rw-r-- 2 braney protein 1667635612 Jul 15  2009 wgEncodeHudsonalphaChipSeqRawSignalRep1K562Control1Pcr2x.wib
-rw-rw-r-- 2 braney protein 2061259610 Jul 15  2009 wgEncodeHudsonalphaChipSeqRawSignalRep1K562Control2_262.wib
-rw-rw-r-- 2 qateam protein 1354570971 Oct 27 10:58 wgEncodeHudsonalphaChipSeqRawSignalRep1K562ControlV2.wib
-rw-rw-r-- 2 braney protein 1473572093 Jul 15  2009 wgEncodeHudsonalphaChipSeqRawSignalRep2K562Control1Pcr2x.wib
-rw-rw-r-- 2 braney protein 2376731710 Jul 15  2009 wgEncodeHudsonalphaChipSeqRawSignalRep2K562Control2_262.wib
-rw-rw-r-- 2 qateam protein 1198698265 Oct 27 11:46 wgEncodeHudsonalphaChipSeqRawSignalRep2K562ControlV2.wib
# according to the trackDb subId=262 is the pcr2x!  Since these are the larger, I will take them
[hgwdev:tdreszer gbdb> mkdir old
[hgwdev:tdreszer gbdb> mv wgEncodeHudsonalphaChipSeqRawSignalRep1K562Control1Pcr2x.wib old/
[hgwdev:tdreszer gbdb> mv wgEncodeHudsonalphaChipSeqRawSignalRep2K562Control1Pcr2x.wib old/
[hgwdev:tdreszer gbdb> mv wgEncodeHudsonalphaChipSeqRawSignalRep1K562Control2_262.wib -rw-rw-r-- 2 braney protein 1667635612 Jul 15  2009 wgEncodeHudsonalphaChipSeqRawSignalRep1K562Control1Pcr2x.wib
[hgwdev:tdreszer gbdb> mv wgEncodeHudsonalphaChipSeqRawSignalRep1K562Control2_262.wib wgEncodeHudsonalphaChipSeqRawSignalRep1K562ControlPcr2x.wib
[hgwdev:tdreszer gbdb> mv wgEncodeHudsonalphaChipSeqRawSignalRep2K562Control2_262.wib wgEncodeHudsonalphaChipSeqRawSignalRep2K562ControlPcr2x.wib
[hgwdev:tdreszer gbdb> ll wgEncodeHudsonalphaChipSeqRawSignal*K562Control*.wib
-rw-rw-r-- 2 braney protein 2061259610 Jul 15  2009 wgEncodeHudsonalphaChipSeqRawSignalRep1K562ControlPcr2x.wib
-rw-rw-r-- 2 qateam protein 1354570971 Oct 27 10:58 wgEncodeHudsonalphaChipSeqRawSignalRep1K562ControlV2.wib
-rw-rw-r-- 2 braney protein 2376731710 Jul 15  2009 wgEncodeHudsonalphaChipSeqRawSignalRep2K562ControlPcr2x.wib
-rw-rw-r-- 2 qateam protein 1198698265 Oct 27 11:46 wgEncodeHudsonalphaChipSeqRawSignalRep2K562ControlV2.wib

# changed mind.  Take the most recent!!!
ll --full-time wgEncodeHudsonalphaChipSeqRawSignal*K562Control*.wib
-rw-rw-r-- 2 braney protein 2061259610 2009-07-15 11:46:56.578743000 -0700 wgEncodeHudsonalphaChipSeqRawSignalRep1K562ControlPcr2x.wib
-rw-rw-r-- 2 braney protein 2376731710 2009-07-15 11:43:35.806545000 -0700 wgEncodeHudsonalphaChipSeqRawSignalRep2K562ControlPcr2x.wib
[hgwdev:tdreszer gbdb> ll --full-time old/wgEncodeHudsonalphaChipSeqRawSignal*K562Control*.wib
-rw-rw-r-- 2 braney protein 1667635612 2009-07-15 11:54:27.672486000 -0700 old/wgEncodeHudsonalphaChipSeqRawSignalRep1K562Control1Pcr2x.wib
-rw-rw-r-- 2 braney protein 1473572093 2009-07-15 12:06:55.399755000 -0700 old/wgEncodeHudsonalphaChipSeqRawSignalRep2K562Control1Pcr2x.wib
mv wgEncodeHudsonalphaChipSeqRawSignalRep1K562ControlPcr2x.wib old/wgEncodeHudsonalphaChipSeqRawSignalRep1K562ControlPcr2x_262.wib
mv wgEncodeHudsonalphaChipSeqRawSignalRep2K562ControlPcr2x.wib old/wgEncodeHudsonalphaChipSeqRawSignalRep2K562ControlPcr2x_262.wib
mv old/wgEncodeHudsonalphaChipSeqRawSignalRep1K562Control1Pcr2x.wib wgEncodeHudsonalphaChipSeqRawSignalRep1K562ControlPcr2x.wib
mv old/wgEncodeHudsonalphaChipSeqRawSignalRep2K562Control1Pcr2x.wib wgEncodeHudsonalphaChipSeqRawSignalRep2K562ControlPcr2x.wib
ll wgEncodeHudsonalphaChipSeqRawSignal*K562Control*.wib
-rw-rw-r-- 2 braney protein 1667635612 Jul 15  2009 wgEncodeHudsonalphaChipSeqRawSignalRep1K562ControlPcr2x.wib
-rw-rw-r-- 2 qateam protein 1354570971 Oct 27 10:58 wgEncodeHudsonalphaChipSeqRawSignalRep1K562ControlV2.wib
-rw-rw-r-- 2 braney protein 1473572093 Jul 15  2009 wgEncodeHudsonalphaChipSeqRawSignalRep2K562ControlPcr2x.wib
-rw-rw-r-- 2 qateam protein 1198698265 Oct 27 11:46 wgEncodeHudsonalphaChipSeqRawSignalRep2K562ControlV2.wib

# and GM?
ll --full-time wgEncodeHudsonalphaChipSeqRawSignal*Gm12878Control*.wib
-rw-rw-r-- 2 braney protein 2057866586 2009-07-15 12:00:38.060813000 -0700 wgEncodeHudsonalphaChipSeqRawSignalRep1Gm12878Control1Pcr2x.wib
-rw-rw-r-- 2 qateam protein  716907221 2009-10-27 11:47:25.538722000 -0700 wgEncodeHudsonalphaChipSeqRawSignalRep1Gm12878ControlV2.wib
-rw-rw-r-- 2 braney protein 2147927459 2009-07-15 12:03:50.256338000 -0700 wgEncodeHudsonalphaChipSeqRawSignalRep2Gm12878Control1Pcr2x.wib
-rw-rw-r-- 2 qateam protein  634188096 2009-10-27 10:59:31.332059000 -0700 wgEncodeHudsonalphaChipSeqRawSignalRep2Gm12878ControlV2.wib
mv wgEncodeHudsonalphaChipSeqRawSignalRep1Gm12878Control1Pcr2x.wib wgEncodeHudsonalphaChipSeqRawSignalRep1Gm12878ControlPcr2x.wib
mv wgEncodeHudsonalphaChipSeqRawSignalRep2Gm12878Control1Pcr2x.wib wgEncodeHudsonalphaChipSeqRawSignalRep2Gm12878ControlPcr2x.wib

# okay now patch gbdb properly
cd /gbdb/hg18/wib/
ll wgEncodeHudsonalphaChipSeqRawSignal*Gm12878Control*.wib
lrwxrwxrwx 1 braney   protein 143 Feb 25 14:34 wgEncodeHudsonalphaChipSeqRawSignalRep1Gm12878Control1Pcr2x.wib -> /hive/groups/encode/dcc/pipeline/downloads/hg18/wgEncodeHudsonalphaChipSeq/gbdb/wgEncodeHudsonalphaChipSeqRawSignalRep1Gm12878Control1Pcr2x.wib
lrwxrwxrwx 1 tdreszer protein 139 Feb 26 11:28 wgEncodeHudsonalphaChipSeqRawSignalRep1Gm12878ControlV2.wib -> /hive/groups/encode/dcc/pipeline/downloads/hg18/wgEncodeHudsonalphaChipSeq/gbdb/wgEncodeHudsonalphaChipSeqRawSignalRep1Gm12878ControlV2.wib
lrwxrwxrwx 1 braney   protein 143 Feb 25 14:34 wgEncodeHudsonalphaChipSeqRawSignalRep2Gm12878Control1Pcr2x.wib -> /hive/groups/encode/dcc/pipeline/downloads/hg18/wgEncodeHudsonalphaChipSeq/gbdb/wgEncodeHudsonalphaChipSeqRawSignalRep2Gm12878Control1Pcr2x.wib
lrwxrwxrwx 1 tdreszer protein 139 Feb 26 11:28 wgEncodeHudsonalphaChipSeqRawSignalRep2Gm12878ControlV2.wib -> /hive/groups/encode/dcc/pipeline/downloads/hg18/wgEncodeHudsonalphaChipSeq/gbdb/wgEncodeHudsonalphaChipSeqRawSignalRep2Gm12878ControlV2.wib
ll wgEncodeHudsonalphaChipSeqRawSignal*K562Control*.wib
lrwxrwxrwx 1 braney   protein 140 Feb 25 14:34 wgEncodeHudsonalphaChipSeqRawSignalRep1K562Control1Pcr2x.wib -> /hive/groups/encode/dcc/pipeline/downloads/hg18/wgEncodeHudsonalphaChipSeq/gbdb/wgEncodeHudsonalphaChipSeqRawSignalRep1K562Control1Pcr2x.wib
lrwxrwxrwx 1 braney   protein 139 Feb 25 14:34 wgEncodeHudsonalphaChipSeqRawSignalRep1K562Control2_262.wib -> /hive/groups/encode/dcc/pipeline/downloads/hg18/wgEncodeHudsonalphaChipSeq/gbdb/wgEncodeHudsonalphaChipSeqRawSignalRep1K562Control2_262.wib
lrwxrwxrwx 1 tdreszer protein 136 Feb 26 11:28 wgEncodeHudsonalphaChipSeqRawSignalRep1K562ControlV2.wib -> /hive/groups/encode/dcc/pipeline/downloads/hg18/wgEncodeHudsonalphaChipSeq/gbdb/wgEncodeHudsonalphaChipSeqRawSignalRep1K562ControlV2.wib
lrwxrwxrwx 1 braney   protein 140 Feb 25 14:34 wgEncodeHudsonalphaChipSeqRawSignalRep2K562Control1Pcr2x.wib -> /hive/groups/encode/dcc/pipeline/downloads/hg18/wgEncodeHudsonalphaChipSeq/gbdb/wgEncodeHudsonalphaChipSeqRawSignalRep2K562Control1Pcr2x.wib
lrwxrwxrwx 1 braney   protein 139 Feb 25 14:34 wgEncodeHudsonalphaChipSeqRawSignalRep2K562Control2_262.wib -> /hive/groups/encode/dcc/pipeline/downloads/hg18/wgEncodeHudsonalphaChipSeq/gbdb/wgEncodeHudsonalphaChipSeqRawSignalRep2K562Control2_262.wib
lrwxrwxrwx 1 tdreszer protein 136 Feb 26 11:28 wgEncodeHudsonalphaChipSeqRawSignalRep2K562ControlV2.wib -> /hive/groups/encode/dcc/pipeline/downloads/hg18/wgEncodeHudsonalphaChipSeq/gbdb/wgEncodeHudsonalphaChipSeqRawSignalRep2K562ControlV2.wib
rm wgEncodeHudsonalphaChipSeqRawSignalRep1K562Control2_262.wib
rm wgEncodeHudsonalphaChipSeqRawSignalRep2K562Control2_262.wib
ln -sf /hive/groups/encode/dcc/pipeline/downloads/hg18/wgEncodeHudsonalphaChipSeq/gbdb/wgEncodeHudsonalphaChipSeqRawSignalRep1Gm12878ControlPcr2x.wib wgEncodeHudsonalphaChipSeqRawSignalRep1Gm12878ControlPcr2x.wib
ln -sf /hive/groups/encode/dcc/pipeline/downloads/hg18/wgEncodeHudsonalphaChipSeq/gbdb/wgEncodeHudsonalphaChipSeqRawSignalRep2Gm12878ControlPcr2x.wib wgEncodeHudsonalphaChipSeqRawSignalRep2Gm12878ControlPcr2x.wib
ln -sf /hive/groups/encode/dcc/pipeline/downloads/hg18/wgEncodeHudsonalphaChipSeq/gbdb/wgEncodeHudsonalphaChipSeqRawSignalRep1K562ControlPcr2x.wib wgEncodeHudsonalphaChipSeqRawSignalRep1K562ControlPcr2x.wib
ln -sf /hive/groups/encode/dcc/pipeline/downloads/hg18/wgEncodeHudsonalphaChipSeq/gbdb/wgEncodeHudsonalphaChipSeqRawSignalRep2K562ControlPcr2x.wib wgEncodeHudsonalphaChipSeqRawSignalRep2K562ControlPcr2x.wib

rm wgEncodeHudsonalphaChipSeqRawSignalRep1Gm12878Control1Pcr2x.wib
rm wgEncodeHudsonalphaChipSeqRawSignalRep2Gm12878Control1Pcr2x.wib
rm wgEncodeHudsonalphaChipSeqRawSignalRep1K562Control1Pcr2x.wib
rm wgEncodeHudsonalphaChipSeqRawSignalRep2K562Control1Pcr2x.wib

ll wgEncodeHudsonalphaChipSeqRawSignal*Gm12878Control*.wib
lrwxrwxrwx 1 tdreszer protein 142 Feb 26 12:05 wgEncodeHudsonalphaChipSeqRawSignalRep1Gm12878ControlPcr2x.wib -> /hive/groups/encode/dcc/pipeline/downloads/hg18/wgEncodeHudsonalphaChipSeq/gbdb/wgEncodeHudsonalphaChipSeqRawSignalRep1Gm12878ControlPcr2x.wib
lrwxrwxrwx 1 tdreszer protein 139 Feb 26 11:28 wgEncodeHudsonalphaChipSeqRawSignalRep1Gm12878ControlV2.wib -> /hive/groups/encode/dcc/pipeline/downloads/hg18/wgEncodeHudsonalphaChipSeq/gbdb/wgEncodeHudsonalphaChipSeqRawSignalRep1Gm12878ControlV2.wib
lrwxrwxrwx 1 tdreszer protein 142 Feb 26 12:05 wgEncodeHudsonalphaChipSeqRawSignalRep2Gm12878ControlPcr2x.wib -> /hive/groups/encode/dcc/pipeline/downloads/hg18/wgEncodeHudsonalphaChipSeq/gbdb/wgEncodeHudsonalphaChipSeqRawSignalRep2Gm12878ControlPcr2x.wib
lrwxrwxrwx 1 tdreszer protein 139 Feb 26 11:28 wgEncodeHudsonalphaChipSeqRawSignalRep2Gm12878ControlV2.wib -> /hive/groups/encode/dcc/pipeline/downloads/hg18/wgEncodeHudsonalphaChipSeq/gbdb/wgEncodeHudsonalphaChipSeqRawSignalRep2Gm12878ControlV2.wib
ll wgEncodeHudsonalphaChipSeqRawSignal*K562Control*.wib
lrwxrwxrwx 1 tdreszer protein 139 Feb 26 12:05 wgEncodeHudsonalphaChipSeqRawSignalRep1K562ControlPcr2x.wib -> /hive/groups/encode/dcc/pipeline/downloads/hg18/wgEncodeHudsonalphaChipSeq/gbdb/wgEncodeHudsonalphaChipSeqRawSignalRep1K562ControlPcr2x.wib
lrwxrwxrwx 1 tdreszer protein 136 Feb 26 11:28 wgEncodeHudsonalphaChipSeqRawSignalRep1K562ControlV2.wib -> /hive/groups/encode/dcc/pipeline/downloads/hg18/wgEncodeHudsonalphaChipSeq/gbdb/wgEncodeHudsonalphaChipSeqRawSignalRep1K562ControlV2.wib
lrwxrwxrwx 1 tdreszer protein 139 Feb 26 12:05 wgEncodeHudsonalphaChipSeqRawSignalRep2K562ControlPcr2x.wib -> /hive/groups/encode/dcc/pipeline/downloads/hg18/wgEncodeHudsonalphaChipSeq/gbdb/wgEncodeHudsonalphaChipSeqRawSignalRep2K562ControlPcr2x.wib
lrwxrwxrwx 1 tdreszer protein 136 Feb 26 11:28 wgEncodeHudsonalphaChipSeqRawSignalRep2K562ControlV2.wib -> /hive/groups/encode/dcc/pipeline/downloads/hg18/wgEncodeHudsonalphaChipSeq/gbdb/wgEncodeHudsonalphaChipSeqRawSignalRep2K562ControlV2.wib

# and final confirmation
select file from wgEncodeHudsonalphaChipSeqRawSignalRep1Gm12878ControlPcr2x limit 1;
select file from wgEncodeHudsonalphaChipSeqRawSignalRep2Gm12878ControlPcr2x limit 1;
select file from wgEncodeHudsonalphaChipSeqRawSignalRep1K562ControlPcr2x limit 1;
select file from wgEncodeHudsonalphaChipSeqRawSignalRep2K562ControlPcr2x limit 1;

### Finally at thios point all wibs should be fine and the full list of tables and files should be complete.
# What remains to get HAIB TFSB in QA?
# Check the 3 wierdnesses (copied lines from above):
### All of replicate 1 but only tags for replicate 2
wgEncodeHudsonalphaChipSeqPeaksRep1Gm12878TafiiV2.broadPeak.gz                  cell=GM12878; antibody=TAF1; protocol=PCR1x; subId=422;
wgEncodeHudsonalphaChipSeqAlignmentsRep1Gm12878TafiiV2.tagAlign.gz              cell=GM12878; antibody=TAF1; protocol=PCR1x; subId=422;
wgEncodeHudsonalphaChipSeqRawDataRep2Gm12878Taf1Pcr1x.fastq.gz                  cell=GM12878; antibody=TAF1; protocol=PCR1x; subId=880;
wgEncodeHudsonalphaChipSeqAlignmentsRep2Gm12878TafiiV2.tagAlign.gz              cell=GM12878; antibody=TAF1; protocol=PCR1x; subId=422;

### Replicate 2 but no replicate one!
wgEncodeHudsonalphaChipSeqPeaksRep2Hepg2Srf.broadPeak.gz                        cell=HepG2; antibody=SRF; protocol=PCR1x; subId=432;
wgEncodeHudsonalphaChipSeqAlignmentsRep2Hepg2Srf.tagAlign.gz                    cell=HepG2; antibody=SRF; protocol=PCR1x; subId=432;

### Replicate 1 only
wgEncodeHudsonalphaChipSeqPeaksA549Gr.broadPeak.gz                                      cell=A549; antibody=GR; protocol=PCR1x; Peaks; replicate=1; subId=774;
wgEncodeHudsonalphaChipSeqAlignmentsA549Gr.tagAlign.gz                                  cell=A549; antibody=GR; protocol=PCR1x; Alignments; subId=774;

# Okay the Gm12878 TAF dilemma is that the newer "V2" was meant to be rep2 and the plade rep1
Currently the old subID=125 table does not exist

# Now bring in the peaks from 125
/cluster/bin/x86_64/hgLoadBed -noNameIx -sqlTable=/cluster/bin/sqlCreate/narrowPeak.sql -renameSqlTable -fillInScore=signalValue  hg18 wgEncodeHudsonalphaChipSeqPeaksRep1Gm12878Taf1 SL288_TAF250_GM12878_Rep1_peakcalls.narrowPeak
show tables like "wgEncodeHud%Gm12878%Taf%";
| wgEncodeHudsonalphaChipSeqPeaksRep1Gm12878Taf1        | 
| wgEncodeHudsonalphaChipSeqPeaksRep1Gm12878TafiiV2     | 
| wgEncodeHudsonalphaChipSeqRawSignalRep1Gm12878TafiiV2 | 
| wgEncodeHudsonalphaChipSeqRawSignalRep2Gm12878TafiiV2 | 

rename table wgEncodeHudsonalphaChipSeqPeaksRep1Gm12878TafiiV2 to wgEncodeHudsonalphaChipSeqPeaksRep2Gm12878Taf1;
rename table wgEncodeHudsonalphaChipSeqRawSignalRep1Gm12878TafiiV2 to wgEncodeHudsonalphaChipSeqRawSignalRep1Gm12878Taf1;
rename table wgEncodeHudsonalphaChipSeqRawSignalRep2Gm12878TafiiV2 to wgEncodeHudsonalphaChipSeqRawSignalRep2Gm12878Taf1;
update wgEncodeHudsonalphaChipSeqRawSignalRep1Gm12878Taf1 set file = "/gbdb/hg18/wib/wgEncodeHudsonalphaChipSeqRawSignalRep1Gm12878Taf1"; 
update wgEncodeHudsonalphaChipSeqRawSignalRep2Gm12878Taf1 set file = "/gbdb/hg18/wib/wgEncodeHudsonalphaChipSeqRawSignalRep2Gm12878Taf1"; 
show tables like "wgEncodeHud%Gm12878%Taf%";
| wgEncodeHudsonalphaChipSeqPeaksRep1Gm12878Taf1     | 
| wgEncodeHudsonalphaChipSeqPeaksRep2Gm12878Taf1     | 
| wgEncodeHudsonalphaChipSeqRawSignalRep1Gm12878Taf1 | 
| wgEncodeHudsonalphaChipSeqRawSignalRep2Gm12878Taf1 |
cd {downloadDir} 
mv wgEncodeHudsonalphaChipSeqAlignmentsRep1Gm12878TafiiV2.tagAlign.gz wgEncodeHudsonalphaChipSeqAlignmentsRep1Gm12878Taf1.tagAlign.gz
mv wgEncodeHudsonalphaChipSeqAlignmentsRep2Gm12878TafiiV2.tagAlign.gz wgEncodeHudsonalphaChipSeqAlignmentsRep2Gm12878Taf1.tagAlign.gz
mv wgEncodeHudsonalphaChipSeqPeaksRep1Gm12878TafiiV2.broadPeak.gz wgEncodeHudsonalphaChipSeqPeaksRep2Gm12878Taf1.broadPeak.gz
ln release1/wgEncodeHudsonalphaChipSeqPeaksRep1Gm12878Tafii.narrowPeak.gz .
ll wgEncodeHud*Gm12878*Taf*.gz-rw-rw-r-- 2 qateam protein 328254336 Jul 21  2009 wgEncodeHudsonalphaChipSeqAlignmentsRep1Gm12878Taf1.tagAlign.gz
-rw-rw-r-- 2 qateam protein 445130648 Jul 21  2009 wgEncodeHudsonalphaChipSeqAlignmentsRep2Gm12878Taf1.tagAlign.gz
-rw-rw-r-- 2 larrym protein     32995 Dec 11  2008 wgEncodeHudsonalphaChipSeqPeaksRep1Gm12878Tafii.narrowPeak.gz
-rw-rw-r-- 2 qateam protein     75070 Jul 21  2009 wgEncodeHudsonalphaChipSeqPeaksRep2Gm12878Taf1.broadPeak.gz
-rw-rw-r-- 3 qateam protein 883963837 Dec 23 12:02 wgEncodeHudsonalphaChipSeqRawDataRep2Gm12878Taf1Pcr1x.fastq.gz

lrwxrwxrwx 1 braney protein 137 Feb 25 14:34 /gbdb/hg18/wib/wgEncodeHudsonalphaChipSeqRawSignalRep1Gm12878TafiiV2.wib -> /hive/groups/encode/dcc/pipeline/downloads/hg18/wgEncodeHudsonalphaChipSeq/gbdb/wgEncodeHudsonalphaChipSeqRawSignalRep1Gm12878TafiiV2.wib
lrwxrwxrwx 1 braney protein 137 Feb 25 14:34 /gbdb/hg18/wib/wgEncodeHudsonalphaChipSeqRawSignalRep2Gm12878TafiiV2.wib -> /hive/groups/encode/dcc/pipeline/downloads/hg18/wgEncodeHudsonalphaChipSeq/gbdb/wgEncodeHudsonalphaChipSeqRawSignalRep2Gm12878TafiiV2.wib
lrwxrwxrwx 1 braney protein 139 Feb 25 14:34 /gbdb/hg18/wib/wgEncodeHudsonalphaChipSeqRawSignalRep2Gm12878Tafii_422.wib -> /hive/groups/encode/dcc/pipeline/downloads/hg18/wgEncodeHudsonalphaChipSeq/gbdb/wgEncodeHudsonalphaChipSeqRawSignalRep2Gm12878Tafii_422.wib

cd /hive/groups/encode/dcc/pipeline/downloads/hg18/wgEncodeHudsonalphaChipSeq/gbdb/
mv wgEncodeHudsonalphaChipSeqRawSignalRep1Gm12878TafiiV2.wib wgEncodeHudsonalphaChipSeqRawSignalRep1Gm12878Taf1.wib
mv wgEncodeHudsonalphaChipSeqRawSignalRep2Gm12878TafiiV2.wib wgEncodeHudsonalphaChipSeqRawSignalRep2Gm12878Taf1.wib
rm wgEncodeHudsonalphaChipSeqRawSignalRep2Gm12878Tafii_422.wib
ll wgEncodeHud*Gm12878*Taf*.wib
-rw-rw-r-- 2 qateam protein 2101647574 Jul 21  2009 wgEncodeHudsonalphaChipSeqRawSignalRep1Gm12878Taf1.wib
-rw-rw-r-- 2 qateam protein 2386275390 Jul 21  2009 wgEncodeHudsonalphaChipSeqRawSignalRep2Gm12878Taf1.wib

cd /gbdb/hg18/wib
rm wgEncodeHudsonalphaChipSeqRawSignalRep2Gm12878Tafii_422.wib
rm wgEncodeHudsonalphaChipSeqRawSignalRep1Gm12878TafiiV2.wib 
rm wgEncodeHudsonalphaChipSeqRawSignalRep2Gm12878TafiiV2.wib
ln -sf /hive/groups/encode/dcc/pipeline/downloads/hg18/wgEncodeHudsonalphaChipSeq/gbdb/wgEncodeHudsonalphaChipSeqRawSignalRep1Gm12878Taf1.wib wgEncodeHudsonalphaChipSeqRawSignalRep1Gm12878Taf1.wib
ln -sf /hive/groups/encode/dcc/pipeline/downloads/hg18/wgEncodeHudsonalphaChipSeq/gbdb/wgEncodeHudsonalphaChipSeqRawSignalRep2Gm12878Taf1.wib wgEncodeHudsonalphaChipSeqRawSignalRep2Gm12878Taf1.wib
ll wgEncodeHud*Gm12878*Taf*.wib
lrwxrwxrwx 1 tdreszer protein 134 Feb 26 16:05 wgEncodeHudsonalphaChipSeqRawSignalRep1Gm12878Taf1.wib -> /hive/groups/encode/dcc/pipeline/downloads/hg18/wgEncodeHudsonalphaChipSeq/gbdb/wgEncodeHudsonalphaChipSeqRawSignalRep1Gm12878Taf1.wib
lrwxrwxrwx 1 tdreszer protein 134 Feb 26 16:05 wgEncodeHudsonalphaChipSeqRawSignalRep2Gm12878Taf1.wib -> /hive/groups/encode/dcc/pipeline/downloads/hg18/wgEncodeHudsonalphaChipSeq/gbdb/wgEncodeHudsonalphaChipSeqRawSignalRep2Gm12878Taf1.wib

# Now patch trackDb.wgEncode.ra

### problems left:
1) HepG2/SRF with rep 2 only.
2) A549/GR/None with rep 1 only
3) A549/GR/* with screwy input associations.  May have to add input variable to ALL metadata.

## Problems with A549 all around!
A549/Input/EtOH0.02pct SL475(subId=901) found, SL307(subId=813)  Where is this??  Found, marked as rep2  Get this fixed!!!
rename table wgEncodeHudsonalphaChipSeqRawSignalRep2A549ControlPcr2xEtoh02 to wgEncodeHudsonalphaChipSeqRawSignalRep1A549ControlPcr2xEtoh02;
update wgEncodeHudsonalphaChipSeqRawSignalRep1A549ControlPcr2xEtoh02 set file = "/gbdb/hg18/wib/wgEncodeHudsonalphaChipSeqRawSignalRep1A549ControlPcr2xEtoh02.wib";
cd /hive/groups/encode/dcc/pipeline/downloads/hg18/wgEncodeHudsonalphaChipSeq/gbdb/
mv wgEncodeHudsonalphaChipSeqRawSignalRep2A549ControlPcr2xEtoh02.wib wgEncodeHudsonalphaChipSeqRawSignalRep1A549ControlPcr2xEtoh02.wib
cd /gbdb/hg18/wib/
rm wgEncodeHudsonalphaChipSeqRawSignalRep2A549ControlPcr2xEtoh02.wib
ln -sf /hive/groups/encode/dcc/pipeline/downloads/hg18/wgEncodeHudsonalphaChipSeq/gbdb/wgEncodeHudsonalphaChipSeqRawSignalRep1A549ControlPcr2xEtoh02.wib wgEncodeHudsonalphaChipSeqRawSignalRep1A549ControlPcr2xEtoh02.wib
cd {downloadsDir}
mv wgEncodeHudsonalphaChipSeqAlignmentsRep2A549ControlPcr2xEtoh02.tagAlign.gz wgEncodeHudsonalphaChipSeqAlignmentsRep1A549ControlPcr2xEtoh02.tagAlign.gz
cd release2
rm wgEncodeHudsonalphaChipSeqAlignmentsRep2A549ControlPcr2xEtoh02.tagAlign.gz
ln ../wgEncodeHudsonalphaChipSeqAlignmentsRep1A549ControlPcr2xEtoh02.tagAlign.gz .

# subId=801 has SL878 and SL879 which should be A549/GR/EtOH0.02pct/PCR1x rep 1 and 2
doEncodeValidate.pl -quick x /cluster/data/encode/pipeline/encpipeline_prod/801
doEncodeLoad.pl x /cluster/data/encode/pipeline/encpipeline_prod/801 > load_error 2>&1 &
cd {downloadsDir}
ll wgEncodeHudsonalphaChipSeq*A549GrPcr1xEtoh02.*.gz
lrwxrwxrwx 1 tdreszer protein         70 Mar  1 16:20 wgEncodeHudsonalphaChipSeqRawDataRep2A549GrPcr1xEtoh02.fastq.gz -> /cluster/data/encode/pipeline/encpipeline_prod/801/data/SL879.fastq.gz
-rw-rw-r-- 1 tdreszer protein  395159252 Mar  1 16:24 wgEncodeHudsonalphaChipSeqAlignmentsRep1A549GrPcr1xEtoh02.tagAlign.gz
lrwxrwxrwx 1 tdreszer protein         70 Mar  1 16:24 wgEncodeHudsonalphaChipSeqRawDataRep1A549GrPcr1xEtoh02.fastq.gz -> /cluster/data/encode/pipeline/encpipeline_prod/801/data/SL878.fastq.gz
-rw-rw-r-- 1 tdreszer protein  401648848 Mar  1 16:28 wgEncodeHudsonalphaChipSeqAlignmentsRep2A549GrPcr1xEtoh02.tagAlign.gz
mv /cluster/data/encode/pipeline/encpipeline_prod/801/data/SL879.fastq.gz wgEncodeHudsonalphaChipSeqRawDataRep2A549GrPcr1xEtoh02.fastq.gz
mv /cluster/data/encode/pipeline/encpipeline_prod/801/data/SL878.fastq.gz wgEncodeHudsonalphaChipSeqRawDataRep1A549GrPcr1xEtoh02.fastq.gz
-rw-rw-r-- 1 tdreszer protein  395159252 Mar  1 16:24 wgEncodeHudsonalphaChipSeqAlignmentsRep1A549GrPcr1xEtoh02.tagAlign.gz
-rw-rw-r-- 1 tdreszer protein  401648848 Mar  1 16:28 wgEncodeHudsonalphaChipSeqAlignmentsRep2A549GrPcr1xEtoh02.tagAlign.gz
-rw-rw-r-- 1 qateam   protein 1098196387 Nov 30 07:20 wgEncodeHudsonalphaChipSeqRawDataRep1A549GrPcr1xEtoh02.fastq.gz
-rw-rw-r-- 1 qateam   protein 1128076619 Nov 30 07:26 wgEncodeHudsonalphaChipSeqRawDataRep2A549GrPcr1xEtoh02.fastq.gz
cd release2/
ln ../wgEncodeHudsonalphaChipSeq*A549GrPcr1xEtoh02.*.gz 
cd {pip}/801

### Ouch!  Just lost tables:
wgEncodeHudsonalphaChipSeqPeaksRep1A549GrPcr1xDex5nm
wgEncodeHudsonalphaChipSeqPeaksRep2A549GrPcr1xDex5nm
wgEncodeHudsonalphaChipSeqRawSignalRep1A549GrPcr1xDex5nm
wgEncodeHudsonalphaChipSeqRawSignalRep2A549GrPcr1xDex5nm
clusterAdmin (Victory) helped me.
grep metadata /hive/groups/encode/dcc/pipeline/encpipeline_prod/801/out/fileDb.ra | grep parentTable >> fileDb.ra
encodeDownloadsPage.pl index.html .
cp index.html release2/
cp preamble.html release2/
cp fileDb.ra release2/
cp files.txt release2/
### Be sure and straighten this out as input when Tim Reddy straightens it out!!!

### What is left?
1) HepG2/SRF with rep 2 only.
2) A549/GR/None is all screwy!!!  Mixed test and controls in submission  Tim Reddy confirms that these are actually as they should be
3) A549/GR/* with screwy input associations.  May have to add input variable to ALL metadata.  Additionally subId=774 has unloaded SL787

# Fix HepG2/SRF with rep 2 only: Rename to rep1
cd {downloadsDir}
 ~/bin/scripts/encRenameWig.sh . wgEncodeHudsonalphaChipSeqRawSignalRep2Hepg2Srf wgEncodeHudsonalphaChipSeqRawSignalRep1Hepg2Srf
in       /usr/local/apache/htdocs/goldenPath/hg18/encodeDCC/wgEncodeHudsonalphaChipSeq
moved    wgEncodeHudsonalphaChipSeqAlignmentsRep2Hepg2Srf.tagAlign.gz wgEncodeHudsonalphaChipSeqAlignmentsRep1Hepg2Srf.tagAlign.gz
in       /hive/groups/encode/dcc/pipeline/downloads/hg18/wgEncodeHudsonalphaChipSeq/gbdb
moved    wgEncodeHudsonalphaChipSeqRawSignalRep2Hepg2Srf.wib wgEncodeHudsonalphaChipSeqRawSignalRep1Hepg2Srf.wib
removed   /gbdb/hg18/wib/wgEncodeHudsonalphaChipSeqRawSignalRep2Hepg2Srf.wib
in       /gbdb/hg18/wib
created  wgEncodeHudsonalphaChipSeqRawSignalRep1Hepg2Srf.wib
link to  /hive/groups/encode/dcc/pipeline/downloads/hg18/wgEncodeHudsonalphaChipSeq/gbdb/wgEncodeHudsonalphaChipSeqRawSignalRep1Hepg2Srf.wib
renamed  wgEncodeHudsonalphaChipSeqRawSignalRep2Hepg2Srf to wgEncodeHudsonalphaChipSeqRawSignalRep1Hepg2Srf
updated  wgEncodeHudsonalphaChipSeqRawSignalRep1Hepg2Srf to point to /gbdb/hg18/wib/wgEncodeHudsonalphaChipSeqRawSignalRep1Hepg2Srf.wib
Done.  Be sure to update metadata and trackDb.
rename table wgEncodeHudsonalphaChipSeqPeaksRep2Hepg2Srf to wgEncodeHudsonalphaChipSeqPeaksRep1Hepg2Srf;
mv wgEncodeHudsonalphaChipSeqPeaksRep2Hepg2Srf.broadPeak.gz wgEncodeHudsonalphaChipSeqPeaksRep1Hepg2Srf.broadPeak.gz
cd release2/
rm wgEncodeHudsonalphaChipSeq*Hepg2Srf*
ln ../wgEncodeHudsonalphaChipSeq*Hepg2Srf* .
cd ..
e fileDb.ra to point to rep1
e trackDb.wgEncode.ra to point to rep1
make alpha DBS=hg18
encodeDownloadsPage.pl index.html
# confirmed fix

2010-03-26 Special for garbled tagAligns
========================================
cd pip/741
tar -tzf ../../ftp/prod/rrauch/GM-Control.tar.gz
SL516.TagAlign
SL517.TagAlign
mkdir late;cd late
mv ../../../ftp/prod/rrauch/GM-Control.tar.gz .
tar -xzf GM-Control.tar.gz
e load.ra to remove all but 
wgEncodeHudsonalphaChipSeqAlignmentsRep1Gm12878Control
wgEncodeHudsonalphaChipSeqAlignmentsRep2Gm12878Control
wgEncodeHudsonalphaChipSeqRawSignalRep1Gm12878Control
wgEncodeHudsonalphaChipSeqRawSignalRep2Gm12878Control
# unfortunately, I will need to reload to make the RawSig, which means regenerating the autoRaw.beds !
/cluster/bin/x86_64/bedExtendRanges hg18 225 late/SL516.TagAlign | sort -S 5G -T /data/tmp -k1,1 -k2,2n - | grep -v -E "^track" | bedItemOverlapCount hg18 stdin > manualRawSig.bed &
/cluster/bin/x86_64/bedExtendRanges hg18 225 late/SL516.TagAlign | sort -S 5G -T /data/tmp -k1,1 -k2,2n - | bedItemOverlapCount hg18 stdin > SL516rawSig.bed &
/cluster/bin/x86_64/bedExtendRanges hg18 225 late/SL517.TagAlign | sort -S 5G -T /data/tmp -k1,1 -k2,2n - | bedItemOverlapCount hg18 stdin > SL517rawSig.bed &
e load.ra # to be sure to point to rawSig.beds
cd dwnlds
mkdir save 
mv wgEncodeHudsonalphaChipSeq*Gm12878ControlV2.*.gz save
cd pip/741

~qateam/bin/scripts/doEncodeLoad.pl . /hive/groups/encode/dcc/pipeline/encpipeline_prod/741 > out/lateLoad.out &
// of course it is misnamed
rename table wgEncodeHudsonalphaChipSeqRawSignalRep1Gm12878ControlV2 to wgEncodeHudsonalphaChipSeqRawSignalRep1Gm12878ControlV2old; 
rename table wgEncodeHudsonalphaChipSeqRawSignalRep2Gm12878ControlV2 to wgEncodeHudsonalphaChipSeqRawSignalRep2Gm12878ControlV2old; 
rename table wgEncodeHudsonalphaChipSeqRawSignalRep1Gm12878Control to wgEncodeHudsonalphaChipSeqRawSignalRep1Gm12878ControlV2; 
rename table wgEncodeHudsonalphaChipSeqRawSignalRep2Gm12878Control to wgEncodeHudsonalphaChipSeqRawSignalRep2Gm12878ControlV2; 
select count(*) from wgEncodeHudsonalphaChipSeqRawSignalRep1Gm12878ControlV2;   |  2657945 | 
select count(*) from wgEncodeHudsonalphaChipSeqRawSignalRep1Gm12878ControlV2old;|  1328955 | 
select count(*) from wgEncodeHudsonalphaChipSeqRawSignalRep2Gm12878ControlV2;   |  2636311 | 
select count(*) from wgEncodeHudsonalphaChipSeqRawSignalRep2Gm12878ControlV2old;|  1235707 | 
select file from wgEncodeHudsonalphaChipSeqRawSignalRep1Gm12878ControlV2 limit 1;
/gbdb/hg18/wib/wgEncodeHudsonalphaChipSeqRawSignalRep1Gm12878Control.wib 
select file from wgEncodeHudsonalphaChipSeqRawSignalRep2Gm12878ControlV2 limit 1;
update wgEncodeHudsonalphaChipSeqRawSignalRep1Gm12878ControlV2 set file = "/gbdb/hg18/wib/wgEncodeHudsonalphaChipSeqRawSignalRep1Gm12878ControlV2.wib";
update wgEncodeHudsonalphaChipSeqRawSignalRep2Gm12878ControlV2 set file = "/gbdb/hg18/wib/wgEncodeHudsonalphaChipSeqRawSignalRep2Gm12878ControlV2.wib";
cd wib
ll wgEncodeHudsonalphaChipSeqRawSignalRep?Gm12878ControlV2.wib
lrwxrwxrwx 1 tdreszer protein 139 Feb 26 11:28 wgEncodeHudsonalphaChipSeqRawSignalRep1Gm12878ControlV2.wib -> /hive/groups/encode/dcc/pipeline/downloads/hg18/wgEncodeHudsonalphaChipSeq/gbdb/wgEncodeHudsonalphaChipSeqRawSignalRep1Gm12878ControlV2.wib
lrwxrwxrwx 1 tdreszer protein 139 Feb 26 11:28 wgEncodeHudsonalphaChipSeqRawSignalRep2Gm12878ControlV2.wib -> /hive/groups/encode/dcc/pipeline/downloads/hg18/wgEncodeHudsonalphaChipSeq/gbdb/wgEncodeHudsonalphaChipSeqRawSignalRep2Gm12878ControlV2.wib
ll wgEncodeHudsonalphaChipSeqRawSignalRep?Gm12878Control.wib
lrwxrwxrwx 1 tdreszer protein 111 Mar 26 15:32 wgEncodeHudsonalphaChipSeqRawSignalRep1Gm12878Control.wib -> /hive/groups/encode/dcc/pipeline/encpipeline_prod/741/wgEncodeHudsonalphaChipSeqRawSignalRep1Gm12878Control.wib
lrwxrwxrwx 1 tdreszer protein 111 Mar 26 15:49 wgEncodeHudsonalphaChipSeqRawSignalRep2Gm12878Control.wib -> /hive/groups/encode/dcc/pipeline/encpipeline_prod/741/wgEncodeHudsonalphaChipSeqRawSignalRep2Gm12878Control.wib
cd /hive/groups/encode/dcc/pipeline/downloads/hg18/wgEncodeHudsonalphaChipSeq/gbdb/
mv wgEncodeHudsonalphaChipSeqRawSignalRep?Gm12878ControlV2.wib old
mv /hive/groups/encode/dcc/pipeline/encpipeline_prod/741/wgEncodeHudsonalphaChipSeqRawSignalRep1Gm12878Control.wib /hive/groups/encode/dcc/pipeline/downloads/hg18/wgEncodeHudsonalphaChipSeq/gbdb/wgEncodeHudsonalphaChipSeqRawSignalRep1Gm12878ControlV2.wib 
mv /hive/groups/encode/dcc/pipeline/encpipeline_prod/741/wgEncodeHudsonalphaChipSeqRawSignalRep2Gm12878Control.wib /hive/groups/encode/dcc/pipeline/downloads/hg18/wgEncodeHudsonalphaChipSeq/gbdb/wgEncodeHudsonalphaChipSeqRawSignalRep2Gm12878ControlV2.wib 
cd /gbdb/hg18/wib 
ll wgEncodeHudsonalphaChipSeqRawSignalRep?Gm12878Control*.wib
rm wgEncodeHudsonalphaChipSeqRawSignalRep?Gm12878Control.wib
update wgEncodeHudsonalphaChipSeqRawSignalRep1Gm12878ControlV2 set file = "/gbdb/hg18/wib/wgEncodeHudsonalphaChipSeqRawSignalRep1Gm12878ControlV2.wib";
update wgEncodeHudsonalphaChipSeqRawSignalRep2Gm12878ControlV2 set file = "/gbdb/hg18/wib/wgEncodeHudsonalphaChipSeqRawSignalRep2Gm12878ControlV2.wib";
drop table wgEncodeHudsonalphaChipSeqRawSignalRep1Gm12878ControlV2old;
drop table wgEncodeHudsonalphaChipSeqRawSignalRep2Gm12878ControlV2old;
cd dwnldsDir
rm gbdb/old/*.wib
ll wgEncodeHudsonalphaChipSeq*Rep?Gm12878Control*.*.gz
mv wgEncodeHudsonalphaChipSeqAlignmentsRep1Gm12878Control.tagAlign.gz wgEncodeHudsonalphaChipSeqAlignmentsRep1Gm12878ControlV2.tagAlign.gz
mv wgEncodeHudsonalphaChipSeqAlignmentsRep2Gm12878Control.tagAlign.gz wgEncodeHudsonalphaChipSeqAlignmentsRep2Gm12878ControlV2.tagAlign.gz
mv wgEncodeHudsonalphaChipSeqRawSignalRep1Gm12878Control.wig.gz wgEncodeHudsonalphaChipSeqRawSignalRep1Gm12878ControlV2.wig.gz
mv wgEncodeHudsonalphaChipSeqRawSignalRep2Gm12878Control.wig.gz wgEncodeHudsonalphaChipSeqRawSignalRep2Gm12878ControlV2.wig.gz
cd release2/
ll wgEncodeHudsonalphaChipSeq*Rep?Gm12878ControlV2.*.gz
rm wgEncodeHudsonalphaChipSeq*Rep?Gm12878ControlV2.*.gz
ln ../wgEncodeHudsonalphaChipSeq*Rep?Gm12878ControlV2.*.gz .
cd ..
rm -rf /save
# Now all files should be updated and renamed properly!

### Rerunning encodeDownloadsPage with -checksum so be sure to copy md5sum.txt again


2010-04-12 Loadeing metaTbl for hg18
====================================
cd {tdb}
grep metadata trackdDb.wgencode.ra | grep Hudson | grep Chip > testing/metaHaibTfbs.txt
cd testing
# edit remove the dups
metaTblUpdate -db=hg18 metaHaibTfbs.txt
Using table named 'hg18.metaTbl_tdreszer'.
No obj found. This is not properly formatted metadata:
metadata project=wgEncode grant=Myers lab=HudsonAlpha dataType=ChipSeq cell=GM12878 protocol=PCR1x antibody=BATF type=wig fragLength=225 view=RawSignal replicate=2 labVersion=8 dataVersion="ENCODE Sep 2009 Freeze" subId=741 dateSubmitted=2009-10-26 dateUnrestricted=2010-07-26 composite=wgEncodeHudsonalphaChipSeq tableName=wgEncodeHudsonalphaChipSeqRawSignalRep2Gm12878Batf fileName=wgEncodeHudsonalphaChipSeqAlignmentsRep2Gm12878Batf.tagAlign.gz
# do file and tablename match??
wgEncodeHudsonalphaChipSeqRawSignalRep2Gm12878Batf 
wgEncodeHudsonalphaChipSeqAlignmentsRep2Gm12878Batf.tagAlign.gz
### Ouch!  The code doesn't handle the Alignments to RawSignal conversion!

~/bin/x86_64/metaTblUpdate -db=hg18 metaHaibTfbs.txt
Using table named 'hg18.metaTbl_tdreszer'.
Read 358 metadata objects from metaHaibTfbs.txt
Affected 6610 row(s) in hg18.metaTbl_tdreszer

# check in code change
metaTblUpdate -db=hg18 metaHaibTfbs.txt
Using table named 'hg18.metaTbl_tdreszer'.
Read 358 metadata objects from metaHaibTfbs.txt
Affected 0 row(s) in hg18.metaTbl_tdreszer
# notice 0 were affected because I just updated these.

cd {downloads}
metaTblUpdate -db=hg18 fileDb.ra
# needed to edity fileDb.ra to replace some tableName vars with parentTable vars
metaTblUpdate -db=hg18 fileDb.ra
Using table named 'hg18.metaTbl_tdreszer'.
Read 361 metadata objects from fileDb.ra
Affected 6192 row(s) in hg18.metaTbl_tdreszer

encodeDownloadsPage.pl -metaTbl=metaTbl_tdreszer meta.html .
encodeDownloadsPage.pl -noMetaTbl noMeta.html .
wl meta.html 
537 meta.html
wl noMeta.html 
537 noMeta.html
diff meta.html noMeta.html 
# identical!

cd {tdb}/testing
metaTblPrint -db=hg18 -vars="composite=wgEncodeHudsonalphaChipSeq" -ra > metaHaibTfbs.ra
Using table named 'hg18.metaTbl_tdreszer'.
objects:709  vars:12802

# expected 497 objects  Difference?  Must be versioned tables and files which were in fileDb.ra but are no longer in the downloads dir. 
# Clean extra entries?

# get downloads dir list
cd {downloads}
ls -1 *.gz | sort > ~/kent/src/hg/makeDb/trackDb/human/hg18/testing/tmp.txt

# get metaTbl list
cd {tdb}/testing
grep metaObject metaHaibTfbs.ra > tmp2.txt
# edit tmp.txt tmp2.txt to strip down to obj names
diff tmp.txt tmp2.txt > tmp3.txt
# edit tmp3.txt to strip down to obj names
wl tmp3.txt
212 tmp3.txt

#edit tmp3.txt as: metadata wgEncodeHudsonalphaChipSeqAlignmentsPfsk1Control delete
metaTblUpdate -db=hg18 tmp3.txt
Affected 3999 row(s) in hg18.metaTbl_tdreszer

metaTblPrint -db=hg18 -vars="composite=wgEncodeHudsonalphaChipSeq" -ra > metaHaibTfbs.ra
Using table named 'hg18.metaTbl_tdreszer'.
objects:497  vars:8803

metaTblUpdate -db=hg18 -table=metaTbl metaHaibTfbs.ra
Read 497 metadata objects from metaHaibTfbs.ra
Affected 8803 row(s) in hg18.metaTbl

metaTblUpdate -db=hg18 vars="tableName=" -delete
Using table named 'hg18.metaTbl_tdreszer'.
Affected 13965 row(s) in hg18.metaTbl_tdreszer

metaTblPrint -db=hg18 -vars="composite=wgEncodeHudsonalphaChipSeq" -ra > metaHaibTfbs.ra
Using table named 'hg18.metaTbl_tdreszer'.
objects:333  vars:5870
### Screwed something up.  Return to first principles:

metaTblUpdate -db=hg18 fileDb.ra -replace
 Using table named 'hg18.metaTbl_tdreszer'.
 Read 361 metadata objects from fileDb.ra
 Affected 12238 row(s) in hg18.metaTbl_tdreszer
metaTblUpdate -db=hg18 metaHaibTfbs.txt -replace
 Using table named 'hg18.metaTbl_tdreszer'.
 Read 358 metadata objects from metaHaibTfbs.txt
 Affected 6796 row(s) in hg18.metaTbl_tdreszer
metaTblUpdate -db=hg18 tmp3.txt
 Using table named 'hg18.metaTbl_tdreszer'.
 Read 212 metadata objects from tmp3.txt
 Affected 3993 row(s) in hg18.metaTbl_tdreszer
metaTblPrint -db=hg18 -vars="composite=wgEncodeHudsonalphaChipSeq" -ra > metaHaibTfbs.ra
 Using table named 'hg18.metaTbl_tdreszer'.
 objects:497  vars:8799
## Okay back to normal for HAIB, Now fix Yale, Broad and OpenChrom

metaTblUpdate -db=hg18 metaYaleTfbs.ra -replace
 Using table named 'hg18.metaTbl_tdreszer'.
 Read 1073 metadata objects from metaYaleTfbs.ra
 Affected 31803 row(s) in hg18.metaTbl_tdreszer
metaTblUpdate -db=hg18 metaBroad.ra -replace
 Using table named 'hg18.metaTbl_tdreszer'.
 Read 177 metadata objects from metaBroad.ra
 Affected 2562 row(s) in hg18.metaTbl_tdreszer
metaTblUpdate -db=hg18 metaOpenChrom.ra -replace
 Using table named 'hg18.metaTbl_tdreszer'.
 Read 615 metadata objects from metaOpenChrom.ra
 Affected 15361 row(s) in hg18.metaTbl_tdreszer

## So how would I delete all of those tableNames??

2010-04-20 Fix 'input' once and for all ??
==========================================
Wroking on:
mdbPrint hg18 -vars="composite=wgEncodeHudsonalphaChipSeq input!=true" > haibInpUpdate.txt
mdbUpdate hg18 -vars="composite=wgEncodeHudsonalphaChipSeq treatment!=" -var=treatment -val=None -test -verbose=2
Doesn't work.

select distinct var,val from mdb_tdreszer where obj like "wgEncodeHudsonalpha%" and var in ("cell","treatment","antibody","protocol","input");
+-----------+--------------------+
| var       | val                |
+-----------+--------------------+
| antibody  | BATF               | 
| antibody  | BCL11A             | 
| antibody  | BCL3               | 
| antibody  | BHLHE40            | 
| antibody  | CTCF               | 
| antibody  | EBF                | 
| antibody  | Egr-1              | 
| antibody  | FOSL2              | 
| antibody  | FOXP2              | 
| antibody  | GABP               | 
| antibody  | GR                 | 
| antibody  | HEY1               | 
| antibody  | IRF4               | 
| antibody  | Input              | 
| antibody  | JunD               | 
| antibody  | NRSF               | 
| antibody  | PAX5-C20           | 
| antibody  | PAX5-N19           | 
| antibody  | POU2F2             | 
| antibody  | PU.1               | 
| antibody  | Pbx3               | 
| antibody  | Pol2               | 
| antibody  | Pol2-4H8           | 
| antibody  | RXRA               | 
| antibody  | SIX5               | 
| antibody  | SP1                | 
| antibody  | SRF                | 
| antibody  | Sin3Ak-20          | 
| antibody  | TAF1               | 
| antibody  | TCF12              | 
| antibody  | USF-1              | 
| antibody  | ZBTB33             | 
| antibody  | p300               | 
| cell      | A549               | 
| cell      | BE2_C              | 
| cell      | GM12878            | 
| cell      | GM12891            | 
| cell      | GM12892            | 
| cell      | H1-hESC            | 
| cell      | HeLa-S3            | 
| cell      | HepG2              | 
| cell      | Jurkat             | 
| cell      | K562               | 
| cell      | PANC-1             | 
| cell      | PFSK-1             | 
| cell      | SK-N-MC            | 
| cell      | SK-N-SH_RA         | 
| cell      | U87                | 
| Input     | A549/EtOH/GR/PCR1x | 
| Input     | PCR2x              | 
| Input     | Std                | 
| Input     | true               | 
| protocol  | PCR1x              | 
| protocol  | PCR2x              | 
| treatment | DEX_100nM          | 
| treatment | DEX_500pM          | 
| treatment | DEX_50nM           | 
| treatment | DEX_5nM            | 
| treatment | EtOH_0.02pct       | 
+-----------+--------------------+
59 rows in set (0.11 sec)

select distinct t1.val,t2.val,t3.val,t4.val from mdb_tdreszer t1,mdb_tdreszer t2,mdb_tdreszer t3,mdb_tdreszer t4 where t1.obj = t2.obj and t2.obj = t3.obj and t3.obj = t4.obj
 and t1.var = "cell" and t2.var = "treatment" and t3.var = "antibody" and t4.var = "protocol";
+------+--------------+-------+-------+
| val  | val          | val   | val   |
+------+--------------+-------+-------+
| A549 | DEX_100nM    | Input | PCR1x | 
| A549 | DEX_100nM    | CTCF  | PCR1x | 
| A549 | DEX_100nM    | Pol2  | PCR2x | 
| A549 | DEX_100nM    | USF-1 | PCR1x | 
| A549 | DEX_500pM    | GR    | PCR1x | 
| A549 | DEX_50nM     | GR    | PCR1x | 
| A549 | DEX_5nM      | GR    | PCR1x | 
| A549 | EtOH_0.02pct | Input | PCR1x | 
| A549 | EtOH_0.02pct | Input | PCR2x | 
| A549 | EtOH_0.02pct | CTCF  | PCR1x | 
| A549 | EtOH_0.02pct | GR    | PCR1x | 
| A549 | EtOH_0.02pct | Pol2  | PCR2x | 
| A549 | EtOH_0.02pct | USF-1 | PCR1x | 
+------+--------------+-------+-------+
13 rows in set (0.05 sec)
### won't work because lots of HAIB objs don't have treatment or protocol
# Plan: print current mdb, update all haib objs to have default treatment=None and default protocol = PCR1x, THEN reupdate with current settings in file
 mdbPrint hg18 -vars="grant=Myers" -ra > mdbHaib.ra
 mdbUpdate hg18 -vars="grant=Myers" -var=treatment -val=None -test
 mdbUpdate hg18 -vars="grant=Myers" -var=protocol -val=PCR1x -test
 mdbUpdate hg18 mdbHaib.ra

select distinct t1.val,t2.val,t3.val,t4.val from mdb_tdreszer t1,mdb_tdreszer t2,mdb_tdreszer t3,mdb_tdreszer t4 where t1.obj = t2.obj and t2.obj = t3.obj and t3.obj = t4.obj
 and t1.var = "cell" and t2.var = "treatment" and t3.var = "antibody" and t4.var = "protocol";
105 rows in set (0.08 sec)
# in business!

select distinct t1.val,t2.val,t3.val,t4.val,t5.val from mdb_tdreszer t1,mdb_tdreszer t2,mdb_tdreszer t3,mdb_tdreszer t4,mdb_tdreszer t5 where t1.obj like "wgEncodeHudson%"
 and t1.obj = t2.obj and t2.obj = t3.obj and t3.obj = t4.obj and t4.obj = t5.obj
 and t1.var = "cell" and t2.var = "treatment" and t3.var = "antibody" and t4.var = "protocol" and t5.var = "input"
 order by t1.val,t2.val,t3.val,t4.val,t5.val;
+------------+--------------+-----------+-------+--------------------+
| val        | val          | val       | val   | val                |
+------------+--------------+-----------+-------+--------------------+
| A549       | DEX_100nM    | CTCF      | PCR1x | Std                | 
| A549       | DEX_100nM    | Input     | PCR1x | true               | 
| A549       | DEX_100nM    | Pol2      | PCR2x | PCR2x              | 
| A549       | DEX_100nM    | USF-1     | PCR1x | Std                | 
| A549       | DEX_500pM    | GR        | PCR1x | A549/EtOH/GR/PCR1x | 
| A549       | DEX_50nM     | GR        | PCR1x | A549/EtOH/GR/PCR1x | 
| A549       | DEX_5nM      | GR        | PCR1x | A549/EtOH/GR/PCR1x | 
| A549       | EtOH_0.02pct | CTCF      | PCR1x | Std                | 
| A549       | EtOH_0.02pct | GR        | PCR1x | true               | 
| A549       | EtOH_0.02pct | Input     | PCR1x | true               | 
| A549       | EtOH_0.02pct | Input     | PCR2x | true               | 
| A549       | EtOH_0.02pct | Pol2      | PCR2x | PCR2x              | 
| A549       | EtOH_0.02pct | USF-1     | PCR1x | Std                | 
| A549       | None         | GR        | PCR1x | Std                | 
| A549       | None         | Input     | PCR1x | true               | 
| BE2_C      | None         | Input     | PCR1x | true               | 
| BE2_C      | None         | NRSF      | PCR1x | Std                | 
| GM12878    | None         | BATF      | PCR1x | Std                | 
| GM12878    | None         | BCL11A    | PCR1x | Std                | 
| GM12878    | None         | BCL3      | PCR1x | Std                | 
| GM12878    | None         | EBF       | PCR1x | Std                | 
| GM12878    | None         | Egr-1     | PCR2x | PCR2x              | 
| GM12878    | None         | GABP      | PCR2x | PCR2x              | 
| GM12878    | None         | IRF4      | PCR1x | Std                | 
| GM12878    | None         | Input     | PCR1x | true               | 
| GM12878    | None         | Input     | PCR2x | true               | 
| GM12878    | None         | NRSF      | PCR2x | PCR2x              | 
| GM12878    | None         | PAX5-C20  | PCR1x | Std                | 
| GM12878    | None         | PAX5-N19  | PCR1x | Std                | 
| GM12878    | None         | POU2F2    | PCR1x | Std                | 
| GM12878    | None         | PU.1      | PCR1x | Std                | 
| GM12878    | None         | Pbx3      | PCR1x | Std                | 
| GM12878    | None         | Pol2      | PCR2x | PCR2x              | 
| GM12878    | None         | Pol2-4H8  | PCR1x | Std                | 
| GM12878    | None         | SP1       | PCR1x | Std                | 
| GM12878    | None         | SRF       | PCR2x | PCR2x              | 
| GM12878    | None         | Sin3Ak-20 | PCR2x | PCR2x              | 
| GM12878    | None         | TAF1      | PCR1x | Std                | 
| GM12878    | None         | TCF12     | PCR1x | Std                | 
| GM12878    | None         | USF-1     | PCR2x | PCR2x              | 
| GM12878    | None         | ZBTB33    | PCR1x | Std                | 
| GM12878    | None         | p300      | PCR1x | Std                | 
| GM12891    | None         | Input     | PCR1x | true               | 
| GM12891    | None         | POU2F2    | PCR1x | Std                | 
| GM12891    | None         | PU.1      | PCR1x | Std                | 
| GM12891    | None         | Pol2      | PCR1x | Std                | 
| GM12891    | None         | Pol2-4H8  | PCR1x | Std                | 
| GM12891    | None         | TAF1      | PCR1x | Std                | 
| GM12892    | None         | Input     | PCR1x | true               | 
| GM12892    | None         | Pol2      | PCR1x | Std                | 
| GM12892    | None         | Pol2-4H8  | PCR1x | Std                | 
| GM12892    | None         | TAF1      | PCR1x | Std                | 
| H1-hESC    | None         | Input     | PCR1x | true               | 
| H1-hESC    | None         | NRSF      | PCR1x | Std                | 
| H1-hESC    | None         | Pol2      | PCR1x | Std                | 
| H1-hESC    | None         | Pol2-4H8  | PCR1x | Std                | 
| H1-hESC    | None         | TAF1      | PCR1x | Std                | 
| HeLa-S3    | None         | GABP      | PCR1x | Std                | 
| HeLa-S3    | None         | Input     | PCR1x | true               | 
| HeLa-S3    | None         | Pol2      | PCR1x | Std                | 
| HeLa-S3    | None         | TAF1      | PCR1x | Std                | 
| HepG2      | None         | BHLHE40   | PCR1x | Std                | 
| HepG2      | None         | FOSL2     | PCR1x | Std                | 
| HepG2      | None         | GABP      | PCR1x | Std                | 
| HepG2      | None         | GABP      | PCR2x | PCR2x              | 
| HepG2      | None         | HEY1      | PCR1x | Std                | 
| HepG2      | None         | Input     | PCR1x | true               | 
| HepG2      | None         | JunD      | PCR1x | Std                | 
| HepG2      | None         | NRSF      | PCR1x | Std                | 
| HepG2      | None         | Pol2      | PCR1x | Std                | 
| HepG2      | None         | RXRA      | PCR1x | Std                | 
| HepG2      | None         | SRF       | PCR1x | Std                | 
| HepG2      | None         | Sin3Ak-20 | PCR1x | Std                | 
| HepG2      | None         | TAF1      | PCR1x | Std                | 
| HepG2      | None         | USF-1     | PCR1x | Std                | 
| HepG2      | None         | ZBTB33    | PCR1x | Std                | 
| HepG2      | None         | p300      | PCR1x | Std                | 
| Jurkat     | None         | Input     | PCR2x | true               | 
| Jurkat     | None         | Pol2      | PCR2x | PCR2x              | 
| K562       | None         | Egr-1     | PCR2x | PCR2x              | 
| K562       | None         | GABP      | PCR2x | PCR2x              | 
| K562       | None         | HEY1      | PCR1x | Std                | 
| K562       | None         | Input     | PCR1x | true               | 
| K562       | None         | Input     | PCR2x | true               | 
| K562       | None         | NRSF      | PCR2x | PCR2x              | 
| K562       | None         | PU.1      | PCR1x | Std                | 
| K562       | None         | Pol2      | PCR2x | PCR2x              | 
| K562       | None         | Pol2-4H8  | PCR1x | Std                | 
| K562       | None         | SIX5      | PCR1x | Std                | 
| K562       | None         | SRF       | PCR2x | PCR2x              | 
| K562       | None         | Sin3Ak-20 | PCR2x | PCR2x              | 
| K562       | None         | TAF1      | PCR1x | Std                | 
| K562       | None         | USF-1     | PCR2x | PCR2x              | 
| PANC-1     | None         | Input     | PCR1x | true               | 
| PANC-1     | None         | NRSF      | PCR1x | Std                | 
| PANC-1     | None         | NRSF      | PCR2x | PCR2x              | 
| PFSK-1     | None         | FOXP2     | PCR1x | Std                | 
| PFSK-1     | None         | Input     | PCR1x | true               | 
| PFSK-1     | None         | NRSF      | PCR1x | Std                | 
| SK-N-MC    | None         | FOXP2     | PCR1x | Std                | 
| SK-N-MC    | None         | Input     | PCR1x | true               | 
| SK-N-SH_RA | None         | Input     | PCR1x | true               | 
| SK-N-SH_RA | None         | NRSF      | PCR1x | Std                | 
| U87        | None         | Input     | PCR1x | true               | 
| U87        | None         | NRSF      | PCR1x | Std                | 
+------------+--------------+-----------+-------+--------------------+
105 rows in set (0.11 sec)

# allows me to create these following commands:
mdbUpdate hg18 -vars="cell=A549 treatment=DEX_100nM antibody=CTCF protocol=PCR1x" -var=input -val=A549/DEX_100nM/Input/PCR1x
mdbUpdate hg18 -vars="cell=A549 treatment=DEX_100nM antibody=Pol2 protocol=PCR2x" -var=input -val=A549/DEX_100nM/Input/PCR1x
mdbUpdate hg18 -vars="cell=A549 treatment=DEX_100nM antibody=USF-1 protocol=PCR1x" -var=input -val=A549/DEX_100nM/Input/PCR1x
mdbUpdate hg18 -vars="cell=A549 treatment=EtOH_0.02pct antibody=CTCF protocol=PCR1x" -var=input -val=A549/EtOH/Input/PCR1x
mdbUpdate hg18 -vars="cell=A549 treatment=EtOH_0.02pct antibody=Pol2 protocol=PCR2x" -var=input -val=A549/EtOH/Input/PCR2x
mdbUpdate hg18 -vars="cell=A549 treatment=EtOH_0.02pct antibody=USF-1 protocol=PCR1x" -var=input -val=A549/EtOH/Input/PCR1x
mdbUpdate hg18 -vars="cell=A549 treatment=None antibody=GR protocol=PCR1x" -var=input -val=A549/None/Input/PCR1x
mdbUpdate hg18 -vars="cell=BE2_C treatment=None antibody=NRSF protocol=PCR1x" -var=input -val=BE2_C/None/Input/PCR1x
mdbUpdate hg18 -vars="cell=GM12878 treatment=None antibody=BATF protocol=PCR1x" -var=input -val=GM12878/None/Input/PCR1x
mdbUpdate hg18 -vars="cell=GM12878 treatment=None antibody=BCL11A protocol=PCR1x" -var=input -val=GM12878/None/Input/PCR1x
mdbUpdate hg18 -vars="cell=GM12878 treatment=None antibody=BCL3 protocol=PCR1x" -var=input -val=GM12878/None/Input/PCR1x
mdbUpdate hg18 -vars="cell=GM12878 treatment=None antibody=EBF protocol=PCR1x" -var=input -val=GM12878/None/Input/PCR1x
mdbUpdate hg18 -vars="cell=GM12878 treatment=None antibody=Egr-1 protocol=PCR2x" -var=input -val=GM12878/None/Input/PCR2x
mdbUpdate hg18 -vars="cell=GM12878 treatment=None antibody=GABP protocol=PCR2x" -var=input -val=GM12878/None/Input/PCR2x
mdbUpdate hg18 -vars="cell=GM12878 treatment=None antibody=IRF4 protocol=PCR1x" -var=input -val=GM12878/None/Input/PCR1x
mdbUpdate hg18 -vars="cell=GM12878 treatment=None antibody=NRSF protocol=PCR2x" -var=input -val=GM12878/None/Input/PCR2x
mdbUpdate hg18 -vars="cell=GM12878 treatment=None antibody=PAX5-C20 protocol=PCR1x" -var=input -val=GM12878/None/Input/PCR1x
mdbUpdate hg18 -vars="cell=GM12878 treatment=None antibody=PAX5-N19 protocol=PCR1x" -var=input -val=GM12878/None/Input/PCR1x
mdbUpdate hg18 -vars="cell=GM12878 treatment=None antibody=POU2F2 protocol=PCR1x" -var=input -val=GM12878/None/Input/PCR1x
mdbUpdate hg18 -vars="cell=GM12878 treatment=None antibody=PU.1 protocol=PCR1x" -var=input -val=GM12878/None/Input/PCR1x
mdbUpdate hg18 -vars="cell=GM12878 treatment=None antibody=Pbx3 protocol=PCR1x" -var=input -val=GM12878/None/Input/PCR1x
mdbUpdate hg18 -vars="cell=GM12878 treatment=None antibody=Pol2 protocol=PCR2x" -var=input -val=GM12878/None/Input/PCR2x
mdbUpdate hg18 -vars="cell=GM12878 treatment=None antibody=Pol2-4H8 protocol=PCR1x" -var=input -val=GM12878/None/Input/PCR1x
mdbUpdate hg18 -vars="cell=GM12878 treatment=None antibody=SP1 protocol=PCR1x" -var=input -val=GM12878/None/Input/PCR1x
mdbUpdate hg18 -vars="cell=GM12878 treatment=None antibody=SRF protocol=PCR2x" -var=input -val=GM12878/None/Input/PCR2x
mdbUpdate hg18 -vars="cell=GM12878 treatment=None antibody=Sin3Ak-20 protocol=PCR2x" -var=input -val=GM12878/None/Input/PCR2x
mdbUpdate hg18 -vars="cell=GM12878 treatment=None antibody=TAF1 protocol=PCR1x" -var=input -val=GM12878/None/Input/PCR1x
mdbUpdate hg18 -vars="cell=GM12878 treatment=None antibody=TCF12 protocol=PCR1x" -var=input -val=GM12878/None/Input/PCR1x
mdbUpdate hg18 -vars="cell=GM12878 treatment=None antibody=USF-1 protocol=PCR2x" -var=input -val=GM12878/None/Input/PCR2x
mdbUpdate hg18 -vars="cell=GM12878 treatment=None antibody=ZBTB33 protocol=PCR1x" -var=input -val=GM12878/None/Input/PCR1x
mdbUpdate hg18 -vars="cell=GM12878 treatment=None antibody=p300  protocol=PCR1x" -var=input -val=GM12878/None/Input/PCR1x
mdbUpdate hg18 -vars="cell=GM12891 treatment=None antibody=POU2F2 protocol=PCR1x" -var=input -val=GM12891/None/Input/PCR1x
mdbUpdate hg18 -vars="cell=GM12891 treatment=None antibody=PU.1 protocol=PCR1x" -var=input -val=GM12891/None/Input/PCR1x
mdbUpdate hg18 -vars="cell=GM12891 treatment=None antibody=Pol2 protocol=PCR1x" -var=input -val=GM12891/None/Input/PCR1x
mdbUpdate hg18 -vars="cell=GM12891 treatment=None antibody=Pol2-4H8 protocol=PCR1x" -var=input -val=GM12891/None/Input/PCR1x
mdbUpdate hg18 -vars="cell=GM12891 treatment=None antibody=TAF1 protocol=PCR1x" -var=input -val=GM12891/None/Input/PCR1x
mdbUpdate hg18 -vars="cell=GM12892 treatment=None antibody=Pol2 protocol=PCR1x" -var=input -val=GM12892/None/Input/PCR1x
mdbUpdate hg18 -vars="cell=GM12892 treatment=None antibody=Pol2-4H8 protocol=PCR1x" -var=input -val=GM12892/None/Input/PCR1x
mdbUpdate hg18 -vars="cell=GM12892 treatment=None antibody=TAF1 protocol=PCR1x" -var=input -val=GM12892/None/Input/PCR1x
mdbUpdate hg18 -vars="cell=H1-hESC treatment=None antibody=NRSF protocol=PCR1x" -var=input -val=H1-hESC/None/Input/PCR1x
mdbUpdate hg18 -vars="cell=H1-hESC treatment=None antibody=Pol2 protocol=PCR1x" -var=input -val=H1-hESC/None/Input/PCR1x
mdbUpdate hg18 -vars="cell=H1-hESC treatment=None antibody=Pol2-4H8 protocol=PCR1x" -var=input -val=H1-hESC/None/Input/PCR1x
mdbUpdate hg18 -vars="cell=H1-hESC treatment=None antibody=TAF1 protocol=PCR1x" -var=input -val=H1-hESC/None/Input/PCR1x
mdbUpdate hg18 -vars="cell=HeLa-S3 treatment=None antibody=GABP protocol=PCR1x" -var=input -val=HeLa-S3/None/Input/PCR1x
mdbUpdate hg18 -vars="cell=HeLa-S3 treatment=None antibody=Pol2 protocol=PCR1x" -var=input -val=HeLa-S3/None/Input/PCR1x
mdbUpdate hg18 -vars="cell=HeLa-S3 treatment=None antibody=TAF1 protocol=PCR1x" -var=input -val=HeLa-S3/None/Input/PCR1x
mdbUpdate hg18 -vars="cell=HepG2 treatment=None antibody=BHLHE40 protocol=PCR1x" -var=input -val=HepG2/None/Input/PCR1x
mdbUpdate hg18 -vars="cell=HepG2 treatment=None antibody=FOSL2 protocol=PCR1x" -var=input -val=HepG2/None/Input/PCR1x
mdbUpdate hg18 -vars="cell=HepG2 treatment=None antibody=GABP protocol=PCR1x" -var=input -val=HepG2/None/Input/PCR1x
mdbUpdate hg18 -vars="cell=HepG2 treatment=None antibody=GABP protocol=PCR2x" -var=input -val=HepG2/None/Input/PCR1x
mdbUpdate hg18 -vars="cell=HepG2 treatment=None antibody=HEY1 protocol=PCR1x" -var=input -val=HepG2/None/Input/PCR1x
mdbUpdate hg18 -vars="cell=HepG2 treatment=None antibody=JunD protocol=PCR1x" -var=input -val=HepG2/None/Input/PCR1x
mdbUpdate hg18 -vars="cell=HepG2 treatment=None antibody=NRSF protocol=PCR1x" -var=input -val=HepG2/None/Input/PCR1x
mdbUpdate hg18 -vars="cell=HepG2 treatment=None antibody=Pol2 protocol=PCR1x" -var=input -val=HepG2/None/Input/PCR1x
mdbUpdate hg18 -vars="cell=HepG2 treatment=None antibody=RXRA protocol=PCR1x" -var=input -val=HepG2/None/Input/PCR1x
mdbUpdate hg18 -vars="cell=HepG2 treatment=None antibody=SRF protocol=PCR1x" -var=input -val=HepG2/None/Input/PCR1x
mdbUpdate hg18 -vars="cell=HepG2 treatment=None antibody=Sin3Ak-20 protocol=PCR1x" -var=input -val=HepG2/None/Input/PCR1x
mdbUpdate hg18 -vars="cell=HepG2 treatment=None antibody=TAF1 protocol=PCR1x" -var=input -val=HepG2/None/Input/PCR1x
mdbUpdate hg18 -vars="cell=HepG2 treatment=None antibody=USF-1 protocol=PCR1x" -var=input -val=HepG2/None/Input/PCR1x
mdbUpdate hg18 -vars="cell=HepG2 treatment=None antibody=ZBTB33 protocol=PCR1x" -var=input -val=HepG2/None/Input/PCR1x
mdbUpdate hg18 -vars="cell=HepG2 treatment=None antibody=p300 protocol=PCR1x" -var=input -val=HepG2/None/Input/PCR1x
mdbUpdate hg18 -vars="cell=Jurkat treatment=None antibody=Pol2 protocol=PCR2x" -var=input -val=Jurkat/None/Input/PCR2x
mdbUpdate hg18 -vars="cell=K562 treatment=None antibody=Egr-1 protocol=PCR2x" -var=input -val=K562/None/Input/PCR2x
mdbUpdate hg18 -vars="cell=K562 treatment=None antibody=GABP protocol=PCR2x" -var=input -val=K562/None/Input/PCR2x
mdbUpdate hg18 -vars="cell=K562 treatment=None antibody=HEY1 protocol=PCR1x" -var=input -val=K562/None/Input/PCR1x
mdbUpdate hg18 -vars="cell=K562 treatment=None antibody=NRSF protocol=PCR2x" -var=input -val=K562/None/Input/PCR2x
mdbUpdate hg18 -vars="cell=K562 treatment=None antibody=PU.1 protocol=PCR1x" -var=input -val=K562/None/Input/PCR1x
mdbUpdate hg18 -vars="cell=K562 treatment=None antibody=Pol2 protocol=PCR2x" -var=input -val=K562/None/Input/PCR2x
mdbUpdate hg18 -vars="cell=K562 treatment=None antibody=Pol2-4H8 protocol=PCR1x" -var=input -val=K562/None/Input/PCR1x
mdbUpdate hg18 -vars="cell=K562 treatment=None antibody=SIX5 protocol=PCR1x" -var=input -val=K562/None/Input/PCR1x
mdbUpdate hg18 -vars="cell=K562 treatment=None antibody=SRF protocol=PCR2x" -var=input -val=K562/None/Input/PCR2x
mdbUpdate hg18 -vars="cell=K562 treatment=None antibody=Sin3Ak-20 protocol=PCR2x" -var=input -val=K562/None/Input/PCR2x
mdbUpdate hg18 -vars="cell=K562 treatment=None antibody=TAF1 protocol=PCR1x" -var=input -val=K562/None/Input/PCR1x
mdbUpdate hg18 -vars="cell=K562 treatment=None antibody=USF-1 protocol=PCR2x" -var=input -val=K562/None/Input/PCR2x
mdbUpdate hg18 -vars="cell=PANC-1 treatment=None antibody=NRSF protocol=PCR1x" -var=input -val=PANC-1/None/Input/PCR1x
mdbUpdate hg18 -vars="cell=PANC-1 treatment=None antibody=NRSF protocol=PCR2x" -var=input -val=PANC-1/None/Input/PCR1x
mdbUpdate hg18 -vars="cell=PFSK-1 treatment=None antibody=FOXP2 protocol=PCR1x" -var=input -val=PFSK-1/None/Input/PCR1x
mdbUpdate hg18 -vars="cell=PFSK-1 treatment=None antibody=NRSF protocol=PCR1x" -var=input -val=PFSK-1/None/Input/PCR1x
mdbUpdate hg18 -vars="cell=SK-N-MC treatment=None antibody=FOXP2 protocol=PCR1x" -var=input -val=SK-N-MC/None/Input/PCR1x
mdbUpdate hg18 -vars="cell=SK-N-SH_RA treatment=None antibody=NRSF protocol=PCR1x" -var=input -val=SK-N-SH_RA/None/Input/PCR1x
mdbUpdate hg18 -vars="cell=U87 treatment=None antibody=NRSF protocol=PCR1x" -var=input -val=U87/None/Input/PCR1x

select distinct t1.val,t2.val,t3.val,t4.val,t5.val from mdb_tdreszer t1,mdb_tdreszer t2,mdb_tdreszer t3,mdb_tdreszer t4,mdb_tdreszer t5 where t1.obj like "wgEncodeHudson%"
 and t1.obj = t2.obj and t2.obj = t3.obj and t3.obj = t4.obj and t4.obj = t5.obj
 and t1.var = "cell" and t2.var = "treatment" and t3.var = "antibody" and t4.var = "protocol" and t5.var = "input"
 order by t1.val,t2.val,t3.val,t4.val,t5.val;
+------------+--------------+-----------+-------+-----------------------------+
| val        | val          | val       | val   | val                         |
+------------+--------------+-----------+-------+-----------------------------+
| A549       | DEX_100nM    | CTCF      | PCR1x | A549/DEX_100nM/Input/PCR1x  | 
| A549       | DEX_100nM    | Input     | PCR1x | true                        | 
| A549       | DEX_100nM    | Pol2      | PCR2x | A549/DEX_100nM/Input/PCR1x  | 
| A549       | DEX_100nM    | USF-1     | PCR1x | A549/DEX_100nM/Input/PCR1x  | 
| A549       | DEX_500pM    | GR        | PCR1x | A549/EtOH/GR/PCR1x          | 
| A549       | DEX_50nM     | GR        | PCR1x | A549/EtOH/GR/PCR1x          | 
| A549       | DEX_5nM      | GR        | PCR1x | A549/EtOH/GR/PCR1x          | 
| A549       | EtOH_0.02pct | CTCF      | PCR1x | A549/EtOH/Input/PCR1x       | 
| A549       | EtOH_0.02pct | GR        | PCR1x | true                        | 
| A549       | EtOH_0.02pct | Input     | PCR1x | true                        | 
| A549       | EtOH_0.02pct | Input     | PCR2x | true                        | 
| A549       | EtOH_0.02pct | Pol2      | PCR2x | A549/EtOH/Input/PCR2x       | 
| A549       | EtOH_0.02pct | USF-1     | PCR1x | A549/EtOH/Input/PCR1x       | 
| A549       | None         | GR        | PCR1x | A549/None/Input/PCR1x       | 
| A549       | None         | Input     | PCR1x | true                        | 
| BE2_C      | None         | Input     | PCR1x | true                        | 
| BE2_C      | None         | NRSF      | PCR1x | BE2_C/None/Input/PCR1x      | 
| GM12878    | None         | BATF      | PCR1x | GM12878/None/Input/PCR1x    | 
| GM12878    | None         | BCL11A    | PCR1x | GM12878/None/Input/PCR1x    | 
| GM12878    | None         | BCL3      | PCR1x | GM12878/None/Input/PCR1x    | 
| GM12878    | None         | EBF       | PCR1x | GM12878/None/Input/PCR1x    | 
| GM12878    | None         | Egr-1     | PCR2x | GM12878/None/Input/PCR2x    | 
| GM12878    | None         | GABP      | PCR2x | GM12878/None/Input/PCR2x    | 
| GM12878    | None         | IRF4      | PCR1x | GM12878/None/Input/PCR1x    | 
| GM12878    | None         | Input     | PCR1x | true                        | 
| GM12878    | None         | Input     | PCR2x | true                        | 
| GM12878    | None         | NRSF      | PCR2x | GM12878/None/Input/PCR2x    | 
| GM12878    | None         | PAX5-C20  | PCR1x | GM12878/None/Input/PCR1x    | 
| GM12878    | None         | PAX5-N19  | PCR1x | GM12878/None/Input/PCR1x    | 
| GM12878    | None         | POU2F2    | PCR1x | GM12878/None/Input/PCR1x    | 
| GM12878    | None         | PU.1      | PCR1x | GM12878/None/Input/PCR1x    | 
| GM12878    | None         | Pbx3      | PCR1x | GM12878/None/Input/PCR1x    | 
| GM12878    | None         | Pol2      | PCR2x | GM12878/None/Input/PCR2x    | 
| GM12878    | None         | Pol2-4H8  | PCR1x | GM12878/None/Input/PCR1x    | 
| GM12878    | None         | SP1       | PCR1x | GM12878/None/Input/PCR1x    | 
| GM12878    | None         | SRF       | PCR2x | GM12878/None/Input/PCR2x    | 
| GM12878    | None         | Sin3Ak-20 | PCR2x | GM12878/None/Input/PCR2x    | 
| GM12878    | None         | TAF1      | PCR1x | GM12878/None/Input/PCR1x    | 
| GM12878    | None         | TCF12     | PCR1x | GM12878/None/Input/PCR1x    | 
| GM12878    | None         | USF-1     | PCR2x | GM12878/None/Input/PCR2x    | 
| GM12878    | None         | ZBTB33    | PCR1x | GM12878/None/Input/PCR1x    | 
| GM12878    | None         | p300      | PCR1x | GM12878/None/Input/PCR1x    | 
| GM12891    | None         | Input     | PCR1x | true                        | 
| GM12891    | None         | POU2F2    | PCR1x | GM12891/None/Input/PCR1x    | 
| GM12891    | None         | PU.1      | PCR1x | GM12891/None/Input/PCR1x    | 
| GM12891    | None         | Pol2      | PCR1x | GM12891/None/Input/PCR1x    | 
| GM12891    | None         | Pol2-4H8  | PCR1x | GM12891/None/Input/PCR1x    | 
| GM12891    | None         | TAF1      | PCR1x | GM12891/None/Input/PCR1x    | 
| GM12892    | None         | Input     | PCR1x | true                        | 
| GM12892    | None         | Pol2      | PCR1x | GM12892/None/Input/PCR1x    | 
| GM12892    | None         | Pol2-4H8  | PCR1x | GM12892/None/Input/PCR1x    | 
| GM12892    | None         | TAF1      | PCR1x | GM12892/None/Input/PCR1x    | 
| H1-hESC    | None         | Input     | PCR1x | true                        | 
| H1-hESC    | None         | NRSF      | PCR1x | H1-hESC/None/Input/PCR1x    | 
| H1-hESC    | None         | Pol2      | PCR1x | H1-hESC/None/Input/PCR1x    | 
| H1-hESC    | None         | Pol2-4H8  | PCR1x | H1-hESC/None/Input/PCR1x    | 
| H1-hESC    | None         | TAF1      | PCR1x | H1-hESC/None/Input/PCR1x    | 
| HeLa-S3    | None         | GABP      | PCR1x | HeLa-S3/None/Input/PCR1x    | 
| HeLa-S3    | None         | Input     | PCR1x | true                        | 
| HeLa-S3    | None         | Pol2      | PCR1x | HeLa-S3/None/Input/PCR1x    | 
| HeLa-S3    | None         | TAF1      | PCR1x | HeLa-S3/None/Input/PCR1x    | 
| HepG2      | None         | BHLHE40   | PCR1x | HepG2/None/Input/PCR1x      | 
| HepG2      | None         | FOSL2     | PCR1x | HepG2/None/Input/PCR1x      | 
| HepG2      | None         | GABP      | PCR1x | HepG2/None/Input/PCR1x      | 
| HepG2      | None         | GABP      | PCR2x | HepG2/None/Input/PCR1x      | 
| HepG2      | None         | HEY1      | PCR1x | HepG2/None/Input/PCR1x      | 
| HepG2      | None         | Input     | PCR1x | true                        | 
| HepG2      | None         | JunD      | PCR1x | HepG2/None/Input/PCR1x      | 
| HepG2      | None         | NRSF      | PCR1x | HepG2/None/Input/PCR1x      | 
| HepG2      | None         | Pol2      | PCR1x | HepG2/None/Input/PCR1x      | 
| HepG2      | None         | RXRA      | PCR1x | HepG2/None/Input/PCR1x      | 
| HepG2      | None         | SRF       | PCR1x | HepG2/None/Input/PCR1x      | 
| HepG2      | None         | Sin3Ak-20 | PCR1x | HepG2/None/Input/PCR1x      | 
| HepG2      | None         | TAF1      | PCR1x | HepG2/None/Input/PCR1x      | 
| HepG2      | None         | USF-1     | PCR1x | HepG2/None/Input/PCR1x      | 
| HepG2      | None         | ZBTB33    | PCR1x | HepG2/None/Input/PCR1x      | 
| HepG2      | None         | p300      | PCR1x | HepG2/None/Input/PCR1x      | 
| Jurkat     | None         | Input     | PCR2x | true                        | 
| Jurkat     | None         | Pol2      | PCR2x | Jurkat/None/Input/PCR2x     | 
| K562       | None         | Egr-1     | PCR2x | K562/None/Input/PCR2x       | 
| K562       | None         | GABP      | PCR2x | K562/None/Input/PCR2x       | 
| K562       | None         | HEY1      | PCR1x | K562/None/Input/PCR1x       | 
| K562       | None         | Input     | PCR1x | true                        | 
| K562       | None         | Input     | PCR2x | true                        | 
| K562       | None         | NRSF      | PCR2x | K562/None/Input/PCR2x       | 
| K562       | None         | PU.1      | PCR1x | K562/None/Input/PCR1x       | 
| K562       | None         | Pol2      | PCR2x | K562/None/Input/PCR2x       | 
| K562       | None         | Pol2-4H8  | PCR1x | K562/None/Input/PCR1x       | 
| K562       | None         | SIX5      | PCR1x | K562/None/Input/PCR1x       | 
| K562       | None         | SRF       | PCR2x | K562/None/Input/PCR2x       | 
| K562       | None         | Sin3Ak-20 | PCR2x | K562/None/Input/PCR2x       | 
| K562       | None         | TAF1      | PCR1x | K562/None/Input/PCR1x       | 
| K562       | None         | USF-1     | PCR2x | K562/None/Input/PCR2x       | 
| PANC-1     | None         | Input     | PCR1x | true                        | 
| PANC-1     | None         | NRSF      | PCR1x | PANC-1/None/Input/PCR1x     | 
| PANC-1     | None         | NRSF      | PCR2x | PANC-1/None/Input/PCR1x     | 
| PFSK-1     | None         | FOXP2     | PCR1x | PFSK-1/None/Input/PCR1x     | 
| PFSK-1     | None         | Input     | PCR1x | true                        | 
| PFSK-1     | None         | NRSF      | PCR1x | PFSK-1/None/Input/PCR1x     | 
| SK-N-MC    | None         | FOXP2     | PCR1x | SK-N-MC/None/Input/PCR1x    | 
| SK-N-MC    | None         | Input     | PCR1x | true                        | 
| SK-N-SH_RA | None         | Input     | PCR1x | true                        | 
| SK-N-SH_RA | None         | NRSF      | PCR1x | SK-N-SH_RA/None/Input/PCR1x | 
| U87        | None         | Input     | PCR1x | true                        | 
| U87        | None         | NRSF      | PCR1x | U87/None/Input/PCR1x        | 
+------------+--------------+-----------+-------+-----------------------------+
105 rows in set (0.09 sec)

mdbPrint hg18 -vars="grant=Myers" -ra > mdbHaibTfbs.ra
mdbUpdate hg18 -table=mdb mdbHaibTfbs.ra
cvs ci -m "Fixed Haib Inputs (I hope)" mdbHaibTfbs.ra

### Working with Yale, I am deciding to create a new term "inputType"  To pair: inputType=inputType and input=yes/no/both 
insert into mdb_tdreszer (select t2.obj,"inputType",varType,val from mdb_tdreszer t2 where t2.obj like "wgEncodeHudson%" and var = "input");

select distinct t1.val,t2.val,t3.val,t4.val,t5.val from mdb_tdreszer t1,mdb_tdreszer t2,mdb_tdreszer t3,mdb_tdreszer t4,mdb_tdreszer t5 where t1.obj like "wgEncodeHudson%"
   and t1.obj = t2.obj and t2.obj = t3.obj and t3.obj = t4.obj and t4.obj = t5.obj
  and t1.var = "cell" and t2.var = "treatment" and t3.var = "antibody" and t4.var = "protocol" and t5.var = "inputType" and t5.val = "true"
  order by t1.val,t2.val,t3.val,t4.val,t5.val;
+------------+--------------+-------+-------+------+
| val        | val          | val   | val   | val  |
+------------+--------------+-------+-------+------+
| A549       | DEX_100nM    | Input | PCR1x | true | 
| A549       | EtOH_0.02pct | GR    | PCR1x | true | 
| A549       | EtOH_0.02pct | Input | PCR1x | true | 
| A549       | EtOH_0.02pct | Input | PCR2x | true | 
| A549       | None         | Input | PCR1x | true | 
| BE2_C      | None         | Input | PCR1x | true | 
| GM12878    | None         | Input | PCR1x | true | 
| GM12878    | None         | Input | PCR2x | true | 
| GM12891    | None         | Input | PCR1x | true | 
| GM12892    | None         | Input | PCR1x | true | 
| H1-hESC    | None         | Input | PCR1x | true | 
| HeLa-S3    | None         | Input | PCR1x | true | 
| HepG2      | None         | Input | PCR1x | true | 
| Jurkat     | None         | Input | PCR2x | true | 
| K562       | None         | Input | PCR1x | true | 
| K562       | None         | Input | PCR2x | true | 
| PANC-1     | None         | Input | PCR1x | true | 
| PFSK-1     | None         | Input | PCR1x | true | 
| SK-N-MC    | None         | Input | PCR1x | true | 
| SK-N-SH_RA | None         | Input | PCR1x | true | 
| U87        | None         | Input | PCR1x | true | 
+------------+--------------+-------+-------+------+
21 rows in set (0.02 sec)

mdbUpdate hg18 -vars="composite=wgEncodeHudsonalphaChipSeq cell=A549 treatment=DEX_100nM antibody=Input protocol=PCR1x inputType=true" -var=inputType -val=A549/DEX_100nM/Input/PCR1x
mdbUpdate hg18 -vars="composite=wgEncodeHudsonalphaChipSeq cell=A549 treatment=EtOH_0.02pct antibody=GR protocol=PCR1x inputType=true" -var=inputType -val=A549/EtOH/GR/PCR1x
mdbUpdate hg18 -vars="composite=wgEncodeHudsonalphaChipSeq cell=A549 treatment=EtOH_0.02pct antibody=Input protocol=PCR1x inputType=true" -var=inputType -val=A549/EtOH/Input/PCR1x
mdbUpdate hg18 -vars="composite=wgEncodeHudsonalphaChipSeq cell=A549 treatment=EtOH_0.02pct antibody=Input protocol=PCR2x inputType=true" -var=inputType -val=A549/EtOH/Input/PCR2x
mdbUpdate hg18 -vars="composite=wgEncodeHudsonalphaChipSeq cell=A549 treatment=None antibody=Input protocol=PCR1x inputType=true" -var=inputType -val=A549/None/Input/PCR1x
mdbUpdate hg18 -vars="composite=wgEncodeHudsonalphaChipSeq cell=BE2_C treatment=None antibody=Input protocol=PCR1x inputType=true" -var=inputType -val=BE2_C/None/Input/PCR1x
mdbUpdate hg18 -vars="composite=wgEncodeHudsonalphaChipSeq cell=GM12878 treatment=None antibody=Input protocol=PCR1x inputType=true" -var=inputType -val=GM12878/None/Input/PCR1x
mdbUpdate hg18 -vars="composite=wgEncodeHudsonalphaChipSeq cell=GM12878 treatment=None antibody=Input protocol=PCR2x inputType=true" -var=inputType -val=GM12878/None/Input/PCR2x
mdbUpdate hg18 -vars="composite=wgEncodeHudsonalphaChipSeq cell=GM12891 treatment=None antibody=Input protocol=PCR1x inputType=true" -var=inputType -val=GM12891/None/Input/PCR1x
mdbUpdate hg18 -vars="composite=wgEncodeHudsonalphaChipSeq cell=GM12892 treatment=None antibody=Input protocol=PCR1x inputType=true" -var=inputType -val=GM12892/None/Input/PCR1x
mdbUpdate hg18 -vars="composite=wgEncodeHudsonalphaChipSeq cell=H1-hESC treatment=None antibody=Input protocol=PCR1x inputType=true" -var=inputType -val=H1-hESC/None/Input/PCR1x
mdbUpdate hg18 -vars="composite=wgEncodeHudsonalphaChipSeq cell=HeLa-S3 treatment=None antibody=Input protocol=PCR1x inputType=true" -var=inputType -val=HeLa-S3/None/Input/PCR1x
mdbUpdate hg18 -vars="composite=wgEncodeHudsonalphaChipSeq cell=HepG2 treatment=None antibody=Input protocol=PCR1x inputType=true" -var=inputType -val=HepG2/None/Input/PCR1x
mdbUpdate hg18 -vars="composite=wgEncodeHudsonalphaChipSeq cell=Jurkat treatment=None antibody=Input protocol=PCR2x inputType=true" -var=inputType -val=Jurkat/None/Input/PCR2x
mdbUpdate hg18 -vars="composite=wgEncodeHudsonalphaChipSeq cell=K562 treatment=None antibody=Input protocol=PCR1x inputType=true" -var=inputType -val=K562/None/Input/PCR1x
mdbUpdate hg18 -vars="composite=wgEncodeHudsonalphaChipSeq cell=K562 treatment=None antibody=Input protocol=PCR2x inputType=true" -var=inputType -val=K562/None/Input/PCR2x
mdbUpdate hg18 -vars="composite=wgEncodeHudsonalphaChipSeq cell=PANC-1 treatment=None antibody=Input protocol=PCR1x inputType=true" -var=inputType -val=PANC-1/None/Input/PCR1x
mdbUpdate hg18 -vars="composite=wgEncodeHudsonalphaChipSeq cell=PFSK-1 treatment=None antibody=Input protocol=PCR1x inputType=true" -var=inputType -val=PFSK-1/None/Input/PCR1x
mdbUpdate hg18 -vars="composite=wgEncodeHudsonalphaChipSeq cell=SK-N-MC treatment=None antibody=Input protocol=PCR1x inputType=true" -var=inputType -val=SK-N-MC/None/Input/PCR1x
mdbUpdate hg18 -vars="composite=wgEncodeHudsonalphaChipSeq cell=SK-N-SH_RA treatment=None antibody=Input protocol=PCR1x inputType=true" -var=inputType -val=SK-N-SH_RA/None/Input/PCR1x
mdbUpdate hg18 -vars="composite=wgEncodeHudsonalphaChipSeq cell=U87 treatment=None antibody=Input protocol=PCR1x inputType=true" -var=inputType -val=U87/None/Input/PCR1x

update mdb_tdreszer set val="yes" where obj like "wgEncodeHudson%" and var = "input" and val = "true";
update mdb_tdreszer set val="no" where obj like "wgEncodeHudson%" and var = "input" and val != "yes";

update mdb_tdreszer t1, mdb_tdreszer t2 set t1.val="yes" where t1.obj like "wgEncodeHudson%" t1.obj = t2.obj and t1.var = "input" and t2.var = "antibody" and t2.val = "Input";

select distinct t1.val cell,t2.val treatment,t3.val antibody,t4.val protocol,t5.val input,t6.val inputType from mdb_tdreszer t1,mdb_tdreszer t2,mdb_tdreszer t3,mdb_tdreszer t4,mdb_tdreszer t5,mdb_tdreszer t6 where t1.obj like "wgEncodeHudson%"
 and t1.obj = t2.obj and t2.obj = t3.obj and t3.obj = t4.obj and t4.obj = t5.obj and t5.obj = t6.obj
 and t1.var = "cell" and t2.var = "treatment" and t3.var = "antibody" and t4.var = "protocol" and t5.var = "input" and t6.var = "inputType"
 order by t1.val,t2.val,t3.val,t4.val,t5.val,t6.val;
+------------+--------------+-----------+----------+-------+-----------------------------+
| cell       | treatment    | antibody  | protocol | input | inputType                   |
+------------+--------------+-----------+----------+-------+-----------------------------+
| A549       | DEX_100nM    | CTCF      | PCR1x    | no    | A549/DEX_100nM/Input/PCR1x  | 
| A549       | DEX_100nM    | Input     | PCR1x    | yes   | A549/DEX_100nM/Input/PCR1x  | 
| A549       | DEX_100nM    | Pol2      | PCR2x    | no    | A549/DEX_100nM/Input/PCR1x  | 
| A549       | DEX_100nM    | USF-1     | PCR1x    | no    | A549/DEX_100nM/Input/PCR1x  | 
| A549       | DEX_500pM    | GR        | PCR1x    | no    | A549/EtOH/GR/PCR1x          | 
| A549       | DEX_50nM     | GR        | PCR1x    | no    | A549/EtOH/GR/PCR1x          | 
| A549       | DEX_5nM      | GR        | PCR1x    | no    | A549/EtOH/GR/PCR1x          | 
| A549       | EtOH_0.02pct | CTCF      | PCR1x    | no    | A549/EtOH/Input/PCR1x       | 
| A549       | EtOH_0.02pct | GR        | PCR1x    | yes   | A549/EtOH/GR/PCR1x          | 
| A549       | EtOH_0.02pct | Input     | PCR1x    | yes   | A549/EtOH/Input/PCR1x       | 
| A549       | EtOH_0.02pct | Input     | PCR2x    | yes   | A549/EtOH/Input/PCR2x       | 
| A549       | EtOH_0.02pct | Pol2      | PCR2x    | no    | A549/EtOH/Input/PCR2x       | 
| A549       | EtOH_0.02pct | USF-1     | PCR1x    | no    | A549/EtOH/Input/PCR1x       | 
| A549       | None         | GR        | PCR1x    | no    | A549/None/Input/PCR1x       | 
| A549       | None         | Input     | PCR1x    | yes   | A549/None/Input/PCR1x       | 
| BE2_C      | None         | Input     | PCR1x    | yes   | BE2_C/None/Input/PCR1x      | 
| BE2_C      | None         | NRSF      | PCR1x    | no    | BE2_C/None/Input/PCR1x      | 
| GM12878    | None         | BATF      | PCR1x    | no    | GM12878/None/Input/PCR1x    | 
| GM12878    | None         | BCL11A    | PCR1x    | no    | GM12878/None/Input/PCR1x    | 
| GM12878    | None         | BCL3      | PCR1x    | no    | GM12878/None/Input/PCR1x    | 
| GM12878    | None         | EBF       | PCR1x    | no    | GM12878/None/Input/PCR1x    | 
| GM12878    | None         | Egr-1     | PCR2x    | no    | GM12878/None/Input/PCR2x    | 
| GM12878    | None         | GABP      | PCR2x    | no    | GM12878/None/Input/PCR2x    | 
| GM12878    | None         | IRF4      | PCR1x    | no    | GM12878/None/Input/PCR1x    | 
| GM12878    | None         | Input     | PCR1x    | yes   | GM12878/None/Input/PCR1x    | 
| GM12878    | None         | Input     | PCR2x    | yes   | GM12878/None/Input/PCR2x    | 
| GM12878    | None         | NRSF      | PCR2x    | no    | GM12878/None/Input/PCR2x    | 
| GM12878    | None         | PAX5-C20  | PCR1x    | no    | GM12878/None/Input/PCR1x    | 
| GM12878    | None         | PAX5-N19  | PCR1x    | no    | GM12878/None/Input/PCR1x    | 
| GM12878    | None         | POU2F2    | PCR1x    | no    | GM12878/None/Input/PCR1x    | 
| GM12878    | None         | PU.1      | PCR1x    | no    | GM12878/None/Input/PCR1x    | 
| GM12878    | None         | Pbx3      | PCR1x    | no    | GM12878/None/Input/PCR1x    | 
| GM12878    | None         | Pol2      | PCR2x    | no    | GM12878/None/Input/PCR2x    | 
| GM12878    | None         | Pol2-4H8  | PCR1x    | no    | GM12878/None/Input/PCR1x    | 
| GM12878    | None         | SP1       | PCR1x    | no    | GM12878/None/Input/PCR1x    | 
| GM12878    | None         | SRF       | PCR2x    | no    | GM12878/None/Input/PCR2x    | 
| GM12878    | None         | Sin3Ak-20 | PCR2x    | no    | GM12878/None/Input/PCR2x    | 
| GM12878    | None         | TAF1      | PCR1x    | no    | GM12878/None/Input/PCR1x    | 
| GM12878    | None         | TCF12     | PCR1x    | no    | GM12878/None/Input/PCR1x    | 
| GM12878    | None         | USF-1     | PCR2x    | no    | GM12878/None/Input/PCR2x    | 
| GM12878    | None         | ZBTB33    | PCR1x    | no    | GM12878/None/Input/PCR1x    | 
| GM12878    | None         | p300      | PCR1x    | no    | GM12878/None/Input/PCR1x    | 
| GM12891    | None         | Input     | PCR1x    | yes   | GM12891/None/Input/PCR1x    | 
| GM12891    | None         | POU2F2    | PCR1x    | no    | GM12891/None/Input/PCR1x    | 
| GM12891    | None         | PU.1      | PCR1x    | no    | GM12891/None/Input/PCR1x    | 
| GM12891    | None         | Pol2      | PCR1x    | no    | GM12891/None/Input/PCR1x    | 
| GM12891    | None         | Pol2-4H8  | PCR1x    | no    | GM12891/None/Input/PCR1x    | 
| GM12891    | None         | TAF1      | PCR1x    | no    | GM12891/None/Input/PCR1x    | 
| GM12892    | None         | Input     | PCR1x    | yes   | GM12892/None/Input/PCR1x    | 
| GM12892    | None         | Pol2      | PCR1x    | no    | GM12892/None/Input/PCR1x    | 
| GM12892    | None         | Pol2-4H8  | PCR1x    | no    | GM12892/None/Input/PCR1x    | 
| GM12892    | None         | TAF1      | PCR1x    | no    | GM12892/None/Input/PCR1x    | 
| H1-hESC    | None         | Input     | PCR1x    | yes   | H1-hESC/None/Input/PCR1x    | 
| H1-hESC    | None         | NRSF      | PCR1x    | no    | H1-hESC/None/Input/PCR1x    | 
| H1-hESC    | None         | Pol2      | PCR1x    | no    | H1-hESC/None/Input/PCR1x    | 
| H1-hESC    | None         | Pol2-4H8  | PCR1x    | no    | H1-hESC/None/Input/PCR1x    | 
| H1-hESC    | None         | TAF1      | PCR1x    | no    | H1-hESC/None/Input/PCR1x    | 
| HeLa-S3    | None         | GABP      | PCR1x    | no    | HeLa-S3/None/Input/PCR1x    | 
| HeLa-S3    | None         | Input     | PCR1x    | yes   | HeLa-S3/None/Input/PCR1x    | 
| HeLa-S3    | None         | Pol2      | PCR1x    | no    | HeLa-S3/None/Input/PCR1x    | 
| HeLa-S3    | None         | TAF1      | PCR1x    | no    | HeLa-S3/None/Input/PCR1x    | 
| HepG2      | None         | BHLHE40   | PCR1x    | no    | HepG2/None/Input/PCR1x      | 
| HepG2      | None         | FOSL2     | PCR1x    | no    | HepG2/None/Input/PCR1x      | 
| HepG2      | None         | GABP      | PCR1x    | no    | HepG2/None/Input/PCR1x      | 
| HepG2      | None         | GABP      | PCR2x    | no    | HepG2/None/Input/PCR1x      | 
| HepG2      | None         | HEY1      | PCR1x    | no    | HepG2/None/Input/PCR1x      | 
| HepG2      | None         | Input     | PCR1x    | yes   | HepG2/None/Input/PCR1x      | 
| HepG2      | None         | JunD      | PCR1x    | no    | HepG2/None/Input/PCR1x      | 
| HepG2      | None         | NRSF      | PCR1x    | no    | HepG2/None/Input/PCR1x      | 
| HepG2      | None         | Pol2      | PCR1x    | no    | HepG2/None/Input/PCR1x      | 
| HepG2      | None         | RXRA      | PCR1x    | no    | HepG2/None/Input/PCR1x      | 
| HepG2      | None         | SRF       | PCR1x    | no    | HepG2/None/Input/PCR1x      | 
| HepG2      | None         | Sin3Ak-20 | PCR1x    | no    | HepG2/None/Input/PCR1x      | 
| HepG2      | None         | TAF1      | PCR1x    | no    | HepG2/None/Input/PCR1x      | 
| HepG2      | None         | USF-1     | PCR1x    | no    | HepG2/None/Input/PCR1x      | 
| HepG2      | None         | ZBTB33    | PCR1x    | no    | HepG2/None/Input/PCR1x      | 
| HepG2      | None         | p300      | PCR1x    | no    | HepG2/None/Input/PCR1x      | 
| Jurkat     | None         | Input     | PCR2x    | yes   | Jurkat/None/Input/PCR2x     | 
| Jurkat     | None         | Pol2      | PCR2x    | no    | Jurkat/None/Input/PCR2x     | 
| K562       | None         | Egr-1     | PCR2x    | no    | K562/None/Input/PCR2x       | 
| K562       | None         | GABP      | PCR2x    | no    | K562/None/Input/PCR2x       | 
| K562       | None         | HEY1      | PCR1x    | no    | K562/None/Input/PCR1x       | 
| K562       | None         | Input     | PCR1x    | yes   | K562/None/Input/PCR1x       | 
| K562       | None         | Input     | PCR2x    | yes   | K562/None/Input/PCR2x       | 
| K562       | None         | NRSF      | PCR2x    | no    | K562/None/Input/PCR2x       | 
| K562       | None         | PU.1      | PCR1x    | no    | K562/None/Input/PCR1x       | 
| K562       | None         | Pol2      | PCR2x    | no    | K562/None/Input/PCR2x       | 
| K562       | None         | Pol2-4H8  | PCR1x    | no    | K562/None/Input/PCR1x       | 
| K562       | None         | SIX5      | PCR1x    | no    | K562/None/Input/PCR1x       | 
| K562       | None         | SRF       | PCR2x    | no    | K562/None/Input/PCR2x       | 
| K562       | None         | Sin3Ak-20 | PCR2x    | no    | K562/None/Input/PCR2x       | 
| K562       | None         | TAF1      | PCR1x    | no    | K562/None/Input/PCR1x       | 
| K562       | None         | USF-1     | PCR2x    | no    | K562/None/Input/PCR2x       | 
| PANC-1     | None         | Input     | PCR1x    | yes   | PANC-1/None/Input/PCR1x     | 
| PANC-1     | None         | NRSF      | PCR1x    | no    | PANC-1/None/Input/PCR1x     | 
| PANC-1     | None         | NRSF      | PCR2x    | no    | PANC-1/None/Input/PCR1x     | 
| PFSK-1     | None         | FOXP2     | PCR1x    | no    | PFSK-1/None/Input/PCR1x     | 
| PFSK-1     | None         | Input     | PCR1x    | yes   | PFSK-1/None/Input/PCR1x     | 
| PFSK-1     | None         | NRSF      | PCR1x    | no    | PFSK-1/None/Input/PCR1x     | 
| SK-N-MC    | None         | FOXP2     | PCR1x    | no    | SK-N-MC/None/Input/PCR1x    | 
| SK-N-MC    | None         | Input     | PCR1x    | yes   | SK-N-MC/None/Input/PCR1x    | 
| SK-N-SH_RA | None         | Input     | PCR1x    | yes   | SK-N-SH_RA/None/Input/PCR1x | 
| SK-N-SH_RA | None         | NRSF      | PCR1x    | no    | SK-N-SH_RA/None/Input/PCR1x | 
| U87        | None         | Input     | PCR1x    | yes   | U87/None/Input/PCR1x        | 
| U87        | None         | NRSF      | PCR1x    | no    | U87/None/Input/PCR1x        | 
+------------+--------------+-----------+----------+-------+-----------------------------+
105 rows in set (0.12 sec)

mdbPrint hg18 -vars="grant=Myers" -ra > mdbHaibTfbs.ra
mdbUpdate hg18 -table=mdb mdbHaibTfbs.ra
cvs ci -m "Fixed Haib Inputs further by adding inputType variable allowing pairing of exp.inputType = inp.inputType" mdbHaibTfbs.ra

select distinct val from mdb_tdreszer where obj like "wgEncodeHudson%" and var = "inputType";
21 rows in set (0.02 sec)
select distinct t2.val from mdb_tdreszer t1,mdb_tdreszer t2 where t1.obj = t2.obj and t1.obj like "wgEncodeHudson%" and t1.var = "input" and t1.val = "yes" and t2.var = "inputType";
21 rows in set (0.01 sec)
select distinct t1.val input,t2.val inputType from mdb_tdreszer t1,mdb_tdreszer t2 where t1.obj = t2.obj and t1.obj like "wgEncodeHudson%" and t1.var = "input" and t2.var = "inputType" order by t2.val, t1.val;
+-------+-----------------------------+
| input | inputType                   |
+-------+-----------------------------+
| no    | A549/DEX_100nM/Input/PCR1x  | 
| yes   | A549/DEX_100nM/Input/PCR1x  | 
| no    | A549/EtOH/GR/PCR1x          | 
| yes   | A549/EtOH/GR/PCR1x          | 
| no    | A549/EtOH/Input/PCR1x       | 
| yes   | A549/EtOH/Input/PCR1x       | 
| no    | A549/EtOH/Input/PCR2x       | 
| yes   | A549/EtOH/Input/PCR2x       | 
| no    | A549/None/Input/PCR1x       | 
| yes   | A549/None/Input/PCR1x       | 
| no    | BE2_C/None/Input/PCR1x      | 
| yes   | BE2_C/None/Input/PCR1x      | 
| no    | GM12878/None/Input/PCR1x    | 
| yes   | GM12878/None/Input/PCR1x    | 
| no    | GM12878/None/Input/PCR2x    | 
| yes   | GM12878/None/Input/PCR2x    | 
| no    | GM12891/None/Input/PCR1x    | 
| yes   | GM12891/None/Input/PCR1x    | 
| no    | GM12892/None/Input/PCR1x    | 
| yes   | GM12892/None/Input/PCR1x    | 
| no    | H1-hESC/None/Input/PCR1x    | 
| yes   | H1-hESC/None/Input/PCR1x    | 
| no    | HeLa-S3/None/Input/PCR1x    | 
| yes   | HeLa-S3/None/Input/PCR1x    | 
| no    | HepG2/None/Input/PCR1x      | 
| yes   | HepG2/None/Input/PCR1x      | 
| no    | Jurkat/None/Input/PCR2x     | 
| yes   | Jurkat/None/Input/PCR2x     | 
| no    | K562/None/Input/PCR1x       | 
| yes   | K562/None/Input/PCR1x       | 
| no    | K562/None/Input/PCR2x       | 
| yes   | K562/None/Input/PCR2x       | 
| no    | PANC-1/None/Input/PCR1x     | 
| yes   | PANC-1/None/Input/PCR1x     | 
| no    | PFSK-1/None/Input/PCR1x     | 
| yes   | PFSK-1/None/Input/PCR1x     | 
| no    | SK-N-MC/None/Input/PCR1x    | 
| yes   | SK-N-MC/None/Input/PCR1x    | 
| no    | SK-N-SH_RA/None/Input/PCR1x | 
| yes   | SK-N-SH_RA/None/Input/PCR1x | 
| no    | U87/None/Input/PCR1x        | 
| yes   | U87/None/Input/PCR1x        | 
+-------+-----------------------------+
42 rows in set (0.08 sec)

# So all is well!

### Change input:yes/no to setType:input/exp
select count(*) from mdb_tdreszer where var = "input";|     1764 | 

mysql> select distinct t2.val from mdb_tdreszer t1, mdb_tdreszer t2 where t1.obj = t2.obj and t1.var = "input" and t2.var = "composite";
+----------------------------+
| wgEncodeHudsonalphaChipSeq | 
| wgEncodeYaleChIPseq        | 
+----------------------------+
2 rows in set (0.08 sec)

mysql> update mdb_tdreszer set var = "setType" where var = "input";Query OK, 1764 rows affected (0.21 sec)
Rows matched: 1764  Changed: 1764  Warnings: 0

mysql> update mdb_tdreszer set val = "input" where var = "setType" and val = "yes";
Query OK, 287 rows affected (0.03 sec)
Rows matched: 287  Changed: 287  Warnings: 0

mysql> update mdb_tdreszer set val = "exp" where var = "setType" and val = "no";
Query OK, 1477 rows affected (0.10 sec)
Rows matched: 1477  Changed: 1477  Warnings: 0

### Problem with 2 files differening between release1 and release2
> > wgEncodeHudsonalphaChipSeqRawDataRep1K562Pol2.fastq
> > wgEncodeHudsonalphaChipSeqRawDataRep2K562Pol2. fastq
-rw-rw-r-- 2 larrym protein  395039662 Nov 25  2008 release1/wgEncodeHudsonalphaChipSeqRawDataRep1K562Pol2.fastq.gz
-rw-rw-r-- 2 qateam protein 1062394426 Oct 18  2009 release2/wgEncodeHudsonalphaChipSeqRawDataRep1K562Pol2.fastq.gz

subId=52 release1 submission with no fastq.  
exp_data/SL240_K562_Rep1_hg18.TagAlign	Alignments	K562	Pol2	1		
exp_data/SL241_K562_Rep2_hg18.TagAlign	Alignments	K562	Pol2	2
# so SL240, SL241
subId=768
SL949.fastq.gz	RawData	K562	Pol2	1		3
SL950.fastq.gz	RawData	K562	Pol2	2		4
# so SL949, SL 950
select * from project_files where file_name like "%SL240%";
+------+-------------------------------------------------------+-----------+---------------------+--------------------+---------------------+---------------------+
| id   | file_name                                             | file_size | file_date           | project_archive_id | created_at          | updated_at          |
+------+-------------------------------------------------------+-----------+---------------------+--------------------+---------------------+---------------------+
| 1806 | exp_data/SL240_K562_Rep1_hg18.TagAlign                | 681713580 | 2008-11-20 14:13:15 |                102 | 2008-11-20 14:13:34 | 2008-11-20 14:13:34 | 
| 1807 | exp_data/SL240_RNAPol2_K562_Rep1_peakcalls.narrowPeak | 576700    | 2008-11-20 14:13:15 |                102 | 2008-11-20 14:13:35 | 2008-11-20 14:13:35 | 
+------+-------------------------------------------------------+-----------+---------------------+--------------------+---------------------+---------------------+
select * from project_files where file_name like "%SL949%";
+-------+--------------------------------+------------+---------------------+--------------------+---------------------+---------------------+
| id    | file_name                      | file_size  | file_date           | project_archive_id | created_at          | updated_at          |
+-------+--------------------------------+------------+---------------------+--------------------+---------------------+---------------------+
| 24389 | data/SL949.TagAlign            | 1147755552 | 2009-10-21 23:12:14 |               1005 | 2009-10-21 23:12:14 | 2009-10-21 23:12:14 | 
| 24390 | data/SL949_Peaks.bed.broadPeak | 1706164    | 2009-10-21 23:12:14 |               1005 | 2009-10-21 23:12:14 | 2009-10-21 23:12:14 | 
| 24671 | SL949.fastq.gz                 | 1062394426 | 2009-11-07 19:31:55 |               1037 | 2009-11-07 19:31:55 | 2009-11-07 19:31:55 | 
+-------+--------------------------------+------------+---------------------+--------------------+---------------------+---------------------+
# Now track down 949 tags and peaks.  Suspicion is that the 768 submission of fastqs mislabelled K562/Pol2 in the DDF.		
select * from project_archives where id = 1005;
+------+--------------------------------+------------+---------------------+------------+---------------------+---------------------+------------+-------------+-----------------+
| id   | file_name                      | file_size  | file_date           | project_id | created_at          | updated_at          | archive_no | status      | archives_active |
+------+--------------------------------+------------+---------------------+------------+---------------------+---------------------+------------+-------------+-----------------+
| 1005 | 001_HA_ChIP_seq_Oct09_A.tar.gz | 4953478536 | 2009-10-21 23:12:13 |        741 | 2009-10-21 23:12:13 | 2009-10-21 23:12:13 |          1 | see current |                 | 
+------+--------------------------------+------------+---------------------+------------+---------------------+---------------------+------------+-------------+-----------------+
m 741/*.DDF
data/SL949.TagAlign     Alignments      K562    Pol2-4H8        1               3
data/SL949_Peaks.bed.broadPeak  Peaks   K562    Pol2-4H8        1       MACS    3
data/SL950.TagAlign     Alignments      K562    Pol2-4H8        2               4
data/SL950_Peaks.bed.broadPeak  Peaks   K562    Pol2-4H8        2       MACS    4
### So it appears that the release2 fastq's should have been labelled Pol2-4H8

1) rename the release2 versions
mv wgEncodeHudsonalphaChipSeqRawDataRep1K562Pol2.fastq.gz wgEncodeHudsonalphaChipSeqRawDataRep1K562Pol24h8.fastq.gz
mv wgEncodeHudsonalphaChipSeqRawDataRep2K562Pol2.fastq.gz wgEncodeHudsonalphaChipSeqRawDataRep2K562Pol24h8.fastq.gz
cd release2
mv wgEncodeHudsonalphaChipSeqRawDataRep1K562Pol2.fastq release2/wgEncodeHudsonalphaChipSeqRawDataRep1K562Pol24h8.fastq
mv wgEncodeHudsonalphaChipSeqRawDataRep2K562Pol2.fastq release2/wgEncodeHudsonalphaChipSeqRawDataRep2K562Pol24h8.fastq
2) Bring back the old release1 files:
cd ..
ln release1/wgEncodeHudsonalphaChipSeqRawDataRep1K562Pol2.fastq.gz .
ln release1/wgEncodeHudsonalphaChipSeqRawDataRep2K562Pol2.fastq.gz .
cd release2
ln ../wgEncodeHudsonalphaChipSeqRawDataRep1K562Pol2.fastq.gz .
ln ../wgEncodeHudsonalphaChipSeqRawDataRep2K562Pol2.fastq.gz .
3) Fix metadata:
a) rename in metadata:
select * from mdb_tdreszer where obj = "wgEncodeHudsonalphaChipSeqRawDataRep1K562Pol2";
update mdb_tdreszer set obj = "wgEncodeHudsonalphaChipSeqRawDataRep1K562Pol24h8" where obj = "wgEncodeHudsonalphaChipSeqRawDataRep1K562Pol2";
Query OK, 21 rows affected (0.01 sec)
update mdb_tdreszer set obj = "wgEncodeHudsonalphaChipSeqRawDataRep2K562Pol24h8" where obj = "wgEncodeHudsonalphaChipSeqRawDataRep2K562Pol2";
Query OK, 21 rows affected (0.00 sec)
update mdb_tdreszer set val = "wgEncodeHudsonalphaChipSeqRawDataRep1K562Pol24h8.fastq.gz" where obj = "wgEncodeHudsonalphaChipSeqRawDataRep1K562Pol24h8" and var = "fileName";
Query OK, 1 row affected (0.00 sec)
update mdb_tdreszer set val = "wgEncodeHudsonalphaChipSeqRawDataRep2K562Pol24h8.fastq.gz" where obj = "wgEncodeHudsonalphaChipSeqRawDataRep2K562Pol24h8" and var = "fileName";
Query OK, 1 row affected (0.00 sec)
update mdb_tdreszer set val = "wgEncodeHudsonalphaChipSeqRawSignalRep1K562Pol24h8" where obj = "wgEncodeHudsonalphaChipSeqRawDataRep1K562Pol24h8" and var = "parentTable";
Query OK, 1 row affected (0.00 sec)
update mdb_tdreszer set val = "wgEncodeHudsonalphaChipSeqRawSignalRep1K562Pol24h8" where obj = "wgEncodeHudsonalphaChipSeqRawDataRep2K562Pol24h8" and var = "parentTable";
Query OK, 1 row affected (0.00 sec)
b) Add metadata for older version:
grep wgEncodeHudsonalphaChipSeqRawDataRep?K562Pol2 release1/fileDb.ra > tmp.txt
edit tmp.txt # for setType, inputType and parentTable
mdbUpdate hg18 tmp.txt
Using table named 'hg18.mdb_tdreszer'.
Read 2 metadata objects from hg18
Affected 34 row(s) in hg18.mdb_tdreszer
update mdb_tdreszer set val = "Pol2-4H8" where obj = "wgEncodeHudsonalphaChipSeqRawDataRep1K562Pol24h8" and var = "antibody";
update mdb_tdreszer set val = "Pol2-4H8" where obj = "wgEncodeHudsonalphaChipSeqRawDataRep2K562Pol24h8" and var = "antibody";
mdbUpdate hg18 -obj=wgEncodeHudsonalphaChipSeqRawDataRep%K562Pol24h8 -var=antibody -val=Pol2-4H8
Affected 2 row(s) in hg18.mdb_tdreszer
mdbPrint hg18 -vars="composite=wgEncodeHudsonalphaChipSeq" > mdbHaibTfbs.ra 
Using table named 'hg18.mdb_tdreszer'.
objects:693  vars:15198
mdbUpdate hg18 -table=mdb mdbHaibTfbs.ra
cvs ci mdbHaibTfbs.ra

md5sum wgEncodeHudsonalphaChipSeqRawDataRep1K562Pol2.fastq.gz > tmp.txt
md5sum wgEncodeHudsonalphaChipSeqRawDataRep2K562Pol2.fastq.gz >> tmp.txt
md5sum wgEncodeHudsonalphaChipSeqRawDataRep1K562Pol24h8.fastq.gz >> tmp.txt
md5sum wgEncodeHudsonalphaChipSeqRawDataRep2K562Pol24h8.fastq.gz >> tmp.txt
edit md5sum.txt to replace the 2 for Pol2 and add the 2 for Pol2-4H8
encodeDownloadsPage.pl -mdb=mdb index.html .
wl index.html
539 index.html
wl release2/index.html
537 release2/index.html
cp index.html release2/
cp files.txt release2/
cp md5sum.txt release2/

2010-04-29 Move HAIB TFBS into pushQ A!
=======================================
select id,name,status,user_id from projects where status = "approved" and user_id = 8 order by id;
+------+----------------------------------------------------+----------+---------+
| id   | name                                               | status   | user_id |
+------+----------------------------------------------------+----------+---------+
|    6 | HudsonAlpha PFSK-1/SK-N-MC Control                 | approved |       8 | 
|    7 | HudsonAlpha PFSK-1/SK-N-MC FOXP2                   | approved |       8 | 
|  259 | HudsonAlpha_ChIPSeq_Sin3Ak-20_K562_GM12878_Feb2709 | approved |       8 | 
|  260 | HudsonAlpha_ChIPSeq_Egr-1_K562_GM12878_Feb2709     | approved |       8 | 
|  261 | HudsonAlpha_ChIPSeq_USF-1_K562_GM12878_Feb2709     | approved |       8 | 
|  262 | HudsonAlpha_ChIPSeq_CONTROL_K562_GM12878_Feb2709   | approved |       8 | 
|  268 | HudsonAlpha_ChIP-Seq-FEB09_FASTQ                   | approved |       8 | 
|  422 | HudsonAlpha_GM12878_Jul-09                         | approved |       8 | 
|  432 | HudsonAlpha_HepG2_Jul-09                           | approved |       8 | 
|  433 | HudsonAlpha_HeLa_Jul-09                            | approved |       8 | 
|  434 | HudsonAlpha_U87_Jul-09                             | approved |       8 | 
|  435 | HudsonAlpha_PANC1_Jul-09                           | approved |       8 | 
|  436 | HudsonAlpha_PFSK1_Jul-09                           | approved |       8 | 
|  437 | HudsonAlpha_BE2C_Jul-09                            | approved |       8 | 
|  438 | HudsonAlpha_HTB11_Jul-09                           | approved |       8 | 
|  741 | HudsonAlpha_ChIP-seq_Oct-09                        | approved |       8 | 
|  756 | HudsonAlpha_ChIP-seq_Oct-09_noReps                 | approved |       8 | 
|  759 | HudsonAlpha_ChIP-seq_Oct-09_RestOf                 | approved |       8 | 
|  768 | HAIBChIPseq_RawData_Oct09                          | approved |       8 | 
|  774 | HudsonAlpha_GR_ChIP-seq                            | approved |       8 | 
|  776 | HudsonAlpha_ChIP-seq_HepG2_GABPa-Nov09             | approved |       8 | 
|  780 | HudsonAlpha_ChIP-seq_HepG2_TAF250-Nov09            | approved |       8 | 
|  781 | HudsonAlpha_ChIP-seq_HeLa_GABPa-Nov09              | approved |       8 | 
|  782 | HudsonAlpha_ChIP-seq_HeLa_TAFIIp250-Nov09          | approved |       8 | 
|  783 | HudsonAlpha_ChIP-seq_GM12878_Bcl11a-Nov09          | approved |       8 | 
|  795 | HAIB_Chipseq_p300_GM12878-Nov09                    | approved |       8 | 
|  798 | HudsonAlpha_Chipseq_ZBTB33_GM12878-Nov09           | approved |       8 | 
|  801 | Hudsonalpha_Chipseq_A549_GR_5nMDex_09Dec           | approved |       8 | 
|  802 | HudsonAlpha_Chipseq_A549_GR_50nMDex_Dec09          | approved |       8 | 
|  803 | HudsonAlpha_Chipseq_A549_GR_500pMDex_Dec09         | approved |       8 | 
|  804 | HudsonAlpha_Chipseq_GM12878_Pax5_c20_Dec09         | approved |       8 | 
|  806 | HudsonAlpha_Chipseq_GM12878_Pax5-N19_Dec09         | approved |       8 | 
|  807 | HudsonAlpha_Chipseq_K562_TAF1_Dec09                | approved |       8 | 
|  809 | HudsonAlpha_Chipseq_A549_Pol2_Dex_Dec09            | approved |       8 | 
|  812 | HudsonAlpha_Chipseq_GM12878_Bcl3_Dec09             | approved |       8 | 
|  813 | HudsonAlpha_ChIPSeq_A549_Pol2_1hEtOH_Dec09         | approved |       8 | 
|  814 | HudsonAlpha_Chipseq_hESC_NRSF_Dec09                | approved |       8 | 
|  830 | HudsonAlpha_Chipseq_GM12878_Sp1                    | approved |       8 | 
|  832 | HudsonAlpha_Chipseq_ZBTB33_HepG2                   | approved |       8 | 
|  833 | HudsonAlpha_ChIPSeq_H1-hESC_Taf1                   | approved |       8 | 
|  867 | HAIB_Chipseq_HepG2_FosL2                           | approved |       8 | 
|  876 | HAIB_Chipseq_HepG2_HEY1_Dec09                      | approved |       8 | 
|  878 | HAIB_Chipseq_HepG2_RXRA_Dec09                      | approved |       8 | 
|  879 | HAIB_Chipseq_H1-hESC_Pol2_Dec09                    | approved |       8 | 
|  880 | HAIB FASTQ_Submissions_Dec09                       | approved |       8 | 
|  899 | HudsonAlpha_Chipseq_A549_CTCF_Jan10                | approved |       8 | 
|  901 | HudsonAlpha__Chipseq_A549_USF1_Jan10               | approved |       8 | 
|  902 | HudsonAlpha_RnaSeq_A549_Jan10                      | approved |       8 | 
|  913 | HudsonAlpha_ChipSeq_USF1_A549_Dex_Jan10            | approved |       8 | 
|  920 | HudsonAlpha_Chipseq_Pol2-4H8_GM12878_Jan10         | approved |       8 | 
|  958 | HudsonAlpha_Chipseq_Pol2-4H8_hESC_Jan10            | approved |       8 | 
|  973 | HudsonAlpha_ChIP-seq_GM12891_SPI1_Jan10            | approved |       8 | 
|  976 | HAIB_Chipseq_pol2-4H8-GM12891                      | approved |       8 | 
|  977 | HudsonAlpha_Chipseq_pol2WG-GM12891_Jan10           | approved |       8 | 
|  978 | HudsonAlpha_Chipseq_Oct2_GM12891_Jan10             | approved |       8 | 
|  979 | HudsonAlpha_ChIP-seq_GM12891_TAF1_Jan10            | approved |       8 | 
|  980 | HudsonAlpha_ChIP-seq_GM12892_Pol2_Jan10            | approved |       8 | 
|  981 | HudsonAlpha_ChIP-seq_GM12892_Pol2-4H8_Jan10        | approved |       8 | 
|  994 | HudsonAlpha_ChIP-seq_GM12892_TAF1_Jan10            | approved |       8 | 
| 1003 | HudsonAlpha_Chipseq_CTCF_A549_EtOH_Jan10           | approved |       8 | 
| 1028 | HudsonAlpha_Chipseq_Jurkat_Pol2_Jan10              | approved |       8 | 
| 1060 | HudsonAlpha_Chipseq_Dec1_HepG2_Jan10               | approved |       8 | 
| 1084 | HudsonAlpha_RNAseq_Jurkat_Jan10                    | approved |       8 | 
+------+----------------------------------------------------+----------+---------+
63 rows in set (0.00 sec)

/cluster/data/encode/pipeline/bin/encodeStatus.pl    6 reviewing
/cluster/data/encode/pipeline/bin/encodeStatus.pl    7 reviewing
/cluster/data/encode/pipeline/bin/encodeStatus.pl  259 reviewing
/cluster/data/encode/pipeline/bin/encodeStatus.pl  260 reviewing
/cluster/data/encode/pipeline/bin/encodeStatus.pl  261 reviewing
/cluster/data/encode/pipeline/bin/encodeStatus.pl  262 reviewing
/cluster/data/encode/pipeline/bin/encodeStatus.pl  268 reviewing
/cluster/data/encode/pipeline/bin/encodeStatus.pl  422 reviewing
/cluster/data/encode/pipeline/bin/encodeStatus.pl  432 reviewing
/cluster/data/encode/pipeline/bin/encodeStatus.pl  433 reviewing
/cluster/data/encode/pipeline/bin/encodeStatus.pl  434 reviewing
/cluster/data/encode/pipeline/bin/encodeStatus.pl  435 reviewing
/cluster/data/encode/pipeline/bin/encodeStatus.pl  436 reviewing
/cluster/data/encode/pipeline/bin/encodeStatus.pl  437 reviewing
/cluster/data/encode/pipeline/bin/encodeStatus.pl  438 reviewing
/cluster/data/encode/pipeline/bin/encodeStatus.pl  741 reviewing
/cluster/data/encode/pipeline/bin/encodeStatus.pl  756 reviewing
/cluster/data/encode/pipeline/bin/encodeStatus.pl  759 reviewing
/cluster/data/encode/pipeline/bin/encodeStatus.pl  768 reviewing
/cluster/data/encode/pipeline/bin/encodeStatus.pl  774 reviewing
/cluster/data/encode/pipeline/bin/encodeStatus.pl  776 reviewing
/cluster/data/encode/pipeline/bin/encodeStatus.pl  780 reviewing
/cluster/data/encode/pipeline/bin/encodeStatus.pl  781 reviewing
/cluster/data/encode/pipeline/bin/encodeStatus.pl  782 reviewing
/cluster/data/encode/pipeline/bin/encodeStatus.pl  783 reviewing
/cluster/data/encode/pipeline/bin/encodeStatus.pl  795 reviewing
/cluster/data/encode/pipeline/bin/encodeStatus.pl  798 reviewing
/cluster/data/encode/pipeline/bin/encodeStatus.pl  801 reviewing
/cluster/data/encode/pipeline/bin/encodeStatus.pl  802 reviewing
/cluster/data/encode/pipeline/bin/encodeStatus.pl  803 reviewing
/cluster/data/encode/pipeline/bin/encodeStatus.pl  804 reviewing
/cluster/data/encode/pipeline/bin/encodeStatus.pl  806 reviewing
/cluster/data/encode/pipeline/bin/encodeStatus.pl  807 reviewing
/cluster/data/encode/pipeline/bin/encodeStatus.pl  809 reviewing
/cluster/data/encode/pipeline/bin/encodeStatus.pl  812 reviewing
/cluster/data/encode/pipeline/bin/encodeStatus.pl  813 reviewing
/cluster/data/encode/pipeline/bin/encodeStatus.pl  814 reviewing
/cluster/data/encode/pipeline/bin/encodeStatus.pl  830 reviewing
/cluster/data/encode/pipeline/bin/encodeStatus.pl  832 reviewing
/cluster/data/encode/pipeline/bin/encodeStatus.pl  833 reviewing
/cluster/data/encode/pipeline/bin/encodeStatus.pl  867 reviewing
/cluster/data/encode/pipeline/bin/encodeStatus.pl  876 reviewing
/cluster/data/encode/pipeline/bin/encodeStatus.pl  878 reviewing
/cluster/data/encode/pipeline/bin/encodeStatus.pl  879 reviewing
/cluster/data/encode/pipeline/bin/encodeStatus.pl  880 reviewing
/cluster/data/encode/pipeline/bin/encodeStatus.pl  899 reviewing
/cluster/data/encode/pipeline/bin/encodeStatus.pl  901 reviewing
/cluster/data/encode/pipeline/bin/encodeStatus.pl  913 reviewing
/cluster/data/encode/pipeline/bin/encodeStatus.pl  920 reviewing
/cluster/data/encode/pipeline/bin/encodeStatus.pl  958 reviewing
/cluster/data/encode/pipeline/bin/encodeStatus.pl  973 reviewing
/cluster/data/encode/pipeline/bin/encodeStatus.pl  976 reviewing
/cluster/data/encode/pipeline/bin/encodeStatus.pl  977 reviewing
/cluster/data/encode/pipeline/bin/encodeStatus.pl  978 reviewing
/cluster/data/encode/pipeline/bin/encodeStatus.pl  979 reviewing
/cluster/data/encode/pipeline/bin/encodeStatus.pl  980 reviewing
/cluster/data/encode/pipeline/bin/encodeStatus.pl  981 reviewing
/cluster/data/encode/pipeline/bin/encodeStatus.pl  994 reviewing
/cluster/data/encode/pipeline/bin/encodeStatus.pl 1003 reviewing
/cluster/data/encode/pipeline/bin/encodeStatus.pl 1028 reviewing
/cluster/data/encode/pipeline/bin/encodeStatus.pl 1060 reviewing


2010-05-14 Loading newly submitted fastq's to hg18 through the back door
========================================================================
cd {pip}
cd 1191
edit DAF and DDF
1) Fill anitbody column with "Input"
2) Change DAF to only accept fastq
update projects set status = "uploaded" where id = 1191;
~qateam/bin/scripts/doEncodeValidate.pl -configDir=/cluster/home/qateam/kent/src/hg/encode/encodeValidate/config . /hive/groups/encode/dcc/pipeline/encpipeline_prod/1191 > validate_err 2>&1 &
~qateam/bin/scripts/doEncodeLoad.pl -configDir=/cluster/home/qateam/kent/src/hg/encode/encodeValidate/config . /hive/groups/encode/dcc/pipeline/encpipeline_prod/1191 > load_err 2>&1 &

cd out/
grep metadata fileDb.ra > tmp.ra
e tmp.ra
1) add inputType and setType
e tmp.ra
mdbUpdate hg18 tmp.ra
Using table named 'hg18.metaDb_tdreszer'.
Read 10 metadata objects from hg18
Affected 175 row(s) in hg18.metaDb_tdreszer

cd {downloadsDir}/release2/
# bad voodoo.  Old pipeline leaves these as symlinks!
rm wgEncodeHudsonalphaChipSeqRawDataRep1Gm12878Tcf12Pcr1x.fastq.gz  
rm wgEncodeHudsonalphaChipSeqRawDataRep1Gm12878InputPcr1x.fastq.gz
rm wgEncodeHudsonalphaChipSeqRawDataRep2Gm12878Pou2f2Pcr1x.fastq.gz
rm wgEncodeHudsonalphaChipSeqRawDataRep2Gm12878Pbx3Pcr1x.fastq.gz
rm wgEncodeHudsonalphaChipSeqRawDataRep1K562Sp1Pcr1x.fastq.gz
rm wgEncodeHudsonalphaChipSeqRawDataRep2Gm12878InputPcr1x.fastq.gz
rm wgEncodeHudsonalphaChipSeqRawDataRep1Gm12878Pbx3Pcr1x.fastq.gz
rm wgEncodeHudsonalphaChipSeqRawDataRep1Gm12878Pou2f2Pcr1x.fastq.gz
rm wgEncodeHudsonalphaChipSeqRawDataRep1Gm12878Sp1Pcr1x.fastq.gz
rm wgEncodeHudsonalphaChipSeqRawDataRep1Gm12878Taf1Pcr2x.fastq.gz
rm wgEncodeHudsonalphaChipSeqRawDataRep2Gm12878Pou2f2Pcr1x.fastq.gz
rm wgEncodeHudsonalphaChipSeqRawDataRep1Gm12878Sp1Pcr1x.fastq.gz

cp /hive/groups/encode/dcc/pipeline/encpipeline_prod/1191/data/SL673.fastq.gz wgEncodeHudsonalphaChipSeqRawDataRep1Gm12878Tcf12Pcr1x.fastq.gz
cp /hive/groups/encode/dcc/pipeline/encpipeline_prod/1191/data/SL516.fastq.gz wgEncodeHudsonalphaChipSeqRawDataRep1Gm12878InputPcr1x.fastq.gz
cp /hive/groups/encode/dcc/pipeline/encpipeline_prod/1191/data/SL648.fastq.gz wgEncodeHudsonalphaChipSeqRawDataRep2Gm12878Pou2f2Pcr1x.fastq.gz
cp /hive/groups/encode/dcc/pipeline/encpipeline_prod/1191/data/SL647.fastq.gz wgEncodeHudsonalphaChipSeqRawDataRep2Gm12878Pbx3Pcr1x.fastq.gz
cp /hive/groups/encode/dcc/pipeline/encpipeline_prod/1191/data/SL646.fastq.gz wgEncodeHudsonalphaChipSeqRawDataRep1K562Sp1Pcr1x.fastq.gz
cp /hive/groups/encode/dcc/pipeline/encpipeline_prod/1191/data/SL517.fastq.gz wgEncodeHudsonalphaChipSeqRawDataRep2Gm12878InputPcr1x.fastq.gz
cp /hive/groups/encode/dcc/pipeline/encpipeline_prod/1191/data/SL615.fastq.gz wgEncodeHudsonalphaChipSeqRawDataRep1Gm12878Pbx3Pcr1x.fastq.gz
cp /hive/groups/encode/dcc/pipeline/encpipeline_prod/1191/data/SL614.fastq.gz wgEncodeHudsonalphaChipSeqRawDataRep1Gm12878Pou2f2Pcr1x.fastq.gz
cp /hive/groups/encode/dcc/pipeline/encpipeline_prod/1191/data/SL612.fastq.gz wgEncodeHudsonalphaChipSeqRawDataRep1Gm12878Sp1Pcr1x.fastq.gz
cp /hive/groups/encode/dcc/pipeline/encpipeline_prod/1191/data/SL288.fastq.gz wgEncodeHudsonalphaChipSeqRawDataRep1Gm12878Taf1Pcr2x.fastq.gz
cp /hive/groups/encode/dcc/pipeline/encpipeline_prod/1191/data/SL648.fastq.gz wgEncodeHudsonalphaChipSeqRawDataRep2Gm12878Pou2f2Pcr1x.fastq.gz
cp /hive/groups/encode/dcc/pipeline/encpipeline_prod/1191/data/SL612.fastq.gz wgEncodeHudsonalphaChipSeqRawDataRep1Gm12878Sp1Pcr1x.fastq.gz

cd release2/
ln ../wgEncodeHudsonalphaChipSeqRawDataRep1Gm12878Tcf12Pcr1x.fastq.gz .
ln ../wgEncodeHudsonalphaChipSeqRawDataRep1Gm12878InputPcr1x.fastq.gz .
ln ../wgEncodeHudsonalphaChipSeqRawDataRep2Gm12878Pbx3Pcr1x.fastq.gz .
ln ../wgEncodeHudsonalphaChipSeqRawDataRep1K562Sp1Pcr1x.fastq.gz .
ln ../wgEncodeHudsonalphaChipSeqRawDataRep2Gm12878InputPcr1x.fastq.gz .
ln ../wgEncodeHudsonalphaChipSeqRawDataRep1Gm12878Pbx3Pcr1x.fastq.gz .
ln ../wgEncodeHudsonalphaChipSeqRawDataRep1Gm12878Pou2f2Pcr1x.fastq.gz .
ln ../wgEncodeHudsonalphaChipSeqRawDataRep1Gm12878Taf1Pcr2x.fastq.gz .

ln ../wgEncodeHudsonalphaChipSeqRawDataRep2Gm12878Pou2f2Pcr1x.fastq.gz .
ln: creating hard link `./wgEncodeHudsonalphaChipSeqRawDataRep2Gm12878Pou2f2Pcr1x.fastq.gz' to `../wgEncodeHudsonalphaChipSeqRawDataRep2Gm12878Pou2f2Pcr1x.fastq.gz': File exists
ll wgEncodeHudsonalphaChipSeqRawDataRep2Gm12878Pou2f2Pcr1x.fastq.gz
-rw-rw-r-- 2 qateam protein 1149980993 Oct 23  2009 wgEncodeHudsonalphaChipSeqRawDataRep2Gm12878Pou2f2Pcr1x.fastq.gz
ll ../wgEncodeHudsonalphaChipSeqRawDataRep2Gm12878Pou2f2Pcr1x.fastq.gz
-rw-rw-r-- 1 tdreszer protein 2441997045 May 14 17:27 ../wgEncodeHudsonalphaChipSeqRawDataRep2Gm12878Pou2f2Pcr1x.fastq.gz
ll ../releae1/wgEncodeHudsonalphaChipSeqRawDataRep2Gm12878Pou2f2Pcr1x.fastq.gz
# Take the more recent!
rm wgEncodeHudsonalphaChipSeqRawDataRep2Gm12878Pou2f2Pcr1x.fastq.gz
ln ../wgEncodeHudsonalphaChipSeqRawDataRep2Gm12878Pou2f2Pcr1x.fastq.gz .

ln ../wgEncodeHudsonalphaChipSeqRawDataRep1Gm12878Sp1Pcr1x.fastq.gz .
ln: creating hard link `./wgEncodeHudsonalphaChipSeqRawDataRep1Gm12878Sp1Pcr1x.fastq.gz' to `../wgEncodeHudsonalphaChipSeqRawDataRep1Gm12878Sp1Pcr1x.fastq.gz': File exists
ll wgEncodeHudsonalphaChipSeqRawDataRep1Gm12878Sp1Pcr1x.fastq.gz 
w-rw-r-- 1 qateam protein 1831089419 Dec 11 07:51 wgEncodeHudsonalphaChipSeqRawDataRep1Gm12878Sp1Pcr1x.fastq.gz
ll ../wgEncodeHudsonalphaChipSeqRawDataRep1Gm12878Sp1Pcr1x.fastq.gz 
-rw-rw-r-- 1 tdreszer protein 2050488656 May 14 17:28 ../wgEncodeHudsonalphaChipSeqRawDataRep1Gm12878Sp1Pcr1x.fastq.gz
# Take the more recent!
rm wgEncodeHudsonalphaChipSeqRawDataRep1Gm12878Sp1Pcr1x.fastq.gz 
ln ../wgEncodeHudsonalphaChipSeqRawDataRep1Gm12878Sp1Pcr1x.fastq.gz .

cd ..
md5sum wgEncodeHudsonalphaChipSeqRawDataRep1Gm12878Tcf12Pcr1x.fastq.gz > tmp.txt
md5sum wgEncodeHudsonalphaChipSeqRawDataRep1Gm12878InputPcr1x.fastq.gz >> tmp.txt
md5sum wgEncodeHudsonalphaChipSeqRawDataRep2Gm12878Pou2f2Pcr1x.fastq.gz >> tmp.txt
md5sum wgEncodeHudsonalphaChipSeqRawDataRep2Gm12878Pbx3Pcr1x.fastq.gz >> tmp.txt
md5sum wgEncodeHudsonalphaChipSeqRawDataRep1K562Sp1Pcr1x.fastq.gz >> tmp.txt
md5sum wgEncodeHudsonalphaChipSeqRawDataRep2Gm12878InputPcr1x.fastq.gz >> tmp.txt
md5sum wgEncodeHudsonalphaChipSeqRawDataRep1Gm12878Pbx3Pcr1x.fastq.gz >> tmp.txt
md5sum wgEncodeHudsonalphaChipSeqRawDataRep1Gm12878Pou2f2Pcr1x.fastq.gz >> tmp.txt
md5sum wgEncodeHudsonalphaChipSeqRawDataRep1Gm12878Sp1Pcr1x.fastq.gz >> tmp.txt
md5sum wgEncodeHudsonalphaChipSeqRawDataRep1Gm12878Taf1Pcr2x.fastq.gz >> tmp.txt
cat tmp.txt >> md5sum.txt
sort -k 2 md5sum.txt md5sum.txt.s
tail md5sum.txt.s
mv md5sum.txt.s md5sum.txt
cp md5sum.txt release2/
encodeDownloadsPage.pl -db=hg18 -mdb=metaDb_tdreszer index.html .
cp index.html release2/
cp files.txt release2/

cd hg18/testing
mdbPrint hg18 -vars="composite=wgEncodeHudsonalphaChipSeq" -countObjs
Using table named 'hg18.metaDb_tdreszer'.
701 objects
mdbPrint hg18 -table=metaDb -vars="composite=wgEncodeHudsonalphaChipSeq" -countObjs
693 objects
mdbPrint hg18 -vars="composite=wgEncodeHudsonalphaChipSeq" > ../metaDb/alpha/wgEncodeHudsonalphaChipSeq.ra 
Using table named 'hg18.metaDb_tdreszer'.
objects:701  vars:15166
cd ../metaDb/alpha/
cvs up
cvs diff -w wgEncodeHudsonalphaChipSeq.ra | m
< dateSubmitted 2009-12-17
< dateUnrestricted 2010-09-16
---
> dateSubmitted 2010-05-14
> dateUnrestricted 2011-02-14


mdbUpdate hg18 -obj=wgEncodeHudsonalphaChipSeqRawDataRep2Gm12878Pou2f2Pcr1x -setVars="dateUnrestricted=2010-09-16 dateSubmitted=2009-12-17 dateResubmitted=2010-05-14" -test
mdbUpdate hg18 -obj=wgEncodeHudsonalphaChipSeqRawDataRep1Gm12878Sp1Pcr1x -setVars="dateUnrestricted=2010-04-20 dateSubmitted=2010-01-15 dateResubmitted=2010-05-14" -test
mdbUpdate hg18 -obj=wgEncodeHudsonalphaChipSeqRawDataRep2Gm12878Pou2f2Pcr1x -setVars="dateUnrestricted=2010-09-16 dateSubmitted=2009-12-17 dateResubmitted=2010-05-14"
mdbUpdate hg18 -obj=wgEncodeHudsonalphaChipSeqRawDataRep1Gm12878Sp1Pcr1x -setVars="dateUnrestricted=2010-04-20 dateSubmitted=2010-01-15 dateResubmitted=2010-05-14"
mdbPrint hg18 -vars="composite=wgEncodeHudsonalphaChipSeq" > wgEncodeHudsonalphaChipSeq.ra 

mdbUpdate hg18 -table=metaDb wgEncodeHudsonalphaChipSeq.ra
Read 701 metadata objects from hg18
Affected 177 row(s) in hg18.metaDb

cvs up
cvs ci -m "Arrival of some missing fastqs for hg18" wgEncodeHudsonalphaChipSeq.ra

cd {docs} dir
e haibTfsbRelease2Lists.txt
doc

mdbPrint hg18 -obj=wgEncodeHudsonalphaChipSeqRawDataRep1K562Sp1Pcr1x
inputType GM12878/None/Input/PCR1x

mdbUpdate hg18 -obj=wgEncodeHudsonalphaChipSeqRawDataRep1K562Sp1Pcr1x -setVars="inputType=K562/None/Input/PCR1x"
cd hg18/metaDb/alpha
mdbPrint hg18 -vars="composite=wgEncodeHudsonalphaChipSeq" > wgEncodeHudsonalphaChipSeq.ra 
cvs up
cvs diff -w wgEncodeHudsonalphaChipSeq.ra | m
mdbUpdate hg18 -table=metaDb wgEncodeHudsonalphaChipSeq.ra
Read 701 metadata objects from hg18
Affected 1 row(s) in hg18.metaDb
cvs up
cvs ci -m "Fix one inputType" wgEncodeHudsonalphaChipSeq.ra

cd {downloadsDir}
encodeDownloadsPage.pl -db=hg18 -mdb=metaDb index.html .
cp index.html release2/
cp files.txt release2/

## Finally all done with this except for informing QA and Preti

/cluster/data/encode/pipeline/bin/encodeStatus.pl 1191 loaded
/cluster/data/encode/pipeline/bin/encodeStatus.pl 1191 displayed
/cluster/data/encode/pipeline/bin/encodeStatus.pl 1191 approved
/cluster/data/encode/pipeline/bin/encodeStatus.pl 1191 reviewing

