src/hg/makeDb/doc/hivMn2.txt 1.8

1.8 2009/03/03 00:06:48 fanhsu
Added posSelection for vax004 section.
Index: src/hg/makeDb/doc/hivMn2.txt
===================================================================
RCS file: /projects/compbio/cvsroot/kent/src/hg/makeDb/doc/hivMn2.txt,v
retrieving revision 1.7
retrieving revision 1.8
diff -b -B -U 1000000 -r1.7 -r1.8
--- src/hg/makeDb/doc/hivMn2.txt	14 Jan 2009 17:56:00 -0000	1.7
+++ src/hg/makeDb/doc/hivMn2.txt	3 Mar 2009 00:06:48 -0000	1.8
@@ -1,673 +1,676 @@
 # for emacs: -*- mode: sh; -*-
 #########################################################################
 # hivmn2 DATABASE BUILD (STARTED 04/15/08, DONE 4/21/08, Fan)
 
     ssh hiv1
     mkdir -p /cluster/store12/medical/hiv/hivmn2
     cd /cluster/store12/medical/hiv/hivmn2
 
     cd /gbdb
     mkdir hivmn2
     cd hivmn2
     cp -Rp ../hivmn1/* .
 
 # CREATING DATABASE 
 
 # Create the hivmn2 database.
     
     echo 'create database hivmn2' | hgsql hiv1
 
 # CREATING GRP TABLE FOR TRACK GROUPING (DONE 4/15/08)
     
     echo "create table grp (PRIMARY KEY(NAME)) select * from hiv1.grp" \
       | hgsql hivmn2
 
 # MAKE HGCENTRALHIV1 ENTRY AND TRACKDB TABLE FOR HIVMN2 
 
     echo 'insert into defaultDb values("HIV MN (GP120) V2.0", "hivmn2");' \
       | hgsql -h localhost hgcentralhiv1
 
     echo 'insert into dbDb values("hivmn2", "Oct. 2007", \
           "/gbdb/hivmn2/nib", "HIV MN (GP120) V2.0", "chr1", 1, 2030, \
     "HIV MN (GP120) V2.0","Human immunodeficiency     virus 1", \
     "/gbdb/hivmn2/html/description.html", 0, 0, " sequence as of Oct., 2007");' \
       | hgsql hgcentralhiv1 -h localhost
 
     echo 'insert into genomeClade values("HIV MN (GP120) V2.0", "other", 110);'\
       | hgsql hgcentralhiv1 -h localhost
 
 # COPY OVER MYSQL TABLES FROM hivmn1
 
     Cd medical/hiv/hivmn2
 
 # create do1 with the following lines:
 
 echo processing table $1 ...
 
 #hgsql hivmn2 -e "drop table ${1}"
 
 getDbTableDef hivmn1 $1 >$1.sql
 hgsql hivmn1 -N -e "select * from ${1}" >$1.tab
 hgsql hivmn2 <$1.sql
 
 hgsql hivmn2 -e "load data local infile '${1}.tab' into table ${1}"
 
 # create doall with the following lines:
 
 #hgsql hivmn1 -e 'drop database hivmn2'
 hgsql hivmn1 -e 'create database hivmn2'
 do1 aaSeq 
 do1 chromInfo 
 do1 dnaSeq 
 do1 extFile 
 do1 grp 
 do1 gsIdXref 
 do1 gsidClinicRec 
 do1 gsidClinicRecWithSeq 
 do1 gsidSubjInfo 
 do1 hSeq 
 do1 hgFindSpec 
 do1 hgFindSpec_fanhsu 
 do1 history 
 do1 hivGene 
 do1 interPro 
 do1 seq 
 do1 tableDescriptions 
 do1 trackDb 
 do1 trackDb_fanhsu 
 do1 vax004 
 do1 vax004AaCons 
 do1 vax004Cons 
 do1 vax004Msa
 
     chmod +x do*
 
     doall
 
 
 # create trackDb
 
     cd kent/src/hg/makeDb/trackDb
 
 # edit makefile to add hivmn2
     vi trackDb.ra
 
     cd hiv
     mkdir hivmn2
     cd hivmn2
     cp -p ../hivmn1/* .
 
     cd ../..
     make alpha DBS=hivmn2
 
 # Ask admin to start BLAT server process for hivmn2 and then
 # MAKE HGCENTRALHIV1 BLATSERVERS ENTRY FOR HIVMN2
     ssh hiv1
     echo 'insert into blatServers values("hivmn2", "hiv1", "17792", "1", "0"); \
           insert into blatServers values("hivmn2", "hiv1", "17793", "0", "0");' \
       | hgsql hgcentralhiv1 -h localhost
 
 # COPY OVER MSA TABLES
 
     mkdir -p /cluster/store12/medical/hiv/hivmn2/msa/AE
     cd /cluster/store12/medical/hiv/hivmn2/msa/AE
 
 # get table definition
     mysqldump -d hivVax003Vax004 vax003AEMsa -u medcat -p$HGPSWD|hgsql hivmn2
 
 # load the table   
     hgsql hivmn2 -e "insert into vax003AEMsa select * from hivVax003Vax004.vax003AEMsa"
 
 
 # CREATE MAF TRACKS FOR VAX004
 
     mkdir -p /cluster/store12/medical/hiv/hivmn2/msa
     cd /cluster/store12/medical/hiv/hivmn2/msa
 
 # create a script file, doall
 
     hgsql hivmn2 -N -e \
     'select id from dnaSeq where id like "%U%"'\
     |sed -e 's/ss/do1 ss/g' >doall
 
 # create one line script file, do1, with the following line in it:
 
     hgsql hivmn2 -N -e  "select id, seq from vax004Msa where id='${1}'"
 
     chmod +x do*
 
 # run the script to get the .tab file with all MSA sequences of VAX004
     doall >mn2.tab
 # convert .tab into .fa file
     tabToFa mn2
 
 # grab the base alignment sequence
     echo ">hivmn2" >mn2.aln
     hgsql hivmn2 -N -e 'select seq from vax004Msa where id="MN"'  >> mn2.aln
 
 # prepare an interium file, jjAll.mfa
     cat mn2.aln mn2.fa >jjAll.mfa
     echo = >>jjAll.mfa
 
 # Run xmfaToMafMn1 to create a precursor file for the final .maf
 
     xmfaToMafMn1 jjAll.mfa j.out  org1=hivmn2
     cat j.out|sed -e 's/\./_/g'|sed -e 's/_chr/\.chr/g' >chr1.tmp
 
     rm jjAll.mfa j.out
 
     cat chr1.tmp |sed -e 's/ss_U/U/g' >chr1.maf
 
 # copy .maf to /gbdb.
 
     mkdir -p  /gbdb/hivmn2/vax004Maf 
     cp chr1.maf /gbdb/hivmn2/vax004Maf -p
     echo before load
     hgLoadMaf hivmn2 vax004Maf
 
 # create another copy for protein MAF.
 
     mkdir -p  /gbdb/hivmn2/vax004AaMaf 
     cp -p chr1.maf /gbdb/hivmn2/vax004AaMaf
     hgLoadMaf hivmn2 vax004AaMaf
 
 # CREATE CONSERVATION TRACKS FOR AE STRAIN
 
     mkdir -p /cluster/store12/medical/hiv/hivmn2/conservation/AE
     cd /cluster/store12/medical/hiv/hivmn2/conservation/AE
 
 # create the .wig file and .fa file of the consensus sequence.
     gsidMsa hivmn2 vax003AEMsa MN_D533-gp120 166 vax003AECons.wig vax003AEConsensus.fa
 
 # encode and load the wig file
     wigEncode vax003AECons.wig stdout vax003AECons.wib \
     | hgLoadWiggle hivmn2 vax003AECons stdin
 
 # copy .wib file to /gbdb
     mkdir -p /gbdb/hivmn2/wib
     cp vax003AECons.wib /gbdb/hivmn2/wib
 
 # do the same for protein conservation track
 
     mkdir aa
     cd aa
 
 # create .wig file
     gsidAaMsa2 hivmn2 vax003AEMsa MN_D533-gp120 166 vax003AEAaCons.wig vax003AEAaConsensus.fa
 
 # encode and load the .wib file   
     wigEncode vax003AEAaCons.wig stdout vax003AEAaCons.wib \
     | hgLoadWiggle hivmn2 vax003AEAaCons stdin
 
     cp vax003AEAaCons.wib /gbdb/hivmn2/wib
 
 # CREATE MAF TRACKS FOR AE STRAIN
 
     mkdir -p /cluster/store12/medical/hiv/hivmn2/msa/AE
     cd /cluster/store12/medical/hiv/hivmn2/msa/AE
 
 # create a script file, doall
 
     hgsql hivmn2 -N -e \
     'select id from dnaSeq where id like "%T%"'\
     |sed -e 's/ss/do1 ss/g' >doall
 
 # create one line script file, do1, with the following line in it:
 
     hgsql hivmn2 -N -e  "select id, seq from vax003AEMsa where id='${1}'"
 
     chmod +x do*
 
 # run the script to get the .tab file with all MSA sequences of VAX004
     doall >mn2.tab
 # convert .tab into .fa file
     tabToFa mn2
 
 # grab the base alignment sequence
     echo ">hivmn2" >mn2.aln
     hgsql hivmn2 -N -e 'select seq from vax003AEMsa where id="MN_D533-gp120"'  >> mn2.aln
 
 # prepare an interium file, jjAll.mfa
     cat mn2.aln mn2.fa >jjAll.mfa
     echo = >>jjAll.mfa
 
 # Run xmfaToMafMn2AE to create a precursor file for the final .maf
 
     xmfaToMafMn2AE jjAll.mfa j.out  org1=hivmn2
     cat j.out|sed -e 's/\./_/g'|sed -e 's/_chr/\.chr/g' >chr1.tmp
 
     rm jjAll.mfa j.out
 
     cat chr1.tmp |sed -e 's/ss_T/T/g' >chr1.maf
 
 # copy .maf to /gbdb.
 
     mkdir -p  /gbdb/hivmn2/vax003AEMaf
     cp chr1.maf /gbdb/hivmn2/vax003AEMaf -p
     echo before load
     hgLoadMaf hivmn2 vax003AEMaf
 
 # create another copy for protein MAF.
 
     mkdir -p  /gbdb/hivmn2/vax003AEAaMaf 
     cp -p chr1.maf /gbdb/hivmn2/vax003AEAaMaf
     hgLoadMaf hivmn2 vax003AEAaMaf
 
 
 
 # COPY OVER MSA TABLES FOR B STRAIN
 
     mkdir -p /cluster/store12/medical/hiv/hivmn2/msa/B
     cd /cluster/store12/medical/hiv/hivmn2/msa/B
 
 # get table definition
     mysqldump -d hivVax003Vax004 vax003BMsa -u medcat -p$HGPSWD|hgsql hivmn2
 
 # load the table   
     hgsql hivmn2 -e "insert into vax003BMsa select * from hivVax003Vax004.vax003BMsa"
 
 # CREATE CONSERVATION TRACKS FOR B STRAIN
 
     mkdir -p /cluster/store12/medical/hiv/hivmn2/conservation/B
     cd /cluster/store12/medical/hiv/hivmn2/conservation/B
 
 # create the .wig file and .fa file of the consensus sequence.
     gsidMsa hivmn2 vax003BMsa MN_D533-gp120 166 vax003BCons.wig vax003BConsensus.fa
 
 # encode and load the wig file
     wigEncode vax003BCons.wig stdout vax003BCons.wib \
     | hgLoadWiggle hivmn2 vax003BCons stdin
 
 # copy .wib file to /gbdb
     mkdir -p /gbdb/hivmn2/wib
     cp vax003BCons.wib /gbdb/hivmn2/wib
 
 # do the same for protein conservation track
 
     mkdir aa
     cd aa
 
 # create .wig file
     gsidAaMsa2 hivmn2 vax003BMsa MN_D533-gp120 166 vax003BAaCons.wig vax003BAaConsensus.fa
 
 # encode and load the .wib file   
     wigEncode vax003BAaCons.wig stdout vax003BAaCons.wib \
     | hgLoadWiggle hivmn2 vax003BAaCons stdin
 
     cp vax003BAaCons.wib /gbdb/hivmn2/wib
 
 # CREATE MAF TRACKS FOR B STRAIN
 
     mkdir -p /cluster/store12/medical/hiv/hivmn2/msa/B
     cd /cluster/store12/medical/hiv/hivmn2/msa/B
 
 # create a script file, doall
 
     hgsql hivmn2 -N -e \
     'select id from dnaSeq where id like "%T%"'\
     |sed -e 's/ss/do1 ss/g' >doall
 
 # create one line script file, do1, with the following line in it:
 
     hgsql hivmn2 -N -e  "select id, seq from vax003BMsa where id='${1}'"
 
     chmod +x do*
 
 # run the script to get the .tab file with all MSA sequences of VAX004
     doall >mn2.tab
 # convert .tab into .fa file
     tabToFa mn2
 
 # grab the base alignment sequence
     echo ">hivmn2" >mn2.aln
     hgsql hivmn2 -N -e 'select seq from vax003BMsa where id="MN_D533-gp120"'  >> mn2.aln
 
 # prepare an interium file, jjAll.mfa
     cat mn2.aln mn2.fa >jjAll.mfa
     echo = >>jjAll.mfa
 
 # Run xmfaToMafMn2B to create a precursor file for the final .maf
 
     xmfaToMafMn1 jjAll.mfa j.out  org1=hivmn2
     cat j.out|sed -e 's/\./_/g'|sed -e 's/_chr/\.chr/g' >chr1.tmp
 
     rm jjAll.mfa j.out
 
     cat chr1.tmp |sed -e 's/ss_T/T/g' >chr1.maf
 
 # copy .maf to /gbdb.
 
     mkdir -p  /gbdb/hivmn2/vax003BMaf
     cp chr1.maf /gbdb/hivmn2/vax003BMaf -p
     
     hgLoadMaf hivmn2 vax003BMaf
 
 # create another copy for protein MAF.
 
     mkdir -p  /gbdb/hivmn2/vax003BAaMaf 
     cp -p chr1.maf /gbdb/hivmn2/vax003BAaMaf
     hgLoadMaf hivmn2 vax003BAaMaf
 
 #########################################################################
 # CREATE VAX003 TRACK	(Done 5/13/08, Fan) 
 
     cd ~/medical/hiv/hivmn2
 
 # get vax003 sequences
     hgsql hivmn2 -N -e 'select * from dnaSeq where id like "%T%"' >vax003.tab
 
 # create .fa file
     tabToFa vax003
 
     mkdir -p /gbdb/hivmn2/vax003
     cp -p vax003.fa /gbdb/hivmn2/vax003/vax003.fa
 
     hgLoadSeq -replace hivmn2 /gbdb/hivmn2/vax003/vax003.fa
 
 # BLAT
     gfClient -minScore=200 -minIdentity=70 -nohead hiv1.cse.ucsc.edu 17793 \
     /gbdb/hivmn2/nib -out=psl -t=dna -q=dna vax003.fa vax003.psl
 
 # count the result
     wc *.psl
     cut -f 10 vax003.psl |wc
     cut -f 10 vax003.psl |sort -u |wc
 
 # load the psl result into vax003 table
     hgLoadPsl hivmn2 vax003.psl
 
 # hgLoadPsl has some file permission problem.  Finish this by manually load the psl.tab file.
     hgsql hivmn2 -e 'load data local infile "psl.tab" into table vax003'
 
 #########################################################################
 # Build the gsidSubjSeq table (used by Table View).
 
    gsidSubjSeq hivmn2 dnaSeqId > j.dna
    gsidSubjSeq hivmn2 aaSeqId > j.aa
 
    cut -f 1 j.dna >j.1
    cut -f 1 j.aa  >j.2
 
    cut -f 2 j.dna  >j.3
    cut -f 2 j.aa   >j.4
 
    paste j.1 j.3 j.4> gsidSubjSeq.tab
 
    hgsql hivmn2 -e 'delete from gsidSubjSeq'
    hgsql hivmn2 -e \
    'load data local infile "gsidSubjSeq.tab" into table gsidSubjSeq'
 
    rm j.1 j.2 j.3 j.4 j.dna j.aa
 
 #########################################################################
 # RE-BUILD CONSERVATION AND MSA TRACKS FOR vax003AE
 
 # COPY OVER shortened MSA sequences from hivVax003Vax003
 
     mkdir -p /cluster/store12/medical/hiv/hivmn2/msaNew/AE
     cd /cluster/store12/medical/hiv/hivmn2/msaNew/AE
 
     hgsql hivmn2 -e "delete from vax003AEMsa"
     hgsql hivmn2 -e "insert into vax003AEMsa select * from hivVax003Vax003.vax003AEMsa"
 
 # CREATE CONSERVATION TRACKS FOR AE STRAIN
 
     mkdir -p /cluster/store12/medical/hiv/hivmn2/conservationNew/AE
     cd /cluster/store12/medical/hiv/hivmn2/conservationNew/AE
 
 # create the .wig file and .fa file of the consensus sequence.
     gsidMsa hivmn2 vax003AEMsa MN_D533-gp120 166 vax003AECons.wig vax003AEConsensus.fa
 
 # encode and load the wig file
     wigEncode vax003AECons.wig stdout vax003AECons.wib \
     | hgLoadWiggle hivmn2 vax003AECons stdin
 
 # copy .wib file to /gbdb
     mkdir -p /gbdb/hivmn2/wib
     cp vax003AECons.wib /gbdb/hivmn2/wib
 
 # do the same for protein conservationNew track
 
     mkdir aa
     cd aa
 
 # create .wig file
     gsidAaMsa2 hivmn2 vax003AEMsa MN_D533-gp120 166 vax003AEAaCons.wig vax003AEAaConsensus.fa
 
 # encode and load the .wib file   
     wigEncode vax003AEAaCons.wig stdout vax003AEAaCons.wib \
     | hgLoadWiggle hivmn2 vax003AEAaCons stdin
 
     cp vax003AEAaCons.wib /gbdb/hivmn2/wib
 
 # CREATE MAF TRACKS FOR vax003AE STRAIN
 
     mkdir -p /cluster/store12/medical/hiv/hivmn2/msaNew/AE
     cd /cluster/store12/medical/hiv/hivmn2/msaNew/AE
 
 # create a script file, doall
 
     hgsql hivmn2 -N -e \
     'select id from vax003AEMsa where id like "%T%"'\
     |sed -e 's/ss/do1 ss/g' >doall
 
 # create one line script file, do1, with the following line in it:
 
     hgsql hivmn2 -N -e  "select id, seq from vax003AEMsa where id='${1}'"
 
     chmod +x do*
 
 # run the script to get the .tab file with all MSA sequences of VAX004
     doall >mn2.tab
 # convert .tab into .fa file
     tabToFa mn2
 
 # grab the base alignment sequence
     echo ">hivmn2" >mn2.aln
     hgsql hivmn2 -N -e 'select seq from vax003AEMsa where id="MN_D533-gp120"'  >> mn2.aln
 
 # prepare an interium file, jjAll.mfa
     cat mn2.aln mn2.fa >jjAll.mfa
     echo = >>jjAll.mfa
 
 # Run xmfaToMafMn2AE to create a precursor file for the final .maf
 
     xmfaToMafMn2AE jjAll.mfa j.out  org1=hivmn2
     cat j.out|sed -e 's/\./_/g'|sed -e 's/_chr/\.chr/g' >chr1.tmp
 
     rm jjAll.mfa j.out
 
     cat chr1.tmp |sed -e 's/ss_T/T/g' >chr1.maf
 
 # copy .maf to /gbdb.
 
     mkdir -p  /gbdb/hivmn2/vax003AEMaf
     cp chr1.maf /gbdb/hivmn2/vax003AEMaf -p
     echo before load
     hgLoadMaf hivmn2 vax003AEMaf
 
 # create another copy for protein MAF.
 
     mkdir -p  /gbdb/hivmn2/vax003AEAaMaf 
     cp -p chr1.maf /gbdb/hivmn2/vax003AEAaMaf
     hgLoadMaf hivmn2 vax003AEAaMaf
 
 #########################################################################
 # RE-BUILD CONSERVATION AND MSA TRACKS FOR vax003B
 
 # COPY OVER shortened MSA sequences from hivVax003Vax004
 
     mkdir -p /cluster/store12/medical/hiv/hivmn2/msaNew/B
     cd /cluster/store12/medical/hiv/hivmn2/msaNew/B
 
     hgsql hivmn2 -e "delete from vax003BMsa"
     hgsql hivmn2 -e "insert into vax003BMsa select * from hivVax003Vax004.vax003BMsa"
 
 # CREATE CONSERVATION TRACKS FOR B STRAIN
 
     mkdir -p /cluster/store12/medical/hiv/hivmn2/conservationNew/B
     cd /cluster/store12/medical/hiv/hivmn2/conservationNew/B
 
 # create the .wig file and .fa file of the consensus sequence.
     gsidMsa hivmn2 vax003BMsa MN_D533-gp120 166 vax003BCons.wig vax003BConsensus.fa
 
 # encode and load the wig file
     wigEncode vax003BCons.wig stdout vax003BCons.wib \
     | hgLoadWiggle hivmn2 vax003BCons stdin
 
 # copy .wib file to /gbdb
     mkdir -p /gbdb/hivmn2/wib
     cp vax003BCons.wib /gbdb/hivmn2/wib
 
 # do the same for protein conservationNew track
 
     mkdir aa
     cd aa
 
 # create .wig file
     gsidAaMsa2 hivmn2 vax003BMsa MN_D533-gp120 166 vax003BAaCons.wig vax003BAaConsensus.fa
 
 # encode and load the .wib file   
     wigEncode vax003BAaCons.wig stdout vax003BAaCons.wib \
     | hgLoadWiggle hivmn2 vax003BAaCons stdin
 
     cp vax003BAaCons.wib /gbdb/hivmn2/wib
 
 # CREATE MAF TRACKS FOR vax003B STRAIN
 
     mkdir -p /cluster/store12/medical/hiv/hivmn2/msaNew/B
     cd /cluster/store12/medical/hiv/hivmn2/msaNew/B
 
 # create a script file, doall
 
     hgsql hivmn2 -N -e \
     'select id from vax003BMsa where id like "%T%"'\
     |sed -e 's/ss/do1 ss/g' >doall
 
 # create one line script file, do1, with the following line in it:
 
     hgsql hivmn2 -N -e  "select id, seq from vax003BMsa where id='${1}'"
 
     chmod +x do*
 
 # run the script to get the .tab file with all MSA sequences of VAX004
     doall >mn2.tab
 # convert .tab into .fa file
     tabToFa mn2
 
 # grab the base alignment sequence
     echo ">hivmn2" >mn2.aln
     hgsql hivmn2 -N -e 'select seq from vax003BMsa where id="MN_D533-gp120"'  >> mn2.aln
 
 # prepare an interium file, jjAll.mfa
     cat mn2.aln mn2.fa >jjAll.mfa
     echo = >>jjAll.mfa
 
 # Run xmfaToMafMn2B to create a precursor file for the final .maf
 
     xmfaToMafMn1 jjAll.mfa j.out  org1=hivmn2
     cat j.out|sed -e 's/\./_/g'|sed -e 's/_chr/\.chr/g' >chr1.tmp
 
     rm jjAll.mfa j.out
 
     cat chr1.tmp |sed -e 's/ss_T/T/g' >chr1.maf
 
 # copy .maf to /gbdb.
 
     mkdir -p  /gbdb/hivmn2/vax003BMaf
     cp chr1.maf /gbdb/hivmn2/vax003BMaf -p
     echo before load
     hgLoadMaf hivmn2 vax003BMaf
 
 # create another copy for protein MAF.
 
     mkdir -p  /gbdb/hivmn2/vax003BAaMaf 
     cp -p chr1.maf /gbdb/hivmn2/vax003BAaMaf
     hgLoadMaf hivmn2 vax003BAaMaf
 
 ##############################################################
 # REBUILD THE gsidClinicRecWithSeq TABLE (DONE 11/03/08, Fan)
 
 # See details in hivVax003Vax004.txt.
 ##############################################################
 # Create Positive Selection tracks for VAX003 subtype B
 
 cd /hive/groups/gsid/medical/hiv/hivmn2
 mkdir posSelection
 cd posSelection
 
 # BLAT /hive/groups/gsid/medical/hiv/hiva244/posSelection/BMsaAaConsensus.fa
 # against hivmn2 base genome, select psl without header option
 # cut and paste the result into the file BMsa.psl
 
 hgLoadPsl -keep -table=BMsaPsl -nobin hivmn2 BMsa.psl 
 
 # will get the following error:
 
 #Processing BMsa.psl
 #Can't start query:
 #LOAD DATA CONCURRENT  INFILE
 '/cluster/hive/groups/gsid/medical/hiv/hivmn2/posSelection/BMsa.psl'  INTO
 TABLE BMsaPsl
 
 #mySQL error 13: Can't get stat of
 '/cluster/hive/groups/gsid/medical/hiv/hivmn2/posSelection/BMsa.psl' (Errcode:
 13)
 
 # load manually then
 
 hgsql hivmn2
 load data local infile "BMsa.psl" into table BMsaPsl;
 quit
 
 # build the positive selection tracks for model 2 and model 8.
 
 gsidPosSelect hivmn2  BMsaPsl posSelBuild pSelectBModel2  posSelModel2.bed
 hgLoadBed hivmn2 posSelModel2 posSelModel2.bed
 
 gsidPosSelect hivmn2 BMsaPsl posSelBuild pSelectBModel8  posSelModel8.bed
 hgLoadBed hivmn2 posSelModel8 posSelModel8.bed
 
 ##########################################################################
 # BUILD THE POSITIVE SELECTION TRACKS FOR VAX003 SUBTYPE AE
 
     ssh hiv1
     mkdir -p /hive/groups/gsid/medical/hiv/posSelection/AE/hivmn2
     cd /hive/groups/gsid/medical/hiv/posSelection/AE/hivmn2
 
 # BLAT
 # /cluster/hive/groups/gsid/medical/hiv/posSelection/AE/AEMsaAaConsensus.fa
 # against hivmn2 base genome, select psl without header option
 # cut and paste the result into the file AEMsa.psl
 
 hgLoadPsl -keep -table=AEMsaPsl -nobin hivmn2 AEMsa.psl 
 
 # will get the following error:
 
 #Processing AEMsa.psl
 #Can't start query:
 #LOAD DATA CONCURRENT  INFILE
 '/cluster/hive/groups/gsid/medical/hiv/hivmn2/posSelection/AEMsa.psl'  INTO
 TABLE AEMsaPsl
 
 #mySQL error 13: Can't get stat of
 '/cluster/hive/groups/gsid/medical/hiv/hivmn2/posSelection/AEMsa.psl'
 (Errcode: 13)
 
 # load manually then
 
 hgsql hivmn2
 load data local infile "AEMsa.psl" into table AEMsaPsl;
 quit
 
 # build positive selection tracks for model 2 and model 8.
 
 gsidPosSelect hivmn2  AEMsaPsl posSelBuild pSelectAEModel2  posSelAEModel2.bed
 hgLoadBed hivmn2 posSelAEModel2 posSelAEModel2.bed
 
 gsidPosSelect hivmn2 AEMsaPsl posSelBuild pSelectAEModel8  posSelAEModel8.bed
 hgLoadBed hivmn2 posSelAEModel8 posSelAEModel8.bed
 
 ##########################################################################
+# BUILD THE POSITIVE SELECTION TRACKS FOR VAX004 (Done Fan, 3/2/09)
 
+# Please see the corresponding section in hivVax003Vax004.txt for details.
+##########################################################################