###
# instructions for building CCDS tracks and log of CCDS database imports
#  independent of assembly
###

############################################################################
# Process for importing CCDS into ccds databases.  Per-assembly tracks are
# built from this database.  ${date} represents the date code
############################################################################

    cd /cluster/data/genbank/data/ccds/
    ftp ftp-private.ncbi.nih.gov (user ccds, needs password)
    get CCDS.${date}.tar.gz
    mkdir /scratch/tmp/ccds
    cd /scratch/tmp/ccds
    tar -zxf /cluster/data/genbank/data/ccds/CCDS.${date}.tar.gz

    # import ccds database tables
    /cluster/data/genbank/bin/x86_64/ccdsImport ccds data/*.txt
    cd ..
    rm -rf /scratch/tmp/ccds

############################################################################
# Process for building CCDS for an assembly in database ${db}.  This is
# a template for inserting in the ${db}.txt
############################################################################
# Reload CCDS from CCDS.xxxx dump ()
    # import ccds database as described in ccds.txt
    set db=XXXX
    set ncbiBld=YYYYY
    # create and load ccdsGene and ccdsInfo tables from imported database
    /cluster/data/genbank/bin/x86_64/ccdsMkTables -loadDb ccds ${db} ${ncbiBld} ccdsInfo ccdsGene

    # ccdsKgMap
    /cluster/data/genbank/bin/x86_64/mkCcdsGeneMap -db=${db} -loadDb ccdsGene knownGene ccdsKgMap

    checkTableCoords ${db} -verbose=2 ccdsGene
    # update all.jointer to include ${db} in ccdsDb
    joinerCheck -database=${db} -identifier=ccdsGeneId ~/compbio/genbank/kent/src/hg/makeDb/schema/all.joiner
    # request push of 
        ccdsGene
        ccdsInfo
        ccdsKgMap
    # << emacs
############################################################################

############################################################################
# CCDS import log
2007-12-12 markd import of CCDS.20071212 as described above
2008-02-01 markd import of CCDS.20080201 as described above
2008-03-31 markd import of CCDS.20080331 as described above
2008-05-03 markd import of CCDS.20080502 as described above
                 - update mm8/36.1,mm9/37.1,hg18/36.3 (includes hg18 reannotation)
                 
