# for emacs: -*- mode: sh; -*-

# Run LASTZ on GRCh38.p11 db (grcH38P11) vs. species in hg38 100way.
# This is derived from doc/hg38/lastzRuns.txt.  The ultimate goal is to add these alignments,
# and Conservation derived from them, to the hg38 initial release tracks.

# These dbs were missing from doc/hg38/lastzRuns.txt, so I'm copying/adapting from similar runs:
# panTro4
# ponAbe2
# bosTau8
# monDom5


#########################################################################
# LASTZ human/grcH38P11 Golden snub-nosed monkey/rhiRox1 - (DONE - 2018-06-13 - Angie)
    mkdir /hive/data/genomes/grcH38P11/bed/lastzRhiRox1.2018-06-12
    cd /hive/data/genomes/grcH38P11/bed/lastzRhiRox1.2018-06-12

    cp -p \
/hive/users/hiram/multiz/100way/hg38.rhiRox1/hg38.rhiRox1.tuning.top300.txt \
     ./hg38.rhiRox1.tuning.Q.txt

    cat << '_EOF_' > DEF
# human vs Golden snub-nosed monkey
# parameters obtained from a tuning run of lastz_D
# /hive/users/hiram/multiz/100way/hg38.rhiRox1/hg38.rhiRox1.tuning.top300.txt

BLASTZ=/cluster/bin/penn/lastz-distrib-1.03.54/bin/lastz
BLASTZ_T=2
BLASTZ_O=400
BLASTZ_E=30
BLASTZ_M=254
BLASTZ_X=1000
BLASTZ_Y=3400
BLASTZ_Q=/hive/data/genomes/grcH38P11/bed/lastzRhiRox1.2018-06-12/hg38.rhiRox1.tuning.Q.txt
#       A     C     G     T
# A   100  -176   -44  -147
# C  -176    93  -178   -44
# G   -44  -178    93  -176
# T  -147   -44  -176   100

# TARGET: human grcH38P11
SEQ1_DIR=/hive/data/genomes/grcH38P11/grcH38P11.2bit
SEQ1_LEN=/hive/data/genomes/grcH38P11/chrom.sizes
SEQ1_CHUNK=40000000
SEQ1_LIMIT=10
SEQ1_LAP=10000

# QUERY: Golden snub-nosed monkey rhiRox1
SEQ2_DIR=/hive/data/genomes/rhiRox1/rhiRox1.2bit
SEQ2_LEN=/hive/data/genomes/rhiRox1/chrom.sizes
SEQ2_CHUNK=20000000
SEQ2_LIMIT=300
SEQ2_LAP=0

BASE=/hive/data/genomes/grcH38P11/bed/lastzRhiRox1.2018-06-12
TMPDIR=/dev/shm
_EOF_

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl `pwd`/DEF -verbose=2 \
        -chainMinScore=3000 -chainLinearGap=medium \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > do.log 2>&1 &
#real    22m43.265s

    cat fb.grcH38P11.chainRhiRox1Link.txt
#36441781 bases of 43164255 (84.426%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -workhorse=hgwdev -buildDir=`pwd` grcH38P11 rhiRox1) \
       > rbest.log 2>&1 &
    tail -f rbest.log
#real    1m23.011s
    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -load -continue=load -workhorse=hgwdev \
	-buildDir=`pwd` grcH38P11 rhiRox1) > loadRBest.log 2>&1 &
    tail -f loadRBest.log
#real    1m1.139s
    cat fb.grcH38P11.chainRBest.RhiRox1Link.txt
#22653902 bases of 43164255 (52.483%) in intersection

    # create and load up syntenic chainNet
cd /hive/data/genomes/grcH38P11/bed/lastzRhiRox1.2018-06-12/axtChain
netToAxt grcH38P11.rhiRox1.syn.net.gz grcH38P11.rhiRox1.all.chain.gz \
/hive/data/genomes/grcH38P11/grcH38P11.2bit /hive/data/genomes/rhiRox1/rhiRox1.2bit stdout \
  | axtSort stdin stdout \
     | axtToChain stdin /hive/data/genomes/grcH38P11/chrom.sizes \
        /hive/data/genomes/rhiRox1/chrom.sizes stdout \
            | gzip -c > grcH38P11.rhiRox1.syn.chain.gz
hgLoadChain -tIndex grcH38P11 chainSynRhiRox1 grcH38P11.rhiRox1.syn.chain.gz
netFilter -minGap=10 grcH38P11.rhiRox1.syn.net.gz \
  | hgLoadNet -verbose=0 grcH38P11 netSynRhiRox1 stdin
cd /hive/data/genomes/grcH38P11/bed/lastzRhiRox1.2018-06-12
featureBits grcH38P11 chainSynRhiRox1Link > fb.grcH38P11.chainSynRhiRox1Link.txt 2>&1
cat fb.grcH38P11.chainSynRhiRox1Link.txt
#33649173 bases of 43164255 (77.956%) in intersection

    # Skip the swap.


#########################################################################
# LASTZ human/grcH38P11 Gibbon/nomLeu3 - (DONE - 2018-06-13 - Angie)
    mkdir /hive/data/genomes/grcH38P11/bed/lastzNomLeu3.2018-06-13
    cd /hive/data/genomes/grcH38P11/bed/lastzNomLeu3.2018-06-13

    cp -p \
/hive/users/hiram/multiz/100way/hg38.nomLeu3/hg38.nomLeu3.tuning.top200.txt \
     ./hg38.nomLeu3.tuning.Q.txt

    cat << '_EOF_' > DEF
# human vs Gibbon
# parameters obtained from a tuning run of lastz_D
# /hive/users/hiram/multiz/100way/hg38.nomLeu3/hg38.nomLeu3.tuning.top200.txt
BLASTZ=/cluster/bin/penn/lastz-distrib-1.03.54/bin/lastz
BLASTZ_T=2
BLASTZ_O=400
BLASTZ_E=30
BLASTZ_M=254
BLASTZ_X=1000
BLASTZ_Y=3400
BLASTZ_Q=/hive/data/genomes/grcH38P11/bed/lastzNomLeu3.2018-06-13/hg38.nomLeu3.tuning.Q.txt
#       A     C     G     T
# A   100  -175   -43  -144
# C  -175    92  -180   -43
# G   -43  -180    92  -175
# T  -144   -43  -175   100

# TARGET: human grcH38P11
SEQ1_DIR=/hive/data/genomes/grcH38P11/grcH38P11.2bit
SEQ1_LEN=/hive/data/genomes/grcH38P11/chrom.sizes
SEQ1_CHUNK=40000000
SEQ1_LIMIT=10
SEQ1_LAP=10000

# QUERY: Gibbon nomLeu3
SEQ2_DIR=/hive/data/genomes/nomLeu3/nomLeu3.2bit
SEQ2_LEN=/hive/data/genomes/nomLeu3/chrom.sizes
SEQ2_CHUNK=20000000
SEQ2_LIMIT=50
SEQ2_LAP=0

BASE=/hive/data/genomes/grcH38P11/bed/lastzNomLeu3.2018-06-13
TMPDIR=/dev/shm
_EOF_

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl `pwd`/DEF -verbose=2 \
        -chainMinScore=3000 -chainLinearGap=medium \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > do.log 2>&1 &
    tail -f do.log
#real    22m28.773s

    cat fb.grcH38P11.chainNomLeu3Link.txt
#37143296 bases of 43164255 (86.051%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -buildDir=`pwd` grcH38P11 nomLeu3) > rbest.log 2>&1 &
#real    3m27.199s
    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -load -continue=load -workhorse=hgwdev \
	-buildDir=`pwd` grcH38P11 nomLeu3) > loadRBest.log 2>&1 &
#real    0m56.754s
    cat fb.grcH38P11.chainRBest.NomLeu3Link.txt
#23152573 bases of 43164255 (53.638%) in intersection

    # create and load up syntenic chainNet: 2017-10-27
cd /hive/data/genomes/grcH38P11/bed/lastzNomLeu3.2018-06-13/axtChain
netToAxt grcH38P11.nomLeu3.syn.net.gz grcH38P11.nomLeu3.all.chain.gz \
/scratch/data/grcH38P11/grcH38P11.2bit /hive/data/genomes/nomLeu3/nomLeu3.2bit stdout \
  | axtSort stdin stdout \
     | axtToChain stdin /hive/data/genomes/grcH38P11/chrom.sizes \
        /hive/data/genomes/nomLeu3/chrom.sizes stdout \
            | gzip -c > grcH38P11.nomLeu3.syn.chain.gz
hgLoadChain -tIndex grcH38P11 chainSynNomLeu3 grcH38P11.nomLeu3.syn.chain.gz
netFilter -minGap=10 grcH38P11.nomLeu3.syn.net.gz \
  | hgLoadNet -verbose=0 grcH38P11 netSynNomLeu3 stdin
cd /hive/data/genomes/grcH38P11/bed/lastzNomLeu3.2018-06-13
featureBits grcH38P11 chainSynNomLeu3Link > fb.grcH38P11.chainSynNomLeu3Link.txt 2>&1
cat fb.grcH38P11.chainSynNomLeu3Link.txt
#34129441 bases of 43164255 (79.069%) in intersection

    # Skip the swap.


#########################################################################
# LASTZ human/grcH38P11 Squirrel monkey/saiBol1 - (IN PROGRESS - 2018-06-13 - Angie)
    mkdir /hive/data/genomes/grcH38P11/bed/lastzSaiBol1.2018-06-13
    cd /hive/data/genomes/grcH38P11/bed/lastzSaiBol1.2018-06-13

    cp -p \
/hive/users/hiram/multiz/100way/hg38.saiBol1/hg38.saiBol1.tuning.top300.txt \
     ./hg38.saiBol1.tuning.Q.txt

    cat << '_EOF_' > DEF
# human vs Squirrel monkey
# parameters obtained from a tuning run of lastz_D
# /hive/users/hiram/multiz/100way/hg38.saiBol1/hg38.saiBol1.tuning.top300.txt
BLASTZ=/cluster/bin/penn/lastz-distrib-1.03.54/bin/lastz
BLASTZ_T=2
BLASTZ_O=400
BLASTZ_E=30
BLASTZ_M=254
BLASTZ_X=1000
BLASTZ_Y=3400
BLASTZ_Q=/hive/data/genomes/grcH38P11/bed/lastzSaiBol1.2018-06-13/hg38.saiBol1.tuning.Q.txt
#       A     C     G     T
# A   100  -178   -40  -145
# C  -178    93  -188   -40
# G   -40  -188    93  -178
# T  -145   -40  -178   100

# TARGET: human grcH38P11
SEQ1_DIR=/hive/data/genomes/grcH38P11/grcH38P11.2bit
SEQ1_LEN=/hive/data/genomes/grcH38P11/chrom.sizes
SEQ1_CHUNK=40000000
SEQ1_LIMIT=10
SEQ1_LAP=10000

# QUERY: Squirrel monkey saiBol1
SEQ2_DIR=/hive/data/genomes/saiBol1/saiBol1.2bit
SEQ2_LEN=/hive/data/genomes/saiBol1/chrom.sizes
SEQ2_CHUNK=20000000
SEQ2_LIMIT=20
SEQ2_LAP=0

BASE=/hive/data/genomes/grcH38P11/bed/lastzSaiBol1.2018-06-13
TMPDIR=/dev/shm
_EOF_
    # << happy emacs

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl `pwd`/DEF -verbose=2 \
        -chainMinScore=3000 -chainLinearGap=medium \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > do.log 2>&1 &
    tail -f do.log
#real    11m58.119s

    cat fb.grcH38P11.chainSaiBol1Link.txt
#28940778 bases of 43164255 (67.048%) in intersection

# TODO?

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -buildDir=`pwd` grcH38P11 saiBol1) > rbest.log 2>&1 &
    # real    129m56.144s
    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -load -continue=load -workhorse=hgwdev \
	-buildDir=`pwd` grcH38P11 saiBol1) > loadRBest.log 2>&1 &
    cat fb.grcH38P11.chainRBestSaiBol1Link.txt
    # 1986661464 bases of 3049335806 (65.151%) in intersection

    # create and load up syntenic chainNet: 2017-10-27
cd /hive/data/genomes/grcH38P11/bed/lastzSaiBol1.2018-06-13/axtChain
netToAxt grcH38P11.saiBol1.syn.net.gz grcH38P11.saiBol1.all.chain.gz \
/scratch/data/grcH38P11/grcH38P11.2bit /hive/data/genomes/saiBol1/saiBol1.2bit stdout \
  | axtSort stdin stdout \
     | axtToChain stdin /hive/data/genomes/grcH38P11/chrom.sizes \
        /hive/data/genomes/saiBol1/chrom.sizes stdout \
            | gzip -c > grcH38P11.saiBol1.syn.chain.gz
hgLoadChain -tIndex grcH38P11 chainSynSaiBol1 grcH38P11.saiBol1.syn.chain.gz
netFilter -minGap=10 grcH38P11.saiBol1.syn.net.gz \
  | hgLoadNet -verbose=0 grcH38P11 netSynSaiBol1 stdin
cd /hive/data/genomes/grcH38P11/bed/lastzSaiBol1.2018-06-13
featureBits grcH38P11 chainSynSaiBol1Link > fb.grcH38P11.chainSynSaiBol1Link.txt 2>&1
cat fb.grcH38P11.chainSynSaiBol1Link.txt
    # 2096151749 bases of 3049335806 (68.741%) in intersection

    # real    10m12.757s

    # and for the swap:
    mkdir /hive/data/genomes/saiBol1/bed/blastz.grcH38P11.swap
    cd /hive/data/genomes/saiBol1/bed/blastz.grcH38P11.swap

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl -verbose=2 \
      /hive/data/genomes/grcH38P11/bed/lastzSaiBol1.2018-06-13/DEF \
        -swap -chainMinScore=3000 -chainLinearGap=medium \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > swap.log 2>&1
    #  real    102m22.969s

    cat fb.saiBol1.chainGrcH38P11Link.txt
    # 2018022119 bases of 2477131095 (81.466%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -buildDir=`pwd` saiBol1 grcH38P11) > rbest.log 2>&1
    # real    42m24.226s

###########################################################################
# Chimp Lastz run (TODO - 2018-06-13 - Angie)
    screen -S grcH38P11PanTro4      # use a screen to manage this longish running job
    mkdir /hive/data/genomes/grcH38P11/bed/lastzPanTro4.2018-06-13
    cd /hive/data/genomes/grcH38P11/bed/lastzPanTro4.2018-06-13

    # always set the BLASTZ program so we know what version was used
    printf "# human vs chimp
BLASTZ=/cluster/bin/penn/lastz-distrib-1.03.66/bin/lastz
BLASTZ_T=2
BLASTZ_O=600
BLASTZ_E=150
BLASTZ_M=254
BLASTZ_K=4500
BLASTZ_L=4500
BLASTZ_Y=15000
BLASTZ_Q=/scratch/data/blastz/human_chimp.v2.q
#    A    C    G    T
#    90 -330 -236 -356
#  -330  100 -318 -236
#  -236 -318  100 -330
#  -356 -236 -330   90

# TARGET: Human grcH38P11
SEQ1_DIR=/scratch/data/grcH38P11/grcH38P11.2bit
SEQ1_LEN=/scratch/data/grcH38P11/chrom.sizes
SEQ1_CHUNK=40000000
SEQ1_LAP=10000
SEQ1_IN_CONTIGS=0

# QUERY: Chimp PanTro4
SEQ2_DIR=/hive/data/genomes/panTro4/panTro4.2bit
SEQ2_LEN=/hive/data/genomes/panTro4/chrom.sizes
SEQ2_CHUNK=20000000
SEQ2_LAP=0
SEQ2_LIMIT=100
SEQ2_IN_CONTIGS=0

BASE=/hive/data/genomes/grcH38P11/bed/lastzPanTro4.2018-06-13
TMPDIR=/dev/shm
" > DEF

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl `pwd`/DEF -verbose=2 \
        -chainMinScore=5000 -chainLinearGap=medium \
        -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
        -syntenicNet) > do.log 2>&1
    # real    209m31.431s

    cat fb.grcH38P11.chainPanTro4Link.txt
    # 2907702790 bases of 3049335806 (95.355%) in intersection

    # filter with doRecipBest.pl
    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -workhorse=hgwdev -buildDir=`pwd` \
        grcH38P11 panTro4) > rbest.log 2>&1
    # real    195m53.750s

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -load -continue=load -workhorse=hgwdev -buildDir=`pwd` grcH38P11 panTro4) \
	> loadRBest.log 2>&1
    # real    2m36.993s

    cat fb.grcH38P11.chainRBestPanTro4Link.txt
    # 2737882959 bases of 3049335806 (89.786%) in intersection

    # create and load up syntenic chainNet: 2017-10-27
cd /hive/data/genomes/grcH38P11/bed/lastzPanTro4.2018-06-13/axtChain

netToAxt grcH38P11.panTro4.syn.net.gz grcH38P11.panTro4.all.chain.gz \
 /scratch/data/grcH38P11/grcH38P11.2bit /hive/data/genomes/panTro4/panTro4.2bit stdout \
  | axtSort stdin stdout \
    | axtToChain stdin /hive/data/genomes/grcH38P11/chrom.sizes \
        /hive/data/genomes/panTro4/chrom.sizes stdout \
            | gzip -c > grcH38P11.panTro4.syn.chain.gz
   # real    3m23.632s

hgLoadChain -tIndex grcH38P11 chainSynPanTro4 grcH38P11.panTro4.syn.chain.gz
netFilter -minGap=10 grcH38P11.panTro4.syn.net.gz \
| hgLoadNet -verbose=0 grcH38P11 netSynPanTro4 stdin
   # real    1m13.380s

cd /hive/data/genomes/grcH38P11/bed/lastzPanTro4.2018-06-13
featureBits grcH38P11 chainSynPanTro4Link >&fb.grcH38P11.chainSynPanTro4Link.txt
cat fb.grcH38P11.chainSynPanTro4Link.txt
    # 2878970238 bases of 3049335806 (94.413%) in intersection


    # running the swap
    mkdir /hive/data/genomes/panTro4/bed/blastz.grcH38P11.swap
    cd /hive/data/genomes/panTro4/bed/blastz.grcH38P11.swap
    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl -verbose=2 \
        -swap /hive/data/genomes/grcH38P11/bed/lastzPanTro4.2018-06-13/DEF \
        -chainMinScore=5000 -chainLinearGap=medium \
        -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
        -syntenicNet) > swap.log 2>&1
    # real    126m8.214s

    cat fb.panTro4.chainGrcH38P11Link.txt
    # 2935702060 bases of 3132620660 (93.714%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -workhorse=hgwdev -buildDir=`pwd` \
        panTro4 grcH38P11) > rbest.log 2>&1
    # real    240m25.264s

#########################################################################
# LASTZ human/grcH38P11 Crab-eating macaque/macFas5 - (TODO - 2018-06-13 - Angie)
    mkdir /hive/data/genomes/grcH38P11/bed/lastzMacFas5.2018-06-13
    cd /hive/data/genomes/grcH38P11/bed/lastzMacFas5.2018-06-13

    cp -p \
/hive/users/hiram/multiz/100way/hg38.macFas5/hg38.macFas5.tuning.top300.txt \
     ./hg38.macFas5.tuning.Q.txt

    cat << '_EOF_' > DEF
# human vs Crab-eating macaque
# parameters obtained from a tuning run of lastz_D
# /hive/users/hiram/multiz/100way/hg38.macFas5/hg38.macFas5.tuning.top300.txt
BLASTZ=/cluster/bin/penn/lastz-distrib-1.03.54/bin/lastz
BLASTZ_T=2
BLASTZ_O=400
BLASTZ_E=30
BLASTZ_M=254
BLASTZ_X=1000
BLASTZ_Y=3400
BLASTZ_Q=/hive/data/genomes/grcH38P11/bed/lastzMacFas5.2018-06-13/hg38.macFas5.tuning.Q.txt
#       A     C     G     T
# A   100  -174   -43  -144
# C  -174    93  -176   -43
# G   -43  -176    93  -174
# T  -144   -43  -174   100

# TARGET: human grcH38P11
SEQ1_DIR=/hive/data/genomes/grcH38P11/grcH38P11.2bit
SEQ1_LEN=/hive/data/genomes/grcH38P11/chrom.sizes
SEQ1_CHUNK=40000000
SEQ1_LIMIT=10
SEQ1_LAP=10000

# QUERY: Crab-eating macaque macFas5
SEQ2_DIR=/hive/data/genomes/macFas5/macFas5.2bit
SEQ2_LEN=/hive/data/genomes/macFas5/chrom.sizes
SEQ2_CHUNK=20000000
SEQ2_LIMIT=20
SEQ2_LAP=0

BASE=/hive/data/genomes/grcH38P11/bed/lastzMacFas5.2018-06-13
TMPDIR=/dev/shm
_EOF_
    # << happy emacs

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl `pwd`/DEF -verbose=2 \
        -chainMinScore=3000 -chainLinearGap=medium \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > do.log 2>&1
    # real    669m24.572s

    cat fb.grcH38P11.chainMacFas5Link.txt
    # 2612527708 bases of 3049335806 (85.675%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -buildDir=`pwd` grcH38P11 macFas5) > rbest.log 2>&1 &
    # real    47m25.375s
    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -load -continue=load -workhorse=hgwdev \
	-buildDir=`pwd` grcH38P11 macFas5) > loadRBest.log 2>&1 &
    cat fb.grcH38P11.chainRBestMacFas5Link.txt
    # 2423088291 bases of 3049335806 (79.463%) in intersection

    # create and load up syntenic chainNet: 2017-10-27
cd /hive/data/genomes/grcH38P11/bed/lastzMacFas5.2018-06-13/axtChain
netToAxt grcH38P11.macFas5.syn.net.gz grcH38P11.macFas5.all.chain.gz \
/scratch/data/grcH38P11/grcH38P11.2bit /hive/data/genomes/macFas5/macFas5.2bit stdout \
  | axtSort stdin stdout \
     | axtToChain stdin /hive/data/genomes/grcH38P11/chrom.sizes \
        /hive/data/genomes/macFas5/chrom.sizes stdout \
            | gzip -c > grcH38P11.macFas5.syn.chain.gz
hgLoadChain -tIndex grcH38P11 chainSynMacFas5 grcH38P11.macFas5.syn.chain.gz
netFilter -minGap=10 grcH38P11.macFas5.syn.net.gz \
  | hgLoadNet -verbose=0 grcH38P11 netSynMacFas5 stdin
cd /hive/data/genomes/grcH38P11/bed/lastzMacFas5.2018-06-13
featureBits grcH38P11 chainSynMacFas5Link > fb.grcH38P11.chainSynMacFas5Link.txt 2>&1
cat fb.grcH38P11.chainSynMacFas5Link.txt
# 2557788563 bases of 3049335806 (83.880%) in intersection

    # and for the swap:
    mkdir /hive/data/genomes/macFas5/bed/blastz.grcH38P11.swap
    cd /hive/data/genomes/macFas5/bed/blastz.grcH38P11.swap

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl -verbose=2 \
      /hive/data/genomes/grcH38P11/bed/lastzMacFas5.2018-06-13/DEF \
        -swap -chainMinScore=3000 -chainLinearGap=medium \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > swap.log 2>&1
    #  real    120m29.355s

    cat fb.macFas5.chainGrcH38P11Link.txt
    # 2460372459 bases of 2803866698 (87.749%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -buildDir=`pwd` macFas5 grcH38P11) > rbest.log 2>&1
    # real    66m23.284s

#########################################################################
# LASTZ human/grcH38P11 Bushbaby/otoGar3 - (TODO - 2015-02-22 - Angie)
    mkdir /hive/data/genomes/grcH38P11/bed/lastzOtoGar3.2015-02-22
    cd /hive/data/genomes/grcH38P11/bed/lastzOtoGar3.2015-02-22

    cat << '_EOF_' > DEF
# human vs Bushbaby
BLASTZ=/cluster/bin/penn/lastz-distrib-1.03.66/bin/lastz
BLASTZ_T=2
BLASTZ_O=400
BLASTZ_E=30
BLASTZ_M=254
# default BLASTZ_Q score matrix:
#       A     C     G     T
# A    91  -114   -31  -123
# C  -114   100  -125   -31
# G   -31  -125   100  -114
# T  -123   -31  -114    91

# TARGET: human grcH38P11
SEQ1_DIR=/hive/data/genomes/grcH38P11/grcH38P11.2bit
SEQ1_LEN=/hive/data/genomes/grcH38P11/chrom.sizes
SEQ1_CHUNK=40000000
SEQ1_LIMIT=10
SEQ1_LAP=10000

# QUERY: Bushbaby otoGar3
SEQ2_DIR=/hive/data/genomes/otoGar3/otoGar3.2bit
SEQ2_LEN=/hive/data/genomes/otoGar3/chrom.sizes
SEQ2_CHUNK=20000000
SEQ2_LIMIT=20
SEQ2_LAP=0

BASE=/hive/data/genomes/grcH38P11/bed/lastzOtoGar3.2015-02-22
TMPDIR=/dev/shm
_EOF_
    # << happy emacs

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl `pwd`/DEF -verbose=2 \
        -chainMinScore=3000 -chainLinearGap=medium \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > do.log 2>&1
    # real    336m10.091s

    cat fb.grcH38P11.chainOtoGar3Link.txt
    # 1622122468 bases of 3049335806 (53.196%) in intersection
    # replacing previous tuned version:
    # 1508964214 bases of 3049335806 (49.485%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -workhorse=hgwdev -buildDir=`pwd` grcH38P11 otoGar3) \
       > rbest.log 2>&1 &
    # real    59m25.363s
    # mistakenly destroyed the rbest.log file:
    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -load -continue=load -workhorse=hgwdev \
	-buildDir=`pwd` grcH38P11 otoGar3) > rbest.log 2>&1 &
    # real    13m9.418s

    cat fb.grcH38P11.chainRBestOtoGar3Link.txt
    # 1482204777 bases of 3049335806 (48.607%) in intersection

    # create and load up syntenic chainNet: 2017-10-27
cd /hive/data/genomes/grcH38P11/bed/lastzOtoGar3.2015-02-22/axtChain
netToAxt grcH38P11.otoGar3.syn.net.gz grcH38P11.otoGar3.all.chain.gz \
/scratch/data/grcH38P11/grcH38P11.2bit /hive/data/genomes/otoGar3/otoGar3.2bit stdout \
  | axtSort stdin stdout \
     | axtToChain stdin /hive/data/genomes/grcH38P11/chrom.sizes \
        /hive/data/genomes/otoGar3/chrom.sizes stdout \
            | gzip -c > grcH38P11.otoGar3.syn.chain.gz
hgLoadChain -tIndex grcH38P11 chainSynOtoGar3 grcH38P11.otoGar3.syn.chain.gz
netFilter -minGap=10 grcH38P11.otoGar3.syn.net.gz \
  | hgLoadNet -verbose=0 grcH38P11 netSynOtoGar3 stdin
cd /hive/data/genomes/grcH38P11/bed/lastzOtoGar3.2015-02-22
featureBits grcH38P11 chainSynOtoGar3Link > fb.grcH38P11.chainSynOtoGar3Link.txt 2>&1
cat fb.grcH38P11.chainSynOtoGar3Link.txt
# 1547295352 bases of 3049335806 (50.742%) in intersection

    # and for the swap:
    mkdir /hive/data/genomes/otoGar3/bed/blastz.grcH38P11.swap
    cd /hive/data/genomes/otoGar3/bed/blastz.grcH38P11.swap

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl -verbose=2 \
      /hive/data/genomes/grcH38P11/bed/lastzOtoGar3.2015-02-22/DEF \
        -swap -chainMinScore=3000 -chainLinearGap=medium \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > swap.log 2>&1
    #  real    115m47.941s

    cat fb.otoGar3.chainGrcH38P11Link.txt
    # 1531320942 bases of 2359530453 (64.899%) in intersection
    # replacing previous tuned version:
    # 1428944740 bases of 2359530453 (60.561%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -buildDir=`pwd` otoGar3 grcH38P11) > rbest.log 2>&1
    # real    46m56.972s

#########################################################################
# LASTZ human/grcH38P11 Marmoset/calJac3 - (TODO - 2018-06-13 - Angie)
    mkdir /hive/data/genomes/grcH38P11/bed/lastzCalJac3.2018-06-13
    cd /hive/data/genomes/grcH38P11/bed/lastzCalJac3.2018-06-13

    cp -p \
/hive/users/hiram/multiz/100way/hg38.calJac3/hg38.calJac3.tuning.top300.txt \
     ./hg38.calJac3.tuning.Q.txt

    cat << '_EOF_' > DEF
# human vs Marmoset
# parameters obtained from a tuning run of lastz_D
# /hive/users/hiram/multiz/100way/hg38.calJac3/hg38.calJac3.tuning.top300.txt

BLASTZ=/cluster/bin/penn/lastz-distrib-1.03.54/bin/lastz
BLASTZ_T=2
BLASTZ_O=400
BLASTZ_E=30
BLASTZ_M=254
BLASTZ_X=1000
BLASTZ_Y=3400
BLASTZ_Q=/hive/data/genomes/grcH38P11/bed/lastzCalJac3.2018-06-13/hg38.calJac3.tuning.Q.txt
#       A     C     G     T
# A   100  -176   -40  -145
# C  -176    94  -186   -40
# G   -40  -186    94  -176
# T  -145   -40  -176   100

# TARGET: human grcH38P11
SEQ1_DIR=/hive/data/genomes/grcH38P11/grcH38P11.2bit
SEQ1_LEN=/hive/data/genomes/grcH38P11/chrom.sizes
SEQ1_CHUNK=40000000
SEQ1_LIMIT=10
SEQ1_LAP=10000

# QUERY: Marmoset calJac3
SEQ2_DIR=/hive/data/genomes/calJac3/calJac3.2bit
SEQ2_LEN=/hive/data/genomes/calJac3/chrom.sizes
SEQ2_CHUNK=20000000
SEQ2_LIMIT=40
SEQ2_LAP=0

BASE=/hive/data/genomes/grcH38P11/bed/lastzCalJac3.2018-06-13
TMPDIR=/dev/shm
_EOF_
    # << happy emacs

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl `pwd`/DEF -verbose=2 \
        -chainMinScore=3000 -chainLinearGap=medium \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > do.log 2>&1
    # real    486m51.449s

    cat fb.grcH38P11.chainCalJac3Link.txt
    # 2186651179 bases of 3049335806 (71.709%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -buildDir=`pwd` grcH38P11 calJac3) > rbest.log 2>&1 &
    # real    50m52.928s
    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -load -continue=load -workhorse=hgwdev \
	-buildDir=`pwd` grcH38P11 calJac3) > loadRBest.log 2>&1 &
    cat fb.grcH38P11.chainRBestCalJac3Link.txt
    # 2019861688 bases of 3049335806 (66.239%) in intersection

    # create and load up syntenic chainNet: 2017-10-27
cd /hive/data/genomes/grcH38P11/bed/lastzCalJac3.2018-06-13
netToAxt grcH38P11.calJac3.syn.net.gz grcH38P11.calJac3.all.chain.gz \
/scratch/data/grcH38P11/grcH38P11.2bit /hive/data/genomes/calJac3/calJac3.2bit stdout \
  | axtSort stdin stdout \
     | axtToChain stdin /hive/data/genomes/grcH38P11/chrom.sizes \
        /hive/data/genomes/calJac3/chrom.sizes stdout \
            | gzip -c > grcH38P11.calJac3.syn.chain.gz
hgLoadChain -tIndex grcH38P11 chainSynCalJac3 grcH38P11.calJac3.syn.chain.gz
netFilter -minGap=10 grcH38P11.calJac3.syn.net.gz \
  | hgLoadNet -verbose=0 grcH38P11 netSynCalJac3 stdin
cd /hive/data/genomes/grcH38P11/bed/lastzCalJac3.2018-06-13
featureBits grcH38P11 chainSynCalJac3Link > fb.grcH38P11.chainSynCalJac3Link.txt 2>&1
cat fb.grcH38P11.chainSynCalJac3Link.txt
# 2119273306 bases of 3049335806 (69.500%) in intersection

    # and for the swap:
    mkdir /hive/data/genomes/calJac3/bed/blastz.grcH38P11.swap
    cd /hive/data/genomes/calJac3/bed/blastz.grcH38P11.swap

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl -verbose=2 \
      /hive/data/genomes/grcH38P11/bed/lastzCalJac3.2018-06-13/DEF \
        -swap -chainMinScore=3000 -chainLinearGap=medium \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > swap.log 2>&1
    #  real    125m9.577s

    cat fb.calJac3.chainGrcH38P11Link.txt
    # 2112735553 bases of 2752505800 (76.757%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -buildDir=`pwd` calJac3 grcH38P11) > rbest.log 2>&1

#########################################################################
# LASTZ human/grcH38P11 Gorilla/gorGor3 - (TODO - 2018-06-13 - Angie)
    mkdir /hive/data/genomes/grcH38P11/bed/lastzGorGor3.2018-06-13
    cd /hive/data/genomes/grcH38P11/bed/lastzGorGor3.2018-06-13

    cat << '_EOF_' > DEF
# human vs Gorilla
# parameters obtained from a tuning run of lastz_D
# /hive/users/hiram/multiz/100way/hg38.gorGor3/hg38.gorGor3.tuning.top200.txt

BLASTZ=/cluster/bin/penn/lastz-distrib-1.03.54/bin/lastz
BLASTZ_T=2
BLASTZ_O=400
BLASTZ_E=30
BLASTZ_M=254
BLASTZ_X=1000
BLASTZ_Y=3400
BLASTZ_Q=/hive/data/genomes/grcH38P11/bed/lastzGorGor3.2018-06-13/hg38.gorGor3.tuning.Q.txt
#       A     C     G     T
# A   100  -177   -41  -144
# C  -177    93  -184   -41
# G   -41  -184    93  -177
# T  -144   -41  -177   100

# TARGET: human grcH38P11
SEQ1_DIR=/hive/data/genomes/grcH38P11/grcH38P11.2bit
SEQ1_LEN=/hive/data/genomes/grcH38P11/chrom.sizes
SEQ1_CHUNK=40000000
SEQ1_LIMIT=10
SEQ1_LAP=10000

# QUERY: Gorilla gorGor3
SEQ2_DIR=/hive/data/genomes/gorGor3/gorGor3.2bit
SEQ2_LEN=/hive/data/genomes/gorGor3/chrom.sizes
SEQ2_CHUNK=20000000
SEQ2_LIMIT=100
SEQ2_LAP=0

BASE=/hive/data/genomes/grcH38P11/bed/lastzGorGor3.2018-06-13
TMPDIR=/dev/shm
_EOF_
    # << happy emacs

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl `pwd`/DEF -verbose=2 \
        -chainMinScore=3000 -chainLinearGap=medium \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > do.log 2>&1
    # real    2846m38.709s

    cat fb.grcH38P11.chainGorGor3Link.txt
    # 2683571923 bases of 3049335806 (88.005%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -buildDir=`pwd` grcH38P11 gorGor3) > rbest.log 2>&1 &
    # real    42m25.526s

    # and for the swap:
    mkdir /hive/data/genomes/gorGor3/bed/blastz.grcH38P11.swap
    cd /hive/data/genomes/gorGor3/bed/blastz.grcH38P11.swap

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl -verbose=2 \
      /hive/data/genomes/grcH38P11/bed/lastzGorGor3.2018-06-13/DEF \
        -swap -chainMinScore=3000 -chainLinearGap=medium \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > swap.log 2>&1
    #  real    116m45.998s

    cat fb.gorGor3.chainGrcH38P11Link.txt
    # 2588342923 bases of 2822760080 (91.695%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -buildDir=`pwd` gorGor3 grcH38P11) > rbest.log 2>&1
    # real    42m41.291s

#########################################################################
# LASTZ human/grcH38P11 Baboon/papAnu2 - (DONE - 2018-06-13 - Angie)
    mkdir /hive/data/genomes/grcH38P11/bed/lastzPapAnu2.2018-06-13
    cd /hive/data/genomes/grcH38P11/bed/lastzPapAnu2.2018-06-13

    cp -p \
/hive/users/hiram/multiz/100way/hg38.papAnu2/hg38.papAnu2.tuning.top200.txt \
     ./hg38.papAnu2.tuning.Q.txt

    cat << '_EOF_' > DEF
# human vs Baboon
# parameters obtained from a tuning run of lastz_D
# /hive/users/hiram/multiz/100way/hg38.papAnu2/hg38.papAnu2.tuning.top400.txt

BLASTZ=/cluster/bin/penn/lastz-distrib-1.03.54/bin/lastz
BLASTZ_T=2
BLASTZ_O=400
BLASTZ_E=30
BLASTZ_M=254
BLASTZ_X=1000
BLASTZ_Y=3400
BLASTZ_Q=/hive/data/genomes/grcH38P11/bed/lastzPapAnu2.2018-06-13/hg38.papAnu2.tuning.Q.txt
#       A     C     G     T
# A   100  -173   -45  -144
# C  -173    92  -175   -45
# G   -45  -175    92  -173
# T  -144   -45  -173   100

# TARGET: human grcH38P11
SEQ1_DIR=/hive/data/genomes/grcH38P11/grcH38P11.2bit
SEQ1_LEN=/hive/data/genomes/grcH38P11/chrom.sizes
SEQ1_CHUNK=40000000
SEQ1_LIMIT=10
SEQ1_LAP=10000

# QUERY: Baboon papAnu2
SEQ2_DIR=/hive/data/genomes/papAnu2/papAnu2.2bit
SEQ2_LEN=/hive/data/genomes/papAnu2/chrom.sizes
SEQ2_CHUNK=20000000
SEQ2_LIMIT=200
SEQ2_LAP=0

BASE=/hive/data/genomes/grcH38P11/bed/lastzPapAnu2.2018-06-13
TMPDIR=/dev/shm
_EOF_

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl `pwd`/DEF -verbose=2 \
        -chainMinScore=3000 -chainLinearGap=medium \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > do.log 2>&1 &
    tail -f do.log
#real    22m18.073s

    cat fb.grcH38P11.chainPapAnu2Link.txt
#36222713 bases of 43164255 (83.918%) in intersection

    # Skip the swap and the rbest since those do not seem to be present in hg38.

#########################################################################
# LASTZ human/grcH38P11 vs. sheep/oviAri3 - (TODO - 2015-04-27 - Angie)
    mkdir /hive/data/genomes/grcH38P11/bed/lastzOviAri3.2015-04-27
    cd /hive/data/genomes/grcH38P11/bed/lastzOviAri3.2015-04-27

    cat << '_EOF_' > DEF
# human vs sheep
BLASTZ=/cluster/bin/penn/lastz-distrib-1.03.66/bin/lastz
BLASTZ_T=2
BLASTZ_O=400
BLASTZ_E=30
BLASTZ_M=254
# default BLASTZ_Q score matrix:
#       A     C     G     T
# A    91  -114   -31  -123
# C  -114   100  -125   -31
# G   -31  -125   100  -114
# T  -123   -31  -114    91

# TARGET: human grcH38P11
SEQ1_DIR=/hive/data/genomes/grcH38P11/grcH38P11.2bit
SEQ1_LEN=/hive/data/genomes/grcH38P11/chrom.sizes
SEQ1_CHUNK=40000000
SEQ1_LIMIT=5
SEQ1_LAP=10000

# QUERY: Sheep oviAri3
SEQ2_DIR=/hive/data/genomes/oviAri3/oviAri3.2bit
SEQ2_LEN=/hive/data/genomes/oviAri3/chrom.sizes
SEQ2_CHUNK=20000000
SEQ2_LIMIT=40
SEQ2_LAP=0

BASE=/hive/data/genomes/grcH38P11/bed/lastzOviAri3.2015-04-27
TMPDIR=/dev/shm
_EOF_
    # << happy emacs

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl `pwd`/DEF -verbose=2 \
        -chainMinScore=3000 -chainLinearGap=medium \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > do.log 2>&1
    # real    527m8.200s

    cat fb.grcH38P11.chainOviAri3Link.txt
    # 1382921590 bases of 3049335806 (45.352%) in intersection
    # replacing the previous tuned version:
    # 1256101876 bases of 3049335806 (41.193%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -buildDir=`pwd` grcH38P11 oviAri3) > rbest.log 2>&1 &
    # real    68m34.171s

    # and for the swap:
    mkdir /hive/data/genomes/oviAri3/bed/blastz.grcH38P11.swap
    cd /hive/data/genomes/oviAri3/bed/blastz.grcH38P11.swap

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl -verbose=2 \
      /hive/data/genomes/grcH38P11/bed/lastzOviAri3.2015-04-27/DEF \
        -swap -chainMinScore=3000 -chainLinearGap=medium \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > swap.log 2>&1
    #  real    98m39.757s

    cat fb.oviAri3.chainGrcH38P11Link.txt
    # 1312457473 bases of 2534335866 (51.787%) in intersection
    # replacing the previous tuned version:
    # 1193048482 bases of 2534335866 (47.075%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -buildDir=`pwd` oviAri3 grcH38P11) > rbest.log 2>&1
    # real    47m50.965s

#########################################################################
# LASTZ human/grcH38P11 vs. medaka/oryLat2 - (TODO - 2015-02-06 - Angie)
    mkdir /hive/data/genomes/grcH38P11/bed/lastzOryLat2.2015-02-06
    cd /hive/data/genomes/grcH38P11/bed/lastzOryLat2.2015-02-06

    cat << '_EOF_' > DEF
# human vs medaka
BLASTZ=/cluster/bin/penn/lastz-distrib-1.03.54/bin/lastz
BLASTZ_Y=3400
BLASTZ_L=6000
BLASTZ_K=2200
BLASTZ_M=50
BLASTZ_Q=/scratch/data/blastz/HoxD55.q
#      A    C    G    T
#     91  -90  -25 -100
#    -90  100 -100  -25
#    -25 -100  100  -90
#   -100  -25  -90  91

# TARGET: human grcH38P11
SEQ1_DIR=/hive/data/genomes/grcH38P11/grcH38P11.2bit
SEQ1_LEN=/hive/data/genomes/grcH38P11/chrom.sizes
SEQ1_CHUNK=40000000
SEQ1_LIMIT=3
SEQ1_LAP=10000

# QUERY: medaka oryLat2
SEQ2_DIR=/hive/data/genomes/oryLat2/oryLat2.2bit
SEQ2_LEN=/hive/data/genomes/oryLat2/chrom.sizes
SEQ2_CHUNK=20000000
SEQ2_LIMIT=28
SEQ2_LAP=0

BASE=/hive/data/genomes/grcH38P11/bed/lastzOryLat2.2015-02-06
TMPDIR=/dev/shm
_EOF_
    # << happy emacs

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl `pwd`/DEF -verbose=2 \
        -chainMinScore=5000 -chainLinearGap=loose \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > do.log 2>&1
    # real    59m44.479s

    cat fb.grcH38P11.chainOryLat2Link.txt
    # 61061549 bases of 3049335806 (2.002%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -buildDir=`pwd` grcH38P11 oryLat2) > rbest.log 2>&1 &
    # real    5m38.658s

    # and for the swap:
    mkdir /hive/data/genomes/oryLat2/bed/blastz.grcH38P11.swap
    cd /hive/data/genomes/oryLat2/bed/blastz.grcH38P11.swap

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl -verbose=2 \
      /hive/data/genomes/grcH38P11/bed/lastzOryLat2.2015-02-06/DEF \
        -swap -chainMinScore=5000 -chainLinearGap=loose \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > swap.log 2>&1
    #  real    9m23.499s

    cat fb.oryLat2.chainGrcH38P11Link.txt
    # 47994675 bases of 700386597 (6.853%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -buildDir=`pwd` oryLat2 grcH38P11) > rbest.log 2>&1
    # real    5m47.982s

#########################################################################
# LASTZ human/grcH38P11 vs. lizard/anoCar2 - (TODO - 2015-02-06 - Angie)
    mkdir /hive/data/genomes/grcH38P11/bed/lastzAnoCar2.2015-02-06
    cd /hive/data/genomes/grcH38P11/bed/lastzAnoCar2.2015-02-06

    cat << '_EOF_' > DEF
# human vs lizard
BLASTZ=/cluster/bin/penn/lastz-distrib-1.03.54/bin/lastz
BLASTZ_Y=3400
BLASTZ_L=6000
BLASTZ_K=2200
BLASTZ_M=50
BLASTZ_Q=/scratch/data/blastz/HoxD55.q
#      A    C    G    T
#     91  -90  -25 -100
#    -90  100 -100  -25
#    -25 -100  100  -90
#   -100  -25  -90  91

# TARGET: human grcH38P11
SEQ1_DIR=/hive/data/genomes/grcH38P11/grcH38P11.2bit
SEQ1_LEN=/hive/data/genomes/grcH38P11/chrom.sizes
SEQ1_CHUNK=40000000
SEQ1_LIMIT=3
SEQ1_LAP=10000

# QUERY: lizard anoCar2
SEQ2_DIR=/hive/data/genomes/anoCar2/anoCar2.2bit
SEQ2_LEN=/hive/data/genomes/anoCar2/chrom.sizes
SEQ2_CHUNK=20000000
SEQ2_LIMIT=28
SEQ2_LAP=0

BASE=/hive/data/genomes/grcH38P11/bed/lastzAnoCar2.2015-02-06
TMPDIR=/dev/shm
_EOF_
    # << happy emacs

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl `pwd`/DEF -verbose=2 \
        -chainMinScore=5000 -chainLinearGap=loose \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > do.log 2>&1
    # real    279m15.159s

    cat fb.grcH38P11.chainAnoCar2Link.txt
    # 109575794 bases of 3049335806 (3.593%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -buildDir=`pwd` grcH38P11 anoCar2) > rbest.log 2>&1 &
    # real    17m23.686s

    # and for the swap:
    mkdir /hive/data/genomes/anoCar2/bed/blastz.grcH38P11.swap
    cd /hive/data/genomes/anoCar2/bed/blastz.grcH38P11.swap

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl -verbose=2 \
      /hive/data/genomes/grcH38P11/bed/lastzAnoCar2.2015-02-06/DEF \
        -swap -chainMinScore=5000 -chainLinearGap=loose \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > swap.log 2>&1
    #  real    19m9.260s

    cat fb.anoCar2.chainGrcH38P11Link.txt
    # 88838401 bases of 1701353770 (5.222%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -buildDir=`pwd` anoCar2 grcH38P11) > rbest.log 2>&1
    # real    7m31.302s

#########################################################################
# LASTZ human/grcH38P11 vs. green seaturtle/cheMyd1 - (TODO - 2015-02-06 - Angie)
    mkdir /hive/data/genomes/grcH38P11/bed/lastzCheMyd1.2015-02-06
    cd /hive/data/genomes/grcH38P11/bed/lastzCheMyd1.2015-02-06

    cat << '_EOF_' > DEF
# human vs green seaturtle
BLASTZ=/cluster/bin/penn/lastz-distrib-1.03.54/bin/lastz
BLASTZ_Y=3400
BLASTZ_L=6000
BLASTZ_K=2200
BLASTZ_M=50
BLASTZ_Q=/scratch/data/blastz/HoxD55.q
#      A    C    G    T
#     91  -90  -25 -100
#    -90  100 -100  -25
#    -25 -100  100  -90
#   -100  -25  -90  91

# TARGET: human grcH38P11
SEQ1_DIR=/hive/data/genomes/grcH38P11/grcH38P11.2bit
SEQ1_LEN=/hive/data/genomes/grcH38P11/chrom.sizes
SEQ1_CHUNK=40000000
SEQ1_LIMIT=3
SEQ1_LAP=10000

# QUERY: green seaturtle cheMyd1
SEQ2_DIR=/hive/data/genomes/cheMyd1/cheMyd1.2bit
SEQ2_LEN=/hive/data/genomes/cheMyd1/chrom.sizes
SEQ2_CHUNK=20000000
SEQ2_LIMIT=800
SEQ2_LAP=0

BASE=/hive/data/genomes/grcH38P11/bed/lastzCheMyd1.2015-02-06
TMPDIR=/dev/shm
_EOF_
    # << happy emacs

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl `pwd`/DEF -verbose=2 \
        -chainMinScore=5000 -chainLinearGap=loose \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > do.log 2>&1
    # real    274m42.880s

    cat fb.grcH38P11.chainCheMyd1Link.txt
    # 191988160 bases of 3049335806 (6.296%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -buildDir=`pwd` grcH38P11 cheMyd1) > rbest.log 2>&1 &
    # real    8m1.248s

    # and for the swap:
    mkdir /hive/data/genomes/cheMyd1/bed/blastz.grcH38P11.swap
    cd /hive/data/genomes/cheMyd1/bed/blastz.grcH38P11.swap

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl -verbose=2 \
      /hive/data/genomes/grcH38P11/bed/lastzCheMyd1.2015-02-06/DEF \
        -swap -chainMinScore=5000 -chainLinearGap=loose \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > swap.log 2>&1
    #  real    35m32.831s

    cat fb.cheMyd1.chainGrcH38P11Link.txt
    # 167987740 bases of 2110381997 (7.960%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -buildDir=`pwd` cheMyd1 grcH38P11) > rbest.log 2>&1
    # real    14m38.900s

#########################################################################
# LASTZ human/grcH38P11 vs. painted turtle/chrPic2 - (TODO - 2015-02-06 - Angie)
    mkdir /hive/data/genomes/grcH38P11/bed/lastzChrPic2.2015-02-06
    cd /hive/data/genomes/grcH38P11/bed/lastzChrPic2.2015-02-06

    cat << '_EOF_' > DEF
# human vs painted turtle
BLASTZ=/cluster/bin/penn/lastz-distrib-1.03.54/bin/lastz
BLASTZ_Y=3400
BLASTZ_L=6000
BLASTZ_K=2200
BLASTZ_M=50
BLASTZ_Q=/scratch/data/blastz/HoxD55.q
#      A    C    G    T
#     91  -90  -25 -100
#    -90  100 -100  -25
#    -25 -100  100  -90
#   -100  -25  -90  91

# TARGET: human grcH38P11
SEQ1_DIR=/hive/data/genomes/grcH38P11/grcH38P11.2bit
SEQ1_LEN=/hive/data/genomes/grcH38P11/chrom.sizes
SEQ1_CHUNK=40000000
SEQ1_LIMIT=3
SEQ1_LAP=10000

# QUERY: painted turtle chrPic2
SEQ2_DIR=/hive/data/genomes/chrPic2/chrPic2.2bit
SEQ2_LEN=/hive/data/genomes/chrPic2/chrom.sizes
SEQ2_CHUNK=20000000
SEQ2_LIMIT=400
SEQ2_LAP=0

BASE=/hive/data/genomes/grcH38P11/bed/lastzChrPic2.2015-02-06
TMPDIR=/dev/shm
_EOF_
    # << happy emacs

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl `pwd`/DEF -verbose=2 \
        -chainMinScore=5000 -chainLinearGap=loose \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > do.log 2>&1
    # real    286m29.793s

    cat fb.grcH38P11.chainChrPic2Link.txt
    # 204556077 bases of 3049335806 (6.708%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -buildDir=`pwd` grcH38P11 chrPic2) > rbest.log 2>&1 &
    # real    9m13.702s

    # and for the swap:
    mkdir /hive/data/genomes/chrPic2/bed/blastz.grcH38P11.swap
    cd /hive/data/genomes/chrPic2/bed/blastz.grcH38P11.swap

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl -verbose=2 \
      /hive/data/genomes/grcH38P11/bed/lastzChrPic2.2015-02-06/DEF \
        -swap -chainMinScore=5000 -chainLinearGap=loose \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > swap.log 2>&1
    #  real    35m11.829s

    cat fb.chrPic2.chainGrcH38P11Link.txt
    # 185888111 bases of 2173204089 (8.554%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -buildDir=`pwd` chrPic2 grcH38P11) > rbest.log 2>&1
    # real    15m17.351s

#########################################################################
# LASTZ human/grcH38P11 vs. painted turtle/xipMac1 - (TODO - 2015-02-06 - Angie)
    mkdir /hive/data/genomes/grcH38P11/bed/lastzXipMac1.2015-02-06
    cd /hive/data/genomes/grcH38P11/bed/lastzXipMac1.2015-02-06

    cat << '_EOF_' > DEF
# human vs painted turtle
BLASTZ=/cluster/bin/penn/lastz-distrib-1.03.54/bin/lastz
BLASTZ_Y=3400
BLASTZ_L=6000
BLASTZ_K=2200
BLASTZ_M=50
BLASTZ_Q=/scratch/data/blastz/HoxD55.q
#      A    C    G    T
#     91  -90  -25 -100
#    -90  100 -100  -25
#    -25 -100  100  -90
#   -100  -25  -90  91

# TARGET: human grcH38P11
SEQ1_DIR=/hive/data/genomes/grcH38P11/grcH38P11.2bit
SEQ1_LEN=/hive/data/genomes/grcH38P11/chrom.sizes
SEQ1_CHUNK=40000000
SEQ1_LIMIT=3
SEQ1_LAP=10000

# QUERY: painted turtle xipMac1
SEQ2_DIR=/hive/data/genomes/xipMac1/xipMac1.2bit
SEQ2_LEN=/hive/data/genomes/xipMac1/chrom.sizes
SEQ2_CHUNK=20000000
SEQ2_LIMIT=100
SEQ2_LAP=0

BASE=/hive/data/genomes/grcH38P11/bed/lastzXipMac1.2015-02-06
TMPDIR=/dev/shm
_EOF_
    # << happy emacs

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl `pwd`/DEF -verbose=2 \
        -chainMinScore=5000 -chainLinearGap=loose \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > do.log 2>&1
    # real    125m46.563s

    cat fb.grcH38P11.chainXipMac1Link.txt
    # 57890952 bases of 3049335806 (1.898%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -buildDir=`pwd` grcH38P11 xipMac1) > rbest.log 2>&1 &
    # real    3m48.235s

    # and for the swap:
    mkdir /hive/data/genomes/xipMac1/bed/blastz.grcH38P11.swap
    cd /hive/data/genomes/xipMac1/bed/blastz.grcH38P11.swap

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl -verbose=2 \
      /hive/data/genomes/grcH38P11/bed/lastzXipMac1.2015-02-06/DEF \
        -swap -chainMinScore=5000 -chainLinearGap=loose \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > swap.log 2>&1
    #  real    9m11.951s

    cat fb.xipMac1.chainGrcH38P11Link.txt
    # 48535752 bases of 652815383 (7.435%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -buildDir=`pwd` xipMac1 grcH38P11) > rbest.log 2>&1
    # real    6m4.065s

#########################################################################
# LASTZ human/grcH38P11 vs. Pundamilia nyererei/punNye1 - (TODO - 2015-02-06 - Angie)
    mkdir /hive/data/genomes/grcH38P11/bed/lastzPunNye1.2015-02-06
    cd /hive/data/genomes/grcH38P11/bed/lastzPunNye1.2015-02-06

    cat << '_EOF_' > DEF
# human vs Pundamilia nyererei
BLASTZ=/cluster/bin/penn/lastz-distrib-1.03.54/bin/lastz
BLASTZ_Y=3400
BLASTZ_L=6000
BLASTZ_K=2200
BLASTZ_M=50
BLASTZ_Q=/scratch/data/blastz/HoxD55.q
#      A    C    G    T
#     91  -90  -25 -100
#    -90  100 -100  -25
#    -25 -100  100  -90
#   -100  -25  -90  91

# TARGET: human grcH38P11
SEQ1_DIR=/hive/data/genomes/grcH38P11/grcH38P11.2bit
SEQ1_LEN=/hive/data/genomes/grcH38P11/chrom.sizes
SEQ1_CHUNK=40000000
SEQ1_LIMIT=3
SEQ1_LAP=10000

# QUERY: Pundamilia nyererei punNye1
SEQ2_DIR=/hive/data/genomes/punNye1/punNye1.2bit
SEQ2_LEN=/hive/data/genomes/punNye1/chrom.sizes
SEQ2_CHUNK=20000000
SEQ2_LIMIT=30
SEQ2_LAP=0

BASE=/hive/data/genomes/grcH38P11/bed/lastzPunNye1.2015-02-06
TMPDIR=/dev/shm
_EOF_
    # << happy emacs

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl `pwd`/DEF -verbose=2 \
        -chainMinScore=5000 -chainLinearGap=loose \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > do.log 2>&1
    # real    134m6.741s

    cat fb.grcH38P11.chainPunNye1Link.txt
    # 54487438 bases of 3049335806 (1.787%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -buildDir=`pwd` grcH38P11 punNye1) > rbest.log 2>&1 &
    # real    4m39.292s

    # and for the swap:
    mkdir /hive/data/genomes/punNye1/bed/blastz.grcH38P11.swap
    cd /hive/data/genomes/punNye1/bed/blastz.grcH38P11.swap

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl -verbose=2 \
      /hive/data/genomes/grcH38P11/bed/lastzPunNye1.2015-02-06/DEF \
        -swap -chainMinScore=5000 -chainLinearGap=loose \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > swap.log 2>&1
    #  real    8m40.110s

    cat fb.punNye1.chainGrcH38P11Link.txt
    # 47965851 bases of 698757151 (6.864%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -buildDir=`pwd` punNye1 grcH38P11) > rbest.log 2>&1
    # real    5m7.941s

#########################################################################
# LASTZ human/grcH38P11 vs. Zebra Mbuna/mayZeb1 - (TODO - 2015-02-06 - Angie)
    mkdir /hive/data/genomes/grcH38P11/bed/lastzMayZeb1.2015-02-06
    cd /hive/data/genomes/grcH38P11/bed/lastzMayZeb1.2015-02-06

    cat << '_EOF_' > DEF
# human vs Zebra Mbuna
BLASTZ=/cluster/bin/penn/lastz-distrib-1.03.54/bin/lastz
BLASTZ_Y=3400
BLASTZ_L=6000
BLASTZ_K=2200
BLASTZ_M=50
BLASTZ_Q=/scratch/data/blastz/HoxD55.q
#      A    C    G    T
#     91  -90  -25 -100
#    -90  100 -100  -25
#    -25 -100  100  -90
#   -100  -25  -90  91

# TARGET: human grcH38P11
SEQ1_DIR=/hive/data/genomes/grcH38P11/grcH38P11.2bit
SEQ1_LEN=/hive/data/genomes/grcH38P11/chrom.sizes
SEQ1_CHUNK=40000000
SEQ1_LIMIT=3
SEQ1_LAP=10000

# QUERY: Zebra Mbuna mayZeb1
SEQ2_DIR=/hive/data/genomes/mayZeb1/mayZeb1.2bit
SEQ2_LEN=/hive/data/genomes/mayZeb1/chrom.sizes
SEQ2_CHUNK=20000000
SEQ2_LIMIT=30
SEQ2_LAP=0

BASE=/hive/data/genomes/grcH38P11/bed/lastzMayZeb1.2015-02-06
TMPDIR=/dev/shm
_EOF_
    # << happy emacs

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl `pwd`/DEF -verbose=2 \
        -chainMinScore=5000 -chainLinearGap=loose \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > do.log 2>&1
    # real    1066m37.973s

    cat fb.grcH38P11.chainMayZeb1Link.txt
    # 55052422 bases of 3049335806 (1.805%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -buildDir=`pwd` grcH38P11 mayZeb1) > rbest.log 2>&1 &
    # real    4m49.016s

    # and for the swap:
    mkdir /hive/data/genomes/mayZeb1/bed/blastz.grcH38P11.swap
    cd /hive/data/genomes/mayZeb1/bed/blastz.grcH38P11.swap

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl -verbose=2 \
      /hive/data/genomes/grcH38P11/bed/lastzMayZeb1.2015-02-06/DEF \
        -swap -chainMinScore=5000 -chainLinearGap=loose \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > swap.log 2>&1
    #  real    8m24.648s

    cat fb.mayZeb1.chainGrcH38P11Link.txt
    # 48376552 bases of 713527863 (6.780%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -buildDir=`pwd` mayZeb1 grcH38P11) > rbest.log 2>&1
    # real    4m57.850s

#########################################################################
# LASTZ human/grcH38P11 vs. zebrafish/danRer10 - (TODO - 2015-02-06 - Angie)
    mkdir /hive/data/genomes/grcH38P11/bed/lastzDanRer10.2015-02-06
    cd /hive/data/genomes/grcH38P11/bed/lastzDanRer10.2015-02-06

    cat << '_EOF_' > DEF
# human vs zebrafish
BLASTZ=/cluster/bin/penn/lastz-distrib-1.03.54/bin/lastz
BLASTZ_Y=3400
BLASTZ_L=6000
BLASTZ_K=2200
BLASTZ_M=50
BLASTZ_Q=/scratch/data/blastz/HoxD55.q
#      A    C    G    T
#     91  -90  -25 -100
#    -90  100 -100  -25
#    -25 -100  100  -90
#   -100  -25  -90  91

# TARGET: human grcH38P11
SEQ1_DIR=/hive/data/genomes/grcH38P11/grcH38P11.2bit
SEQ1_LEN=/hive/data/genomes/grcH38P11/chrom.sizes
SEQ1_CHUNK=40000000
SEQ1_LIMIT=3
SEQ1_LAP=10000

# QUERY: zebrafish danRer10
SEQ2_DIR=/hive/data/genomes/danRer10/danRer10.2bit
SEQ2_LEN=/hive/data/genomes/danRer10/chrom.sizes
SEQ2_CHUNK=20000000
SEQ2_LIMIT=30
SEQ2_LAP=0

BASE=/hive/data/genomes/grcH38P11/bed/lastzDanRer10.2015-02-06
TMPDIR=/dev/shm
_EOF_
    # << happy emacs

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl `pwd`/DEF -verbose=2 \
        -chainMinScore=5000 -chainLinearGap=loose \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > do.log 2>&1
    # real    2785m54.894s

    cat fb.grcH38P11.chainDanRer10Link.txt
    # 102378031 bases of 3049335806 (3.357%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -buildDir=`pwd` grcH38P11 danRer10) > rbest.log 2>&1 &
    # real    7m50.594s

    # and for the swap:
    mkdir /hive/data/genomes/danRer10/bed/blastz.grcH38P11.swap
    cd /hive/data/genomes/danRer10/bed/blastz.grcH38P11.swap

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl -verbose=2 \
      /hive/data/genomes/grcH38P11/bed/lastzDanRer10.2015-02-06/DEF \
        -swap -chainMinScore=5000 -chainLinearGap=loose \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > swap.log 2>&1
    #  real    37m50.204s

    cat fb.danRer10.chainGrcH38P11Link.txt
    # 97391181 bases of 1369683683 (7.110%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -buildDir=`pwd` danRer10 grcH38P11) > rbest.log 2>&1
    # real    8m37.556s

#########################################################################
# LASTZ human/grcH38P11 vs. lamprey/petMar2 - (TODO - 2015-02-06 - Angie)
    mkdir /hive/data/genomes/grcH38P11/bed/lastzPetMar2.2015-02-06
    cd /hive/data/genomes/grcH38P11/bed/lastzPetMar2.2015-02-06

    cat << '_EOF_' > DEF
# human vs lamprey
BLASTZ=/cluster/bin/penn/lastz-distrib-1.03.54/bin/lastz
BLASTZ_Y=3400
BLASTZ_L=6000
BLASTZ_K=2200
BLASTZ_M=50
BLASTZ_Q=/scratch/data/blastz/HoxD55.q
#      A    C    G    T
#     91  -90  -25 -100
#    -90  100 -100  -25
#    -25 -100  100  -90
#   -100  -25  -90  91

# TARGET: human grcH38P11
SEQ1_DIR=/hive/data/genomes/grcH38P11/grcH38P11.2bit
SEQ1_LEN=/hive/data/genomes/grcH38P11/chrom.sizes
SEQ1_CHUNK=40000000
SEQ1_LIMIT=3
SEQ1_LAP=10000

# QUERY: lamprey petMar2
SEQ2_DIR=/hive/data/genomes/petMar2/petMar2.2bit
SEQ2_LEN=/hive/data/genomes/petMar2/chrom.sizes
SEQ2_CHUNK=20000000
SEQ2_LIMIT=100
SEQ2_LAP=0

BASE=/hive/data/genomes/grcH38P11/bed/lastzPetMar2.2015-02-06
TMPDIR=/dev/shm
_EOF_
    # << happy emacs

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl `pwd`/DEF -verbose=2 \
        -chainMinScore=5000 -chainLinearGap=loose \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > do.log 2>&1
    # real    120m15.847s

    cat fb.grcH38P11.chainPetMar2Link.txt
    # 38581766 bases of 3049335806 (1.265%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -buildDir=`pwd` grcH38P11 petMar2) > rbest.log 2>&1 &
    # real    2m51.935s

    # and for the swap:
    mkdir /hive/data/genomes/petMar2/bed/blastz.grcH38P11.swap
    cd /hive/data/genomes/petMar2/bed/blastz.grcH38P11.swap

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl -verbose=2 \
      /hive/data/genomes/grcH38P11/bed/lastzPetMar2.2015-02-06/DEF \
        -swap -chainMinScore=5000 -chainLinearGap=loose \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > swap.log 2>&1
    #  real    8m48.057s

    cat fb.petMar2.chainGrcH38P11Link.txt
    # 25633579 bases of 647368134 (3.960%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -buildDir=`pwd` petMar2 grcH38P11) > rbest.log 2>&1
    # real    4m46.757s

#########################################################################
# LASTZ human/grcH38P11 vs. Aardvark/oryAfe1 - (TODO - 2015-04-23 - Angie)
    mkdir /hive/data/genomes/grcH38P11/bed/lastzOryAfe1.2015-04-23
    cd /hive/data/genomes/grcH38P11/bed/lastzOryAfe1.2015-04-23

    cat << '_EOF_' > DEF
# human vs Aardvark
BLASTZ=/cluster/bin/penn/lastz-distrib-1.03.66/bin/lastz
BLASTZ_O=400
BLASTZ_E=30
BLASTZ_M=254
# default BLASTZ_Q score matrix:
#       A     C     G     T
# A    91  -114   -31  -123
# C  -114   100  -125   -31
# G   -31  -125   100  -114
# T  -123   -31  -114    91

# TARGET: human grcH38P11
SEQ1_DIR=/hive/data/genomes/grcH38P11/grcH38P11.2bit
SEQ1_LEN=/hive/data/genomes/grcH38P11/chrom.sizes
SEQ1_CHUNK=40000000
SEQ1_LIMIT=10
SEQ1_LAP=10000

# QUERY: Aardvark oryAfe1
SEQ2_DIR=/hive/data/genomes/oryAfe1/oryAfe1.2bit
SEQ2_LEN=/hive/data/genomes/oryAfe1/chrom.sizes
SEQ2_CHUNK=20000000
SEQ2_LIMIT=100
SEQ2_LAP=0

BASE=/hive/data/genomes/grcH38P11/bed/lastzOryAfe1.2015-04-23
TMPDIR=/dev/shm
_EOF_
    # << happy emacs

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl `pwd`/DEF -verbose=2 \
        -chainMinScore=3000 -chainLinearGap=medium \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > do.log 2>&1
    #  real    472m21.083s

    cat fb.grcH38P11.chainOryAfe1Link.txt
    # 1236908970 bases of 3049335806 (40.563%) in intersection
    # replacing previous tuned version:
    # 1113801383 bases of 3049335806 (36.526%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -buildDir=`pwd` grcH38P11 oryAfe1) > rbest.log 2>&1 &
    # real    34m51.856s

    # and for the swap:
    mkdir /hive/data/genomes/oryAfe1/bed/blastz.grcH38P11.swap
    cd /hive/data/genomes/oryAfe1/bed/blastz.grcH38P11.swap

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl -verbose=2 \
      /hive/data/genomes/grcH38P11/bed/lastzOryAfe1.2015-04-23/DEF \
        -swap -chainMinScore=3000 -chainLinearGap=medium \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > swap.log 2>&1
    #  real    105m58.107s

    cat fb.oryAfe1.chainGrcH38P11Link.txt
    # 1164699059 bases of 3415340621 (34.102%) in intersection
    # replacing previous tuned version:
    # 1048528734 bases of 3415340621 (30.701%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -buildDir=`pwd` oryAfe1 grcH38P11) > rbest.log 2>&1
    # real    38m36.380s

#########################################################################
# LASTZ human/grcH38P11 vs. White rhinoceros/cerSim1 - (TODO - 2015-02-22 - Angie)
    mkdir /hive/data/genomes/grcH38P11/bed/lastzCerSim1.2015-02-22
    cd /hive/data/genomes/grcH38P11/bed/lastzCerSim1.2015-02-22

    cat << '_EOF_' > DEF
# human vs White rhinoceros
BLASTZ=/cluster/bin/penn/lastz-distrib-1.03.66/bin/lastz
BLASTZ_O=400
BLASTZ_E=30
BLASTZ_M=254
# default BLASTZ_Q score matrix:
#       A     C     G     T
# A    91  -114   -31  -123
# C  -114   100  -125   -31
# G   -31  -125   100  -114
# T  -123   -31  -114    91

# TARGET: human grcH38P11
SEQ1_DIR=/hive/data/genomes/grcH38P11/grcH38P11.2bit
SEQ1_LEN=/hive/data/genomes/grcH38P11/chrom.sizes
SEQ1_CHUNK=40000000
SEQ1_LIMIT=5
SEQ1_LAP=10000

# QUERY: White rhinoceros cerSim1
SEQ2_DIR=/hive/data/genomes/cerSim1/cerSim1.2bit
SEQ2_LEN=/hive/data/genomes/cerSim1/chrom.sizes
SEQ2_CHUNK=20000000
SEQ2_LIMIT=20
SEQ2_LAP=0

BASE=/hive/data/genomes/grcH38P11/bed/lastzCerSim1.2015-02-22
TMPDIR=/dev/shm
_EOF_
    # << happy emacs

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl `pwd`/DEF -verbose=2 \
        -chainMinScore=3000 -chainLinearGap=medium \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > do.log 2>&1
    # real    1227m14.067s

    cat fb.grcH38P11.chainCerSim1Link.txt
    # 1726920355 bases of 3049335806 (56.633%) in intersection
    # replacing previous tuned version:
    # 1618425081 bases of 3049335806 (53.075%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -buildDir=`pwd` grcH38P11 cerSim1) > rbest.log 2>&1 &
    # real    42m41.811s

    # and for the swap:
    mkdir /hive/data/genomes/cerSim1/bed/blastz.grcH38P11.swap
    cd /hive/data/genomes/cerSim1/bed/blastz.grcH38P11.swap

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl -verbose=2 \
      /hive/data/genomes/grcH38P11/bed/lastzCerSim1.2015-02-22/DEF \
        -swap -chainMinScore=3000 -chainLinearGap=medium \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > swap.log 2>&1
    # real    117m59.898s

    cat fb.cerSim1.chainGrcH38P11Link.txt
    # 1638614141 bases of 2366858012 (69.232%) in intersection
    # replacing previous tuned version:
    # 1534238724 bases of 2366858012 (64.822%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -buildDir=`pwd` cerSim1 grcH38P11) > rbest.log 2>&1
    # real    78m9.790s

#########################################################################
# LASTZ human/grcH38P11 vs. Cape golden mole/chrAsi1 - (TODO - 2015-02-17 - Angie)
    mkdir /hive/data/genomes/grcH38P11/bed/lastzChrAsi1.2015-02-17
    cd /hive/data/genomes/grcH38P11/bed/lastzChrAsi1.2015-02-17

    cat << '_EOF_' > DEF
# human vs Cape golden mole
BLASTZ=/cluster/bin/penn/lastz-distrib-1.03.54/bin/lastz
BLASTZ_O=400
BLASTZ_E=30

# TARGET: human grcH38P11
SEQ1_DIR=/hive/data/genomes/grcH38P11/grcH38P11.2bit
SEQ1_LEN=/hive/data/genomes/grcH38P11/chrom.sizes
SEQ1_CHUNK=40000000
SEQ1_LIMIT=10
SEQ1_LAP=10000

# QUERY: Cape golden mole chrAsi1
SEQ2_DIR=/hive/data/genomes/chrAsi1/chrAsi1.2bit
SEQ2_LEN=/hive/data/genomes/chrAsi1/chrom.sizes
SEQ2_CHUNK=20000000
SEQ2_LIMIT=100
SEQ2_LAP=0

BASE=/hive/data/genomes/grcH38P11/bed/lastzChrAsi1.2015-02-17
TMPDIR=/dev/shm
_EOF_
    # << happy emacs

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl `pwd`/DEF -verbose=2 \
        -chainMinScore=3000 -chainLinearGap=medium \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > do.log 2>&1
    # real    3754m43.142s

    cat fb.grcH38P11.chainChrAsi1Link.txt
    # 1015855213 bases of 3049335806 (33.314%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -workhorse=hgwdev -buildDir=`pwd` grcH38P11 chrAsi1) \
       > rbest.log 2>&1 &
    # real    42m12.650s

    # and for the swap:
    mkdir /hive/data/genomes/chrAsi1/bed/blastz.grcH38P11.swap
    cd /hive/data/genomes/chrAsi1/bed/blastz.grcH38P11.swap

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl -verbose=2 \
      /hive/data/genomes/grcH38P11/bed/lastzChrAsi1.2015-02-17/DEF \
        -swap -chainMinScore=3000 -chainLinearGap=medium \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > swap.log 2>&1
    #  real    103m1.384s

    cat fb.chrAsi1.chainGrcH38P11Link.txt
    # 977711721 bases of 3363564316 (29.068%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -workhorse=hgwdev -buildDir=`pwd` chrAsi1 grcH38P11) \
       > rbest.log 2>&1
    # real    47m40.074s

#########################################################################
# LASTZ human/grcH38P11 vs. Big brown bat/eptFus1 - (TODO - 2015-04-24 - Angie)
    mkdir /hive/data/genomes/grcH38P11/bed/lastzEptFus1.2015-04-24
    cd /hive/data/genomes/grcH38P11/bed/lastzEptFus1.2015-04-24

    cat << '_EOF_' > DEF
# human vs Big brown bat
BLASTZ=/cluster/bin/penn/lastz-distrib-1.03.66/bin/lastz
BLASTZ_O=400
BLASTZ_E=30
BLASTZ_M=254
# default BLASTZ_Q score matrix:
#       A     C     G     T
# A    91  -114   -31  -123
# C  -114   100  -125   -31
# G   -31  -125   100  -114
# T  -123   -31  -114    91

# TARGET: human grcH38P11
SEQ1_DIR=/hive/data/genomes/grcH38P11/grcH38P11.2bit
SEQ1_LEN=/hive/data/genomes/grcH38P11/chrom.sizes
SEQ1_CHUNK=40000000
SEQ1_LIMIT=10
SEQ1_LAP=10000

# QUERY: Big brown bat eptFus1
SEQ2_DIR=/hive/data/genomes/eptFus1/eptFus1.2bit
SEQ2_LEN=/hive/data/genomes/eptFus1/chrom.sizes
SEQ2_CHUNK=20000000
SEQ2_LIMIT=20
SEQ2_LAP=0

BASE=/hive/data/genomes/grcH38P11/bed/lastzEptFus1.2015-04-24
TMPDIR=/dev/shm
_EOF_
    # << happy emacs

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl `pwd`/DEF -verbose=2 \
        -chainMinScore=3000 -chainLinearGap=medium \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > do.log 2>&1
    # real    377m2.703s

    cat fb.grcH38P11.chainEptFus1Link.txt
    # 1193001967 bases of 3049335806 (39.123%) in intersection
    # replacing previous tuned version:
    # 1109543782 bases of 3049335806 (36.386%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -buildDir=`pwd` grcH38P11 eptFus1) > rbest.log 2>&1 &
    # real    33m10.892s

    # and for the swap:
    mkdir /hive/data/genomes/eptFus1/bed/blastz.grcH38P11.swap
    cd /hive/data/genomes/eptFus1/bed/blastz.grcH38P11.swap

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl -verbose=2 \
      /hive/data/genomes/grcH38P11/bed/lastzEptFus1.2015-04-24/DEF \
        -swap -chainMinScore=3000 -chainLinearGap=medium \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > swap.log 2>&1
    #  real    91m1.466s

    cat fb.eptFus1.chainGrcH38P11Link.txt
    # 1127211856 bases of 1811378799 (62.229%) in intersection
    # replacing previous tuned version:
    # 1051896885 bases of 1811378799 (58.072%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -buildDir=`pwd` eptFus1 grcH38P11) > rbest.log 2>&1
    # real    36m31.110s

#########################################################################
# LASTZ human/grcH38P11 vs. Chinese tree shrew/tupChi1 - (TODO - 2015-02-17 - Angie)
    mkdir /hive/data/genomes/grcH38P11/bed/lastzTupChi1.2015-02-17
    cd /hive/data/genomes/grcH38P11/bed/lastzTupChi1.2015-02-17

    cat << '_EOF_' > DEF
# human vs Chinese tree shrew
BLASTZ=/cluster/bin/penn/lastz-distrib-1.03.54/bin/lastz
BLASTZ_O=400
BLASTZ_E=30

# TARGET: human grcH38P11
SEQ1_DIR=/hive/data/genomes/grcH38P11/grcH38P11.2bit
SEQ1_LEN=/hive/data/genomes/grcH38P11/chrom.sizes
SEQ1_CHUNK=40000000
SEQ1_LIMIT=20
SEQ1_LAP=10000

# QUERY: Chinese tree shrew tupChi1
SEQ2_DIR=/hive/data/genomes/tupChi1/tupChi1.2bit
SEQ2_LEN=/hive/data/genomes/tupChi1/chrom.sizes
SEQ2_CHUNK=20000000
SEQ2_LIMIT=120
SEQ2_LAP=0

BASE=/hive/data/genomes/grcH38P11/bed/lastzTupChi1.2015-02-17
TMPDIR=/dev/shm
_EOF_
    # << happy emacs

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl `pwd`/DEF -verbose=2 \
        -chainMinScore=3000 -chainLinearGap=medium \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > do.log 2>&1
    # real    2638m13.806s

    cat fb.grcH38P11.chainTupChi1Link.txt
    # 1379994626 bases of 3049335806 (45.256%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -workhorse=hgwdev -buildDir=`pwd` grcH38P11 tupChi1) \
       > rbest.log 2>&1 &
    # real    60m22.301s

    # and for the swap:
    mkdir /hive/data/genomes/tupChi1/bed/blastz.grcH38P11.swap
    cd /hive/data/genomes/tupChi1/bed/blastz.grcH38P11.swap

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl -verbose=2 \
      /hive/data/genomes/grcH38P11/bed/lastzTupChi1.2015-02-17/DEF \
        -swap -chainMinScore=3000 -chainLinearGap=medium \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > swap.log 2>&1
    #  real    119m54.935s

    cat fb.tupChi1.chainGrcH38P11Link.txt
    # 1362665822 bases of 2706389135 (50.350%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -buildDir=`pwd` tupChi1 grcH38P11) > rbest.log 2>&1
    # real    43m38.032s

#########################################################################
# LASTZ human/grcH38P11 vs. horse/equCab2 - (TODO - 2015-02-22 - Angie)
    mkdir /hive/data/genomes/grcH38P11/bed/lastzEquCab2.2015-02-22
    cd /hive/data/genomes/grcH38P11/bed/lastzEquCab2.2015-02-22

    cat << '_EOF_' > DEF
# human vs horse
BLASTZ=/cluster/bin/penn/lastz-distrib-1.03.66/bin/lastz
BLASTZ_O=400
BLASTZ_E=30
BLASTZ_M=254
# default BLASTZ_Q score matrix:
#       A     C     G     T
# A    91  -114   -31  -123
# C  -114   100  -125   -31
# G   -31  -125   100  -114
# T  -123   -31  -114    91

# TARGET: human grcH38P11
SEQ1_DIR=/hive/data/genomes/grcH38P11/grcH38P11.2bit
SEQ1_LEN=/hive/data/genomes/grcH38P11/chrom.sizes
SEQ1_CHUNK=40000000
SEQ1_LIMIT=20
SEQ1_LAP=10000

# QUERY: horse equCab2
SEQ2_DIR=/hive/data/genomes/equCab2/equCab2.2bit
SEQ2_LEN=/hive/data/genomes/equCab2/chrom.sizes
SEQ2_CHUNK=20000000
SEQ2_LIMIT=10
SEQ2_LAP=0

BASE=/hive/data/genomes/grcH38P11/bed/lastzEquCab2.2015-02-22
TMPDIR=/dev/shm
_EOF_
    # << happy emacs

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl `pwd`/DEF -verbose=2 \
        -chainMinScore=3000 -chainLinearGap=medium \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > do.log 2>&1
    # real    966m54.143s

    cat fb.grcH38P11.chainEquCab2Link.txt
    # 1691134629 bases of 3049335806 (55.459%) in intersection
    # replacing the previous tuned version:
    # 1588178706 bases of 3049335806 (52.083%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -buildDir=`pwd` grcH38P11 equCab2) > rbest.log 2>&1 &
    # real    81m49.399s

    # load up the recip best chainNet tables
    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -load -continue=load -workhorse=hgwdev \
	-buildDir=`pwd` grcH38P11 equCab2) > loadRBest.log 2>&1 &
    # real    11m38.247s
    cat fb.grcH38P11.chainRBestEquCab2Link.txt
# 1547949213 bases of 3049335806 (50.763%) in intersection

    # create and load up the syntenic chainNet tables 2017-10-30
cd /hive/data/genomes/grcH38P11/bed/lastzEquCab2.2015-02-22/axtChain
netToAxt grcH38P11.equCab2.syn.net.gz grcH38P11.equCab2.all.chain.gz \
/scratch/data/grcH38P11/grcH38P11.2bit /hive/data/genomes/equCab2/equCab2.2bit stdout \
  | axtSort stdin stdout \
     | axtToChain stdin /hive/data/genomes/grcH38P11/chrom.sizes \
        /hive/data/genomes/equCab2/chrom.sizes stdout \
            | gzip -c > grcH38P11.equCab2.syn.chain.gz
hgLoadChain -tIndex grcH38P11 chainSynEquCab2 grcH38P11.equCab2.syn.chain.gz
netFilter -minGap=10 grcH38P11.equCab2.syn.net.gz \
  | hgLoadNet -verbose=0 grcH38P11 netSynEquCab2 stdin
cd /hive/data/genomes/grcH38P11/bed/lastzEquCab2.2015-02-22
featureBits grcH38P11 chainSynEquCab2Link > fb.grcH38P11.chainSynEquCab2Link.txt 2>&1
cat fb.grcH38P11.chainSynEquCab2Link.txt
# 1625260798 bases of 3049335806 (53.299%) in intersection

    # and for the swap:
    mkdir /hive/data/genomes/equCab2/bed/blastz.grcH38P11.swap
    cd /hive/data/genomes/equCab2/bed/blastz.grcH38P11.swap

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl -verbose=2 \
      /hive/data/genomes/grcH38P11/bed/lastzEquCab2.2015-02-22/DEF \
        -swap -chainMinScore=3000 -chainLinearGap=medium \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > swap.log 2>&1
    #  real    123m57.167s

    cat fb.equCab2.chainGrcH38P11Link.txt
    # 1617562865 bases of 2428790173 (66.600%) in intersection
    # replacing the previous tuned version:
    # 1516707888 bases of 2428790173 (62.447%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -buildDir=`pwd` equCab2 grcH38P11) > rbest.log 2>&1
    # real    43m47.647s

#########################################################################
# LASTZ human/grcH38P11 vs. Bactrian camel/camFer1 - (TODO - 2015-04-24 - Angie)
    mkdir /hive/data/genomes/grcH38P11/bed/lastzCamFer1.2015-04-24
    cd /hive/data/genomes/grcH38P11/bed/lastzCamFer1.2015-04-24

    cat << '_EOF_' > DEF
# human vs Bactrian camel
BLASTZ=/cluster/bin/penn/lastz-distrib-1.03.66/bin/lastz
BLASTZ_O=400
BLASTZ_E=30
BLASTZ_M=254
# default BLASTZ_Q score matrix:
#       A     C     G     T
# A    91  -114   -31  -123
# C  -114   100  -125   -31
# G   -31  -125   100  -114
# T  -123   -31  -114    91

# TARGET: human grcH38P11
SEQ1_DIR=/hive/data/genomes/grcH38P11/grcH38P11.2bit
SEQ1_LEN=/hive/data/genomes/grcH38P11/chrom.sizes
SEQ1_CHUNK=40000000
SEQ1_LIMIT=20
SEQ1_LAP=10000

# QUERY: Bactrian camel camFer1
SEQ2_DIR=/hive/data/genomes/camFer1/camFer1.2bit
SEQ2_LEN=/hive/data/genomes/camFer1/chrom.sizes
SEQ2_CHUNK=20000000
SEQ2_LIMIT=20
SEQ2_LAP=0

BASE=/hive/data/genomes/grcH38P11/bed/lastzCamFer1.2015-04-24
TMPDIR=/dev/shm
_EOF_
    # << happy emacs

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl `pwd`/DEF -verbose=2 \
        -chainMinScore=3000 -chainLinearGap=medium \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > do.log 2>&1
    # real    382m39.001s


    cat fb.grcH38P11.chainCamFer1Link.txt
    # 1497063551 bases of 3049335806 (49.095%) in intersection
    # replacing the previous tuned version:
    # 1408973544 bases of 3049335806 (46.206%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -buildDir=`pwd` grcH38P11 camFer1) > rbest.log 2>&1 &
    # real    41m32.785s

    # and for the swap:
    mkdir /hive/data/genomes/camFer1/bed/blastz.grcH38P11.swap
    cd /hive/data/genomes/camFer1/bed/blastz.grcH38P11.swap

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl -verbose=2 \
      /hive/data/genomes/grcH38P11/bed/lastzCamFer1.2015-04-24/DEF \
        -swap -chainMinScore=3000 -chainLinearGap=medium \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > swap.log 2>&1
    #  real    99m10.651s

    cat fb.camFer1.chainGrcH38P11Link.txt
    # 1414980564 bases of 1985442806 (71.268%) in intersection
    # replacing the previous tuned version:
    # 1335694086 bases of 1985442806 (67.274%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -buildDir=`pwd` camFer1 grcH38P11) > rbest.log 2>&1
    # real    40m5.483s

#########################################################################
# LASTZ human/grcH38P11 vs. alpaca/vicPac2 - (TODO - 2015-04-28 - Angie)
    mkdir /hive/data/genomes/grcH38P11/bed/lastzVicPac2.2015-04-28
    cd /hive/data/genomes/grcH38P11/bed/lastzVicPac2.2015-04-28

    cat << '_EOF_' > DEF
# human vs alpaca
BLASTZ=/cluster/bin/penn/lastz-distrib-1.03.66/bin/lastz
BLASTZ_O=400
BLASTZ_E=30
BLASTZ_M=254
# default BLASTZ_Q score matrix:
#       A     C     G     T
# A    91  -114   -31  -123
# C  -114   100  -125   -31
# G   -31  -125   100  -114
# T  -123   -31  -114    91

# TARGET: human grcH38P11
SEQ1_DIR=/hive/data/genomes/grcH38P11/grcH38P11.2bit
SEQ1_LEN=/hive/data/genomes/grcH38P11/chrom.sizes
SEQ1_CHUNK=40000000
SEQ1_LIMIT=30
SEQ1_LAP=10000

# QUERY: alpaca vicPac2
SEQ2_DIR=/hive/data/genomes/vicPac2/vicPac2.2bit
SEQ2_LEN=/hive/data/genomes/vicPac2/chrom.sizes
SEQ2_CHUNK=20000000
SEQ2_LIMIT=400
SEQ2_LAP=0

BASE=/hive/data/genomes/grcH38P11/bed/lastzVicPac2.2015-04-28
TMPDIR=/dev/shm
_EOF_
    # << happy emacs

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl `pwd`/DEF -verbose=2 \
        -chainMinScore=3000 -chainLinearGap=medium \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > do.log 2>&1
    # real    1562m13.104s

    cat fb.grcH38P11.chainVicPac2Link.txt
    # 1491400921 bases of 3049335806 (48.909%) in intersection
    # replacing the previous tuned version:
    # 1399262189 bases of 3049335806 (45.887%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -buildDir=`pwd` grcH38P11 vicPac2) > rbest.log 2>&1 &
    # real    39m21.890s

    # and for the swap:
    mkdir /hive/data/genomes/vicPac2/bed/blastz.grcH38P11.swap
    cd /hive/data/genomes/vicPac2/bed/blastz.grcH38P11.swap

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl -verbose=2 \
      /hive/data/genomes/grcH38P11/bed/lastzVicPac2.2015-04-28/DEF \
        -swap -chainMinScore=3000 -chainLinearGap=medium \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > swap.log 2>&1
    #  real    229m47.891s

    cat fb.vicPac2.chainGrcH38P11Link.txt
    # 1429121865 bases of 2078582856 (68.755%) in intersection
    # replacing the previous tuned version:
    # 1342041434 bases of 2078582856 (64.565%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -buildDir=`pwd` vicPac2 grcH38P11) > rbest.log 2>&1
    # real    364m14.802s finished manually real    101m13.133s
    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -workhorse=hgwdev -continue=download \
       -buildDir=`pwd` vicPac2 grcH38P11) > rbestDownload.log 2>&1
    # real    0m4.424s

#########################################################################
# LASTZ human/grcH38P11 vs. dolphin/turTru2 - (TODO - 2015-04-28 - Angie)
    mkdir /hive/data/genomes/grcH38P11/bed/lastzTurTru2.2015-04-28
    cd /hive/data/genomes/grcH38P11/bed/lastzTurTru2.2015-04-28

    cat << '_EOF_' > DEF
# human vs dolphin
BLASTZ=/cluster/bin/penn/lastz-distrib-1.03.66/bin/lastz
BLASTZ_O=400
BLASTZ_E=30
BLASTZ_M=254
# default BLASTZ_Q score matrix:
#       A     C     G     T
# A    91  -114   -31  -123
# C  -114   100  -125   -31
# G   -31  -125   100  -114
# T  -123   -31  -114    91

# TARGET: human grcH38P11
SEQ1_DIR=/hive/data/genomes/grcH38P11/grcH38P11.2bit
SEQ1_LEN=/hive/data/genomes/grcH38P11/chrom.sizes
SEQ1_CHUNK=40000000
SEQ1_LIMIT=30
SEQ1_LAP=10000

# QUERY: dolphin turTru2
SEQ2_DIR=/hive/data/genomes/turTru2/turTru2.2bit
SEQ2_LEN=/hive/data/genomes/turTru2/chrom.sizes
SEQ2_CHUNK=20000000
SEQ2_LIMIT=400
SEQ2_LAP=0

BASE=/hive/data/genomes/grcH38P11/bed/lastzTurTru2.2015-04-28
TMPDIR=/dev/shm
_EOF_
    # << happy emacs

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl `pwd`/DEF -verbose=2 \
        -chainMinScore=3000 -chainLinearGap=medium \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > do.log 2>&1
    # real    1495m0.218s

    cat fb.grcH38P11.chainTurTru2Link.txt
    # 1516370469 bases of 3049335806 (49.728%) in intersection
    # replacing the previous tuned version:
    # 1404889155 bases of 3049335806 (46.072%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -buildDir=`pwd` grcH38P11 turTru2) > rbest.log 2>&1 &
    # real    40m22.097s

    # and for the swap:
    mkdir /hive/data/genomes/turTru2/bed/blastz.grcH38P11.swap
    cd /hive/data/genomes/turTru2/bed/blastz.grcH38P11.swap

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl -verbose=2 \
      /hive/data/genomes/grcH38P11/bed/lastzTurTru2.2015-04-28/DEF \
        -swap -chainMinScore=3000 -chainLinearGap=medium \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > swap.log 2>&1
    #  real    253m58.332s

    cat fb.turTru2.chainGrcH38P11Link.txt
    # 1431921957 bases of 2332402443 (61.393%) in intersection
    # replacing the previous tuned version:
    # 1329424627 bases of 2332402443 (56.998%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -buildDir=`pwd` turTru2 grcH38P11) > rbest.log 2>&1
    # real    119m47.159s

#########################################################################
# LASTZ human/grcH38P11 vs. Killer whale/orcOrc1 - (TODO - 2015-04-28 - Angie)
    mkdir /hive/data/genomes/grcH38P11/bed/lastzOrcOrc1.2015-04-28
    cd /hive/data/genomes/grcH38P11/bed/lastzOrcOrc1.2015-04-28

    cat << '_EOF_' > DEF
# human vs Killer whale
BLASTZ=/cluster/bin/penn/lastz-distrib-1.03.66/bin/lastz
BLASTZ_O=400
BLASTZ_E=30
BLASTZ_M=254
# default BLASTZ_Q score matrix:
#       A     C     G     T
# A    91  -114   -31  -123
# C  -114   100  -125   -31
# G   -31  -125   100  -114
# T  -123   -31  -114    91

# TARGET: human grcH38P11
SEQ1_DIR=/hive/data/genomes/grcH38P11/grcH38P11.2bit
SEQ1_LEN=/hive/data/genomes/grcH38P11/chrom.sizes
SEQ1_CHUNK=40000000
SEQ1_LIMIT=30
SEQ1_LAP=10000

# QUERY: Killer whale orcOrc1
SEQ2_DIR=/hive/data/genomes/orcOrc1/orcOrc1.2bit
SEQ2_LEN=/hive/data/genomes/orcOrc1/chrom.sizes
SEQ2_CHUNK=20000000
SEQ2_LIMIT=5
SEQ2_LAP=0

BASE=/hive/data/genomes/grcH38P11/bed/lastzOrcOrc1.2015-04-28
TMPDIR=/dev/shm
_EOF_
    # << happy emacs

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl `pwd`/DEF -verbose=2 \
        -chainMinScore=3000 -chainLinearGap=medium \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > do.log 2>&1
    # real    1874m13.873s

    cat fb.grcH38P11.chainOrcOrc1Link.txt
    # 1546274677 bases of 3049335806 (50.709%) in intersection
    # replacing the previous tuned version:
    # 1441746760 bases of 3049335806 (47.281%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -buildDir=`pwd` grcH38P11 orcOrc1) > rbest.log 2>&1 &
    # real    43m21.901s

    # and for the swap:
    mkdir /hive/data/genomes/orcOrc1/bed/blastz.grcH38P11.swap
    cd /hive/data/genomes/orcOrc1/bed/blastz.grcH38P11.swap

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl -verbose=2 \
      /hive/data/genomes/grcH38P11/bed/lastzOrcOrc1.2015-04-28/DEF \
        -swap -chainMinScore=3000 -chainLinearGap=medium \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > swap.log 2>&1
    #  real    100m56.186s

    cat fb.orcOrc1.chainGrcH38P11Link.txt
    # 1447927506 bases of 2249582127 (64.364%) in intersection
    # replacing the previous tuned version:
    # 1354015119 bases of 2249582127 (60.190%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -buildDir=`pwd` orcOrc1 grcH38P11) > rbest.log 2>&1
    # real    41m38.435s

#########################################################################
# LASTZ human/grcH38P11 vs. squirrel/speTri2 - (TODO - 2015-04-28 - Angie)
    mkdir /hive/data/genomes/grcH38P11/bed/lastzSpeTri2.2015-04-28
    cd /hive/data/genomes/grcH38P11/bed/lastzSpeTri2.2015-04-28

    cat << '_EOF_' > DEF
# human vs squirrel
BLASTZ=/cluster/bin/penn/lastz-distrib-1.03.66/bin/lastz
BLASTZ_O=400
BLASTZ_E=30
BLASTZ_M=254
# default BLASTZ_Q score matrix:
#       A     C     G     T
# A    91  -114   -31  -123
# C  -114   100  -125   -31
# G   -31  -125   100  -114
# T  -123   -31  -114    91

# TARGET: human grcH38P11
SEQ1_DIR=/hive/data/genomes/grcH38P11/grcH38P11.2bit
SEQ1_LEN=/hive/data/genomes/grcH38P11/chrom.sizes
SEQ1_CHUNK=40000000
SEQ1_LIMIT=30
SEQ1_LAP=10000

# QUERY: squirrel speTri2
SEQ2_DIR=/hive/data/genomes/speTri2/speTri2.2bit
SEQ2_LEN=/hive/data/genomes/speTri2/chrom.sizes
SEQ2_CHUNK=20000000
SEQ2_LIMIT=20
SEQ2_LAP=0

BASE=/hive/data/genomes/grcH38P11/bed/lastzSpeTri2.2015-04-28
TMPDIR=/dev/shm
_EOF_
    # << happy emacs

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl `pwd`/DEF -verbose=2 \
        -chainMinScore=3000 -chainLinearGap=medium \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > do.log 2>&1
    # real    1669m55.874s

    cat fb.grcH38P11.chainSpeTri2Link.txt
    # 1472314467 bases of 3049335806 (48.283%) in intersection
    # replacing the previous tuned version:
    # 1363949428 bases of 3049335806 (44.729%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -buildDir=`pwd` grcH38P11 speTri2) > rbest.log 2>&1 &
    # real    47m19.925s

    # and for the swap:
    mkdir /hive/data/genomes/speTri2/bed/blastz.grcH38P11.swap
    cd /hive/data/genomes/speTri2/bed/blastz.grcH38P11.swap

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl -verbose=2 \
      /hive/data/genomes/grcH38P11/bed/lastzSpeTri2.2015-04-28/DEF \
        -swap -chainMinScore=3000 -chainLinearGap=medium \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > swap.log 2>&1
    #  real    114m57.250s

    cat fb.speTri2.chainGrcH38P11Link.txt
    # 1429491323 bases of 2311060300 (61.854%) in intersection
    # replacing the previous tuned version:
    # 1323562747 bases of 2311060300 (57.271%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -buildDir=`pwd` speTri2 grcH38P11) > rbest.log 2>&1
    # real    46m47.951s

#########################################################################
# LASTZ human/grcH38P11 vs. Black flying fox/pteAle1 - (TODO - 2015-04-28 - Angie)
    mkdir /hive/data/genomes/grcH38P11/bed/lastzPteAle1.2015-04-28
    cd /hive/data/genomes/grcH38P11/bed/lastzPteAle1.2015-04-28

    cat << '_EOF_' > DEF
# human vs Black flying fox
BLASTZ=/cluster/bin/penn/lastz-distrib-1.03.66/bin/lastz
BLASTZ_O=400
BLASTZ_E=30
BLASTZ_M=254
# default BLASTZ_Q score matrix:
#       A     C     G     T
# A    91  -114   -31  -123
# C  -114   100  -125   -31
# G   -31  -125   100  -114
# T  -123   -31  -114    91

# TARGET: human grcH38P11
SEQ1_DIR=/hive/data/genomes/grcH38P11/grcH38P11.2bit
SEQ1_LEN=/hive/data/genomes/grcH38P11/chrom.sizes
SEQ1_CHUNK=40000000
SEQ1_LIMIT=30
SEQ1_LAP=10000

# QUERY: Black flying fox pteAle1
SEQ2_DIR=/hive/data/genomes/pteAle1/pteAle1.2bit
SEQ2_LEN=/hive/data/genomes/pteAle1/chrom.sizes
SEQ2_CHUNK=20000000
SEQ2_LIMIT=100
SEQ2_LAP=0

BASE=/hive/data/genomes/grcH38P11/bed/lastzPteAle1.2015-04-28
TMPDIR=/dev/shm
_EOF_
    # << happy emacs

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl `pwd`/DEF -verbose=2 \
        -chainMinScore=3000 -chainLinearGap=medium \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > do.log 2>&1
    # real    1615m3.913s

    cat fb.grcH38P11.chainPteAle1Link.txt
    # 1472264278 bases of 3049335806 (48.281%) in intersection
    # replacing the previous tuned version:
    # 1390855083 bases of 3049335806 (45.612%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -buildDir=`pwd` grcH38P11 pteAle1) > rbest.log 2>&1 &
    # real    102m6.597s

    # and for the swap:
    mkdir /hive/data/genomes/pteAle1/bed/blastz.grcH38P11.swap
    cd /hive/data/genomes/pteAle1/bed/blastz.grcH38P11.swap

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl -verbose=2 \
      /hive/data/genomes/grcH38P11/bed/lastzPteAle1.2015-04-28/DEF \
        -swap -chainMinScore=3000 -chainLinearGap=medium \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > swap.log 2>&1
    #  real    144m41.676s

    cat fb.pteAle1.chainGrcH38P11Link.txt
    # 1383942731 bases of 1944625202 (71.168%) in intersection
    # replacing the previous tuned version:
    # 1310659904 bases of 1944625202 (67.399%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -buildDir=`pwd` pteAle1 grcH38P11) > rbest.log 2>&1
    # real    51m1.756s

#########################################################################
# LASTZ human/grcH38P11 vs. pig/susScr3 - (TODO - 2015-04-28 - Angie)
    mkdir /hive/data/genomes/grcH38P11/bed/lastzSusScr3.2015-04-28
    cd /hive/data/genomes/grcH38P11/bed/lastzSusScr3.2015-04-28

    cat << '_EOF_' > DEF
# human vs pig
BLASTZ=/cluster/bin/penn/lastz-distrib-1.03.66/bin/lastz
BLASTZ_O=400
BLASTZ_E=30
BLASTZ_M=254
# default BLASTZ_Q score matrix:
#       A     C     G     T
# A    91  -114   -31  -123
# C  -114   100  -125   -31
# G   -31  -125   100  -114
# T  -123   -31  -114    91

# TARGET: human grcH38P11
SEQ1_DIR=/hive/data/genomes/grcH38P11/grcH38P11.2bit
SEQ1_LEN=/hive/data/genomes/grcH38P11/chrom.sizes
SEQ1_CHUNK=40000000
SEQ1_LIMIT=30
SEQ1_LAP=10000

# QUERY: pig susScr3
SEQ2_DIR=/hive/data/genomes/susScr3/susScr3.2bit
SEQ2_LEN=/hive/data/genomes/susScr3/chrom.sizes
SEQ2_CHUNK=20000000
SEQ2_LIMIT=30
SEQ2_LAP=0

BASE=/hive/data/genomes/grcH38P11/bed/lastzSusScr3.2015-04-28
TMPDIR=/dev/shm
_EOF_
    # << happy emacs

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl `pwd`/DEF -verbose=2 \
        -chainMinScore=3000 -chainLinearGap=medium \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > do.log 2>&1
    # real    1570m22.537s

    cat fb.grcH38P11.chainSusScr3Link.txt
    # 1362333591 bases of 3049335806 (44.676%) in intersection
    # replacing the previous tuned version:
    # 1260167798 bases of 3049335806 (41.326%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -buildDir=`pwd` grcH38P11 susScr3) > rbest.log 2>&1 &
    # real    49m20.123s

    # and for the swap:
    mkdir /hive/data/genomes/susScr3/bed/blastz.grcH38P11.swap
    cd /hive/data/genomes/susScr3/bed/blastz.grcH38P11.swap

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl -verbose=2 \
      /hive/data/genomes/grcH38P11/bed/lastzSusScr3.2015-04-28/DEF \
        -swap -chainMinScore=3000 -chainLinearGap=medium \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > swap.log 2>&1
    #  real    112m33.386s

    cat fb.susScr3.chainGrcH38P11Link.txt
    # 1446310692 bases of 2525294057 (57.273%) in intersection
    # replacing the previous tuned version:
    # 1338540526 bases of 2525294057 (53.005%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -buildDir=`pwd` susScr3 grcH38P11) > rbest.log 2>&1
    # real    47m22.984s

#########################################################################
# LASTZ human/grcH38P11 vs. elephant/loxAfr3 - (TODO - 2015-04-28 - Angie)
    mkdir /hive/data/genomes/grcH38P11/bed/lastzLoxAfr3.2015-04-28
    cd /hive/data/genomes/grcH38P11/bed/lastzLoxAfr3.2015-04-28

    cat << '_EOF_' > DEF
# human vs elephant
BLASTZ=/cluster/bin/penn/lastz-distrib-1.03.66/bin/lastz
BLASTZ_O=400
BLASTZ_E=30
BLASTZ_M=254
# default BLASTZ_Q score matrix:
#       A     C     G     T
# A    91  -114   -31  -123
# C  -114   100  -125   -31
# G   -31  -125   100  -114
# T  -123   -31  -114    91

# TARGET: human grcH38P11
SEQ1_DIR=/hive/data/genomes/grcH38P11/grcH38P11.2bit
SEQ1_LEN=/hive/data/genomes/grcH38P11/chrom.sizes
SEQ1_CHUNK=40000000
SEQ1_LIMIT=30
SEQ1_LAP=10000

# QUERY: elephant loxAfr3
SEQ2_DIR=/hive/data/genomes/loxAfr3/loxAfr3.2bit
SEQ2_LEN=/hive/data/genomes/loxAfr3/chrom.sizes
SEQ2_CHUNK=20000000
SEQ2_LIMIT=30
SEQ2_LAP=0

BASE=/hive/data/genomes/grcH38P11/bed/lastzLoxAfr3.2015-04-28
TMPDIR=/dev/shm
_EOF_
    # << happy emacs

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl `pwd`/DEF -verbose=2 \
        -chainMinScore=3000 -chainLinearGap=medium \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > do.log 2>&1
    # real    1717m57.837s


    cat fb.grcH38P11.chainLoxAfr3Link.txt
    # 1378739469 bases of 3049335806 (45.214%) in intersection
    # replacing the previous tuned version:
    # 1277792660 bases of 3049335806 (41.904%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -buildDir=`pwd` grcH38P11 loxAfr3) > rbest.log 2>&1 &
    # real    140m31.966s

    # and for the swap:
    mkdir /hive/data/genomes/loxAfr3/bed/blastz.grcH38P11.swap
    cd /hive/data/genomes/loxAfr3/bed/blastz.grcH38P11.swap

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl -verbose=2 \
      /hive/data/genomes/grcH38P11/bed/lastzLoxAfr3.2015-04-28/DEF \
        -swap -chainMinScore=3000 -chainLinearGap=medium \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > swap.log 2>&1
    #  real    121m44.548s

    cat fb.loxAfr3.chainGrcH38P11Link.txt
    # 1319251552 bases of 3118565340 (42.303%) in intersection
    # replacing the previous tuned version:
    # 1220708619 bases of 3118565340 (39.143%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -buildDir=`pwd` loxAfr3 grcH38P11) > rbest.log 2>&1
    # real    45m9.386s

#########################################################################
# LASTZ human/grcH38P11 vs. Naked mole rat/hetGla2 - (TODO - 2015-04-28 - Angie)
    mkdir /hive/data/genomes/grcH38P11/bed/lastzHetGla2.2015-04-28
    cd /hive/data/genomes/grcH38P11/bed/lastzHetGla2.2015-04-28

    cat << '_EOF_' > DEF
# human vs Naked mole rat
BLASTZ=/cluster/bin/penn/lastz-distrib-1.03.66/bin/lastz
BLASTZ_O=400
BLASTZ_E=30
BLASTZ_M=254
# default BLASTZ_Q score matrix:
#       A     C     G     T
# A    91  -114   -31  -123
# C  -114   100  -125   -31
# G   -31  -125   100  -114
# T  -123   -31  -114    91

# TARGET: human grcH38P11
SEQ1_DIR=/hive/data/genomes/grcH38P11/grcH38P11.2bit
SEQ1_LEN=/hive/data/genomes/grcH38P11/chrom.sizes
SEQ1_CHUNK=40000000
SEQ1_LIMIT=30
SEQ1_LAP=10000

# QUERY: Naked mole rat hetGla2
SEQ2_DIR=/hive/data/genomes/hetGla2/hetGla2.2bit
SEQ2_LEN=/hive/data/genomes/hetGla2/chrom.sizes
SEQ2_CHUNK=20000000
SEQ2_LIMIT=30
SEQ2_LAP=0

BASE=/hive/data/genomes/grcH38P11/bed/lastzHetGla2.2015-04-28
TMPDIR=/dev/shm
_EOF_
    # << happy emacs

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl `pwd`/DEF -verbose=2 \
        -chainMinScore=3000 -chainLinearGap=medium \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > do.log 2>&1
    # real    1681m38.688s

    cat fb.grcH38P11.chainHetGla2Link.txt
    # 1410266478 bases of 3049335806 (46.248%) in intersection
    # replacing the previous tuned version:
    # 1290312728 bases of 3049335806 (42.315%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -buildDir=`pwd` grcH38P11 hetGla2) > rbest.log 2>&1 &
    # real    137m40.853s

    # and for the swap:
    mkdir /hive/data/genomes/hetGla2/bed/blastz.grcH38P11.swap
    cd /hive/data/genomes/hetGla2/bed/blastz.grcH38P11.swap

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl -verbose=2 \
      /hive/data/genomes/grcH38P11/bed/lastzHetGla2.2015-04-28/DEF \
        -swap -chainMinScore=3000 -chainLinearGap=medium \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > swap.log 2>&1
    # real    114m42.322s

    cat fb.hetGla2.chainGrcH38P11Link.txt
    # 1362365778 bases of 2314771103 (58.855%) in intersection
    # replacing the previous tuned version:
    # 1251393586 bases of 2314771103 (54.061%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -buildDir=`pwd` hetGla2 grcH38P11) > rbest.log 2>&1
    # real    41m49.099s

#########################################################################
# LASTZ human/grcH38P11 vs. megabat/pteVam1 - (TODO - 2015-04-28 - Angie)
    mkdir /hive/data/genomes/grcH38P11/bed/lastzPteVam1.2015-04-28
    cd /hive/data/genomes/grcH38P11/bed/lastzPteVam1.2015-04-28

    cat << '_EOF_' > DEF
# human vs megabat
BLASTZ=/cluster/bin/penn/lastz-distrib-1.03.66/bin/lastz
BLASTZ_O=400
BLASTZ_E=30
BLASTZ_M=254
# default BLASTZ_Q score matrix:
#       A     C     G     T
# A    91  -114   -31  -123
# C  -114   100  -125   -31
# G   -31  -125   100  -114
# T  -123   -31  -114    91

# TARGET: human grcH38P11
SEQ1_DIR=/hive/data/genomes/grcH38P11/grcH38P11.2bit
SEQ1_LEN=/hive/data/genomes/grcH38P11/chrom.sizes
SEQ1_CHUNK=40000000
SEQ1_LIMIT=30
SEQ1_LAP=10000

# QUERY: megabat pteVam1
SEQ2_DIR=/hive/data/genomes/pteVam1/pteVam1.2bit
SEQ2_LEN=/hive/data/genomes/pteVam1/chrom.sizes
SEQ2_CHUNK=20000000
SEQ2_LIMIT=120
SEQ2_LAP=0

BASE=/hive/data/genomes/grcH38P11/bed/lastzPteVam1.2015-04-28
TMPDIR=/dev/shm
_EOF_
    # << happy emacs

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl `pwd`/DEF -verbose=2 \
        -chainMinScore=3000 -chainLinearGap=medium \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > do.log 2>&1
    # real    1499m5.523s

    cat fb.grcH38P11.chainPteVam1Link.txt
    # 1339387555 bases of 3049335806 (43.924%) in intersection
    # replacing the previous tuned version:
    # 1250608381 bases of 3049335806 (41.012%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -buildDir=`pwd` grcH38P11 pteVam1) > rbest.log 2>&1 &
    # real    33m53.542s

    # and for the swap:
    mkdir /hive/data/genomes/pteVam1/bed/blastz.grcH38P11.swap
    cd /hive/data/genomes/pteVam1/bed/blastz.grcH38P11.swap

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl -verbose=2 \
      /hive/data/genomes/grcH38P11/bed/lastzPteVam1.2015-04-28/DEF \
        -swap -chainMinScore=3000 -chainLinearGap=medium \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > swap.log 2>&1
    #  real    135m10.167s

    cat fb.pteVam1.chainGrcH38P11Link.txt
    # 1279228346 bases of 1839436660 (69.545%) in intersection
    # replacing the previous tuned version:
    # 1198492243 bases of 1839436660 (65.155%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -buildDir=`pwd` pteVam1 grcH38P11) > rbest.log 2>&1
    # real    152m29.972s

#########################################################################
# LASTZ human/grcH38P11 vs. cat/felCat8 - (TODO - 2015-04-28 - Angie)
    mkdir /hive/data/genomes/grcH38P11/bed/lastzFelCat8.2015-04-28
    cd /hive/data/genomes/grcH38P11/bed/lastzFelCat8.2015-04-28

    cat << '_EOF_' > DEF
# human vs cat
BLASTZ=/cluster/bin/penn/lastz-distrib-1.03.66/bin/lastz
BLASTZ_O=400
BLASTZ_E=30
BLASTZ_M=254
# default BLASTZ_Q score matrix:
#       A     C     G     T
# A    91  -114   -31  -123
# C  -114   100  -125   -31
# G   -31  -125   100  -114
# T  -123   -31  -114    91

# TARGET: human grcH38P11
SEQ1_DIR=/hive/data/genomes/grcH38P11/grcH38P11.2bit
SEQ1_LEN=/hive/data/genomes/grcH38P11/chrom.sizes
SEQ1_CHUNK=40000000
SEQ1_LIMIT=30
SEQ1_LAP=10000

# QUERY: cat felCat8
SEQ2_DIR=/hive/data/genomes/felCat8/felCat8.2bit
SEQ2_LEN=/hive/data/genomes/felCat8/chrom.sizes
SEQ2_CHUNK=20000000
SEQ2_LIMIT=400
SEQ2_LAP=0

BASE=/hive/data/genomes/grcH38P11/bed/lastzFelCat8.2015-04-28
TMPDIR=/dev/shm
_EOF_
    # << happy emacs

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl `pwd`/DEF -verbose=2 \
        -chainMinScore=3000 -chainLinearGap=medium \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > do.log 2>&1
    # real    2218m28.035s

    cat fb.grcH38P11.chainFelCat8Link.txt
    # 1576029345 bases of 3049335806 (51.684%) in intersection
    # replacing the previous tuned version:
    # 1454517955 bases of 3049335806 (47.700%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -buildDir=`pwd` grcH38P11 felCat8) > rbest.log 2>&1 &
    # real    57m53.174s

    # and for the swap:
    mkdir /hive/data/genomes/felCat8/bed/blastz.grcH38P11.swap
    cd /hive/data/genomes/felCat8/bed/blastz.grcH38P11.swap

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl -verbose=2 \
      /hive/data/genomes/grcH38P11/bed/lastzFelCat8.2015-04-28/DEF \
        -swap -chainMinScore=3000 -chainLinearGap=medium \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > swap.log 2>&1
    #  real    300m16.338s

    cat fb.felCat8.chainGrcH38P11Link.txt
    # 1527336267 bases of 2599716822 (58.750%) in intersection
    # replacing the previous tuned version:
    # 1408124069 bases of 2599716822 (54.165%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -workhorse=hgwdev -buildDir=`pwd` felCat8 grcH38P11) \
       > rbest.log 2>&1
    # real    113m7.878s
    # finished broken recipBest run:
    # real    148m36.100s

#########################################################################
# LASTZ human/grcH38P11 vs. panda/ailMel1 - (TODO - 2015-02-11 - Angie)
    mkdir /hive/data/genomes/grcH38P11/bed/lastzAilMel1.2015-02-11
    cd /hive/data/genomes/grcH38P11/bed/lastzAilMel1.2015-02-11

# parameters obtained from a tuning run of lastz_D
# /hive/users/hiram/multiz/100way/hg38.ailMel1/hg38.ailMel1.tuning.top400.txt
    cp -p /hive/users/hiram/multiz/100way/hg38.ailMel1/hg38.ailMel1.tuning.top400.txt \
         ./hg38.ailMel1.tuning.Q.txt

    cat << '_EOF_' > DEF
# human vs panda
BLASTZ=/cluster/bin/penn/lastz-distrib-1.03.54/bin/lastz
BLASTZ_O=400
BLASTZ_E=30
BLASTZ_X=740
BLASTZ_Y=3400
BLASTZ_M=50
BLASTZ_Q=/hive/data/genomes/grcH38P11/bed/lastzAilMel1.2015-02-11/hg38.ailMel1.tuning.Q.txt
#       A     C     G     T
# A    74  -117   -23  -133
# C  -117   100  -112   -23
# G   -23  -112   100  -117
# T  -133   -23  -117    74

# TARGET: human grcH38P11
SEQ1_DIR=/hive/data/genomes/grcH38P11/grcH38P11.2bit
SEQ1_LEN=/hive/data/genomes/grcH38P11/chrom.sizes
SEQ1_CHUNK=40000000
SEQ1_LIMIT=30
SEQ1_LAP=10000

# QUERY: panda ailMel1
SEQ2_DIR=/hive/data/genomes/ailMel1/ailMel1.2bit
SEQ2_LEN=/hive/data/genomes/ailMel1/chrom.sizes
SEQ2_CHUNK=20000000
SEQ2_LIMIT=130
SEQ2_LAP=0

BASE=/hive/data/genomes/grcH38P11/bed/lastzAilMel1.2015-02-11
TMPDIR=/dev/shm
_EOF_
    # << happy emacs

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl `pwd`/DEF -verbose=2 \
        -chainMinScore=3000 -chainLinearGap=medium \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > do.log 2>&1
    # real    830m30.518s

    cat fb.grcH38P11.chainAilMel1Link.txt
    # 1470587412 bases of 3049335806 (48.226%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -buildDir=`pwd` grcH38P11 ailMel1) > rbest.log 2>&1 &
    # real    34m53.243s

    # and for the swap:
    mkdir /hive/data/genomes/ailMel1/bed/blastz.grcH38P11.swap
    cd /hive/data/genomes/ailMel1/bed/blastz.grcH38P11.swap

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl -verbose=2 \
      /hive/data/genomes/grcH38P11/bed/lastzAilMel1.2015-02-11/DEF \
        -swap -chainMinScore=3000 -chainLinearGap=medium \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > swap.log 2>&1
    #  real    88m43.119s

    cat fb.ailMel1.chainGrcH38P11Link.txt
    # 1384233285 bases of 2245312831 (61.650%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -buildDir=`pwd` ailMel1 grcH38P11) > rbest.log 2>&1
    # real    41m48.012s

#########################################################################
# LASTZ human/grcH38P11 vs. ferret/musFur1 - (TODO - 2015-04-28 - Angie)
    mkdir /hive/data/genomes/grcH38P11/bed/lastzMusFur1.2015-04-28
    cd /hive/data/genomes/grcH38P11/bed/lastzMusFur1.2015-04-28

    cat << '_EOF_' > DEF
# human vs ferret
BLASTZ=/cluster/bin/penn/lastz-distrib-1.03.66/bin/lastz
BLASTZ_O=400
BLASTZ_E=30
BLASTZ_M=254
# default BLASTZ_Q score matrix:
#       A     C     G     T
# A    91  -114   -31  -123
# C  -114   100  -125   -31
# G   -31  -125   100  -114
# T  -123   -31  -114    91

# TARGET: human grcH38P11
SEQ1_DIR=/hive/data/genomes/grcH38P11/grcH38P11.2bit
SEQ1_LEN=/hive/data/genomes/grcH38P11/chrom.sizes
SEQ1_CHUNK=40000000
SEQ1_LIMIT=30
SEQ1_LAP=10000

# QUERY: ferret musFur1
SEQ2_DIR=/hive/data/genomes/musFur1/musFur1.2bit
SEQ2_LEN=/hive/data/genomes/musFur1/chrom.sizes
SEQ2_CHUNK=20000000
SEQ2_LIMIT=30
SEQ2_LAP=0

BASE=/hive/data/genomes/grcH38P11/bed/lastzMusFur1.2015-04-28
TMPDIR=/dev/shm
_EOF_
    # << happy emacs

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl `pwd`/DEF -verbose=2 \
        -chainMinScore=3000 -chainLinearGap=medium \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > do.log 2>&1
    # real    405m30.959s

    cat fb.grcH38P11.chainMusFur1Link.txt
    # 1513410953 bases of 3049335806 (49.631%) in intersection
    # replacing the previous tuned version:
    # 1396051514 bases of 3049335806 (45.782%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -buildDir=`pwd` grcH38P11 musFur1) > rbest.log 2>&1 &
    # real    86m22.214s

    # and for the swap:
    mkdir /hive/data/genomes/musFur1/bed/blastz.grcH38P11.swap
    cd /hive/data/genomes/musFur1/bed/blastz.grcH38P11.swap

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl -verbose=2 \
      /hive/data/genomes/grcH38P11/bed/lastzMusFur1.2015-04-28/DEF \
        -swap -chainMinScore=3000 -chainLinearGap=medium \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > swap.log 2>&1
    #  real    103m55.044s

    cat fb.musFur1.chainGrcH38P11Link.txt
    # 1421314098 bases of 2277906570 (62.396%) in intersection
    # replacing the previous tuned version:
    # 1313363964 bases of 2277906570 (57.657%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -buildDir=`pwd` musFur1 grcH38P11) > rbest.log 2>&1
    # real    40m15.023s

#########################################################################
# LASTZ human/grcH38P11 vs. guinea pig/cavPor3 - (TODO - 2015-04-27 - Angie)
    mkdir /hive/data/genomes/grcH38P11/bed/lastzCavPor3.2015-04-27
    cd /hive/data/genomes/grcH38P11/bed/lastzCavPor3.2015-04-27

    cat << '_EOF_' > DEF
# human vs guinea pig
BLASTZ=/cluster/bin/penn/lastz-distrib-1.03.66/bin/lastz
BLASTZ_O=400
BLASTZ_E=30
BLASTZ_M=254
# default BLASTZ_Q score matrix:
#       A     C     G     T
# A    91  -114   -31  -123
# C  -114   100  -125   -31
# G   -31  -125   100  -114
# T  -123   -31  -114    91

# TARGET: human grcH38P11
SEQ1_DIR=/hive/data/genomes/grcH38P11/grcH38P11.2bit
SEQ1_LEN=/hive/data/genomes/grcH38P11/chrom.sizes
SEQ1_CHUNK=40000000
SEQ1_LIMIT=30
SEQ1_LAP=10000

# QUERY: guinea pig cavPor3
SEQ2_DIR=/hive/data/genomes/cavPor3/cavPor3.2bit
SEQ2_LEN=/hive/data/genomes/cavPor3/chrom.sizes
SEQ2_CHUNK=20000000
SEQ2_LIMIT=20
SEQ2_LAP=0

BASE=/hive/data/genomes/grcH38P11/bed/lastzCavPor3.2015-04-27
TMPDIR=/dev/shm
_EOF_
    # << happy emacs

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl `pwd`/DEF -verbose=2 \
        -chainMinScore=3000 -chainLinearGap=medium \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > do.log 2>&1
    # real    1456m13.633s

    cat fb.grcH38P11.chainCavPor3Link.txt
    # 1292035815 bases of 3049335806 (42.371%) in intersection
    # replacing the previous tuned version:
    # 1155740911 bases of 3049335806 (37.901%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -buildDir=`pwd` grcH38P11 cavPor3) > rbest.log 2>&1 &
    # real    40m47.501s

    # and for the swap:
    mkdir /hive/data/genomes/cavPor3/bed/blastz.grcH38P11.swap
    cd /hive/data/genomes/cavPor3/bed/blastz.grcH38P11.swap

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl -verbose=2 \
      /hive/data/genomes/grcH38P11/bed/lastzCavPor3.2015-04-27/DEF \
        -swap -chainMinScore=3000 -chainLinearGap=medium \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > swap.log 2>&1
    #  real    147m52.206s

    cat fb.cavPor3.chainGrcH38P11Link.txt
    # 1278427131 bases of 2663369733 (48.000%) in intersection
    # replacing the previous tuned version:
    # 1142636457 bases of 2663369733 (42.902%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -buildDir=`pwd` cavPor3 grcH38P11) > rbest.log 2>&1
    # real    132m10.182s

#########################################################################
# LASTZ human/grcH38P11 vs. armadillo/dasNov3 - (TODO - 2015-04-28 - Angie)
    mkdir /hive/data/genomes/grcH38P11/bed/lastzDasNov3.2015-04-28
    cd /hive/data/genomes/grcH38P11/bed/lastzDasNov3.2015-04-28

    cat << '_EOF_' > DEF
# human vs armadillo
BLASTZ=/cluster/bin/penn/lastz-distrib-1.03.66/bin/lastz
BLASTZ_O=400
BLASTZ_E=30
BLASTZ_M=254
# default BLASTZ_Q score matrix:
#       A     C     G     T
# A    91  -114   -31  -123
# C  -114   100  -125   -31
# G   -31  -125   100  -114
# T  -123   -31  -114    91

# TARGET: human grcH38P11
SEQ1_DIR=/hive/data/genomes/grcH38P11/grcH38P11.2bit
SEQ1_LEN=/hive/data/genomes/grcH38P11/chrom.sizes
SEQ1_CHUNK=40000000
SEQ1_LIMIT=30
SEQ1_LAP=10000

# QUERY: armadillo dasNov3
SEQ2_DIR=/hive/data/genomes/dasNov3/dasNov3.2bit
SEQ2_LEN=/hive/data/genomes/dasNov3/chrom.sizes
SEQ2_CHUNK=20000000
SEQ2_LIMIT=80
SEQ2_LAP=0

BASE=/hive/data/genomes/grcH38P11/bed/lastzDasNov3.2015-04-28
TMPDIR=/dev/shm
_EOF_
    # << happy emacs

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl `pwd`/DEF -verbose=2 \
        -chainMinScore=3000 -chainLinearGap=medium \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > do.log 2>&1
    # real    1719m25.419s

    cat fb.grcH38P11.chainDasNov3Link.txt
    # 1382853067 bases of 3049335806 (45.349%) in intersection
    # replacing the previous tuned version:
    # 1287831558 bases of 3049335806 (42.233%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -buildDir=`pwd` grcH38P11 dasNov3) > rbest.log 2>&1 &
    # real    491m51.020s

    # load up the recip best chainNet tables
    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -load -continue=load -workhorse=hgwdev \
	-buildDir=`pwd` grcH38P11 dasNov3) > loadRBest.log 2>&1 &
    # real    12m39.283s

    cat fb.grcH38P11.chainRBestDasNov3Link.txt
    # 1267819323 bases of 3049335806 (41.577%) in intersection

    # create and load up the syntenic chainNet tables 2017-10-30
cd /hive/data/genomes/grcH38P11/bed/lastzDasNov3.2015-04-28/axtChain
netToAxt grcH38P11.dasNov3.syn.net.gz grcH38P11.dasNov3.all.chain.gz \
/scratch/data/grcH38P11/grcH38P11.2bit /hive/data/genomes/dasNov3/dasNov3.2bit stdout \
  | axtSort stdin stdout \
     | axtToChain stdin /hive/data/genomes/grcH38P11/chrom.sizes \
        /hive/data/genomes/dasNov3/chrom.sizes stdout \
            | gzip -c > grcH38P11.dasNov3.syn.chain.gz
hgLoadChain -tIndex grcH38P11 chainSynDasNov3 grcH38P11.dasNov3.syn.chain.gz
netFilter -minGap=10 grcH38P11.dasNov3.syn.net.gz \
  | hgLoadNet -verbose=0 grcH38P11 netSynDasNov3 stdin
cd /hive/data/genomes/grcH38P11/bed/lastzDasNov3.2015-04-28
featureBits grcH38P11 chainSynDasNov3Link > fb.grcH38P11.chainSynDasNov3Link.txt 2>&1
cat fb.grcH38P11.chainSynDasNov3Link.txt
# 1302517110 bases of 3049335806 (42.715%) in intersection


    # and for the swap:
    mkdir /hive/data/genomes/dasNov3/bed/blastz.grcH38P11.swap
    cd /hive/data/genomes/dasNov3/bed/blastz.grcH38P11.swap

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl -verbose=2 \
      /hive/data/genomes/grcH38P11/bed/lastzDasNov3.2015-04-28/DEF \
        -swap -chainMinScore=3000 -chainLinearGap=medium \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > swap.log 2>&1
    # real    139m24.821s

    cat fb.dasNov3.chainGrcH38P11Link.txt
    # 1382479617 bases of 3299882059 (41.895%) in intersection
    # replacing the previous tuned version:
    # 1284164290 bases of 3299882059 (38.915%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -buildDir=`pwd` dasNov3 grcH38P11) > rbest.log 2>&1
    # real    78m34.471s

#########################################################################
# LASTZ human/grcH38P11 vs. rabbit/oryCun2 - (TODO - 2015-04-27 - Angie)
    mkdir /hive/data/genomes/grcH38P11/bed/lastzOryCun2.2015-04-27
    cd /hive/data/genomes/grcH38P11/bed/lastzOryCun2.2015-04-27

    cat << '_EOF_' > DEF
# human vs rabbit
BLASTZ=/cluster/bin/penn/lastz-distrib-1.03.66/bin/lastz
BLASTZ_O=400
BLASTZ_E=30
BLASTZ_M=254
# default BLASTZ_Q score matrix:
#       A     C     G     T
# A    91  -114   -31  -123
# C  -114   100  -125   -31
# G   -31  -125   100  -114
# T  -123   -31  -114    91

# TARGET: human grcH38P11
SEQ1_DIR=/hive/data/genomes/grcH38P11/grcH38P11.2bit
SEQ1_LEN=/hive/data/genomes/grcH38P11/chrom.sizes
SEQ1_CHUNK=40000000
SEQ1_LIMIT=30
SEQ1_LAP=10000

# QUERY: rabbit oryCun2
SEQ2_DIR=/hive/data/genomes/oryCun2/oryCun2.2bit
SEQ2_LEN=/hive/data/genomes/oryCun2/chrom.sizes
SEQ2_CHUNK=20000000
SEQ2_LIMIT=10
SEQ2_LAP=0

BASE=/hive/data/genomes/grcH38P11/bed/lastzOryCun2.2015-04-27
TMPDIR=/dev/shm
_EOF_
    # << happy emacs

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl `pwd`/DEF -verbose=2 \
        -chainMinScore=3000 -chainLinearGap=medium \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > do.log 2>&1
    # real    1143m17.631s

    cat fb.grcH38P11.chainOryCun2Link.txt
    # 1308502981 bases of 3049335806 (42.911%) in intersection
    # replacing the previous tuned version:
    # 1177978746 bases of 3049335806 (38.631%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -buildDir=`pwd` grcH38P11 oryCun2) > rbest.log 2>&1 &
    # real    39m0.464s

    # and for the swap:
    mkdir /hive/data/genomes/oryCun2/bed/blastz.grcH38P11.swap
    cd /hive/data/genomes/oryCun2/bed/blastz.grcH38P11.swap

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl -verbose=2 \
      /hive/data/genomes/grcH38P11/bed/lastzOryCun2.2015-04-27/DEF \
        -swap -chainMinScore=3000 -chainLinearGap=medium \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > swap.log 2>&1
    #  real    107m40.781s

    cat fb.oryCun2.chainGrcH38P11Link.txt
    # 1259317035 bases of 2604023284 (48.360%) in intersection
    # replacing the previous tuned version:
    # 1136478377 bases of 2604023284 (43.643%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -buildDir=`pwd` oryCun2 grcH38P11) > rbest.log 2>&1
    # real    74m17.119s

#########################################################################
# LASTZ human/grcH38P11 vs. Tibetan antelope/panHod1 - (TODO - 2015-04-27 - Angie)
    mkdir /hive/data/genomes/grcH38P11/bed/lastzPanHod1.2015-04-27
    cd /hive/data/genomes/grcH38P11/bed/lastzPanHod1.2015-04-27

    cat << '_EOF_' > DEF
# human vs Tibetan antelope
BLASTZ=/cluster/bin/penn/lastz-distrib-1.03.66/bin/lastz
BLASTZ_O=400
BLASTZ_E=30
BLASTZ_M=254
# default BLASTZ_Q score matrix:
#       A     C     G     T
# A    91  -114   -31  -123
# C  -114   100  -125   -31
# G   -31  -125   100  -114
# T  -123   -31  -114    91

# TARGET: human grcH38P11
SEQ1_DIR=/hive/data/genomes/grcH38P11/grcH38P11.2bit
SEQ1_LEN=/hive/data/genomes/grcH38P11/chrom.sizes
SEQ1_CHUNK=40000000
SEQ1_LIMIT=30
SEQ1_LAP=10000

# QUERY: Tibetan antelope panHod1
SEQ2_DIR=/hive/data/genomes/panHod1/panHod1.2bit
SEQ2_LEN=/hive/data/genomes/panHod1/chrom.sizes
SEQ2_CHUNK=20000000
SEQ2_LIMIT=30
SEQ2_LAP=0

BASE=/hive/data/genomes/grcH38P11/bed/lastzPanHod1.2015-04-27
TMPDIR=/dev/shm
_EOF_
    # << happy emacs

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl `pwd`/DEF -verbose=2 \
        -chainMinScore=3000 -chainLinearGap=medium \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > do.log 2>&1
    # real    1194m17.831s

    cat fb.grcH38P11.chainPanHod1Link.txt
    # 1391091506 bases of 3049335806 (45.619%) in intersection
    # replacing the previous tuned version:
    # 1261119369 bases of 3049335806 (41.357%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -buildDir=`pwd` grcH38P11 panHod1) > rbest.log 2>&1 &
    # real    84m43.209s

    # and for the swap:
    mkdir /hive/data/genomes/panHod1/bed/blastz.grcH38P11.swap
    cd /hive/data/genomes/panHod1/bed/blastz.grcH38P11.swap

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl -verbose=2 \
      /hive/data/genomes/grcH38P11/bed/lastzPanHod1.2015-04-27/DEF \
        -swap -chainMinScore=3000 -chainLinearGap=medium \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > swap.log 2>&1
    #  real    112m26.689s

    cat fb.panHod1.chainGrcH38P11Link.txt
    # 1317338279 bases of 2507986438 (52.526%) in intersection
    # replacing the previous tuned version:
    # 1196606934 bases of 2507986438 (47.712%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -buildDir=`pwd` panHod1 grcH38P11) > rbest.log 2>&1
    # real    441m32.946s finished manually real    53m30.864s
    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -workhorse=hgwdev -continue=download \
      -buildDir=`pwd` panHod1 grcH38P11) > rbestDownload.log 2>&1
    # real    0m4.397s

#########################################################################
# LASTZ human/grcH38P11 vs. Weddell seal/lepWed1 - (TODO - 2015-04-28 - Angie)
    mkdir /hive/data/genomes/grcH38P11/bed/lastzLepWed1.2015-04-28
    cd /hive/data/genomes/grcH38P11/bed/lastzLepWed1.2015-04-28

    cat << '_EOF_' > DEF
# human vs Weddell seal
BLASTZ=/cluster/bin/penn/lastz-distrib-1.03.66/bin/lastz
BLASTZ_O=400
BLASTZ_E=30
BLASTZ_M=254
# default BLASTZ_Q score matrix:
#       A     C     G     T
# A    91  -114   -31  -123
# C  -114   100  -125   -31
# G   -31  -125   100  -114
# T  -123   -31  -114    91

# TARGET: human grcH38P11
SEQ1_DIR=/hive/data/genomes/grcH38P11/grcH38P11.2bit
SEQ1_LEN=/hive/data/genomes/grcH38P11/chrom.sizes
SEQ1_CHUNK=40000000
SEQ1_LIMIT=30
SEQ1_LAP=10000

# QUERY: Weddell seal lepWed1
SEQ2_DIR=/hive/data/genomes/lepWed1/lepWed1.2bit
SEQ2_LEN=/hive/data/genomes/lepWed1/chrom.sizes
SEQ2_CHUNK=20000000
SEQ2_LIMIT=30
SEQ2_LAP=0

BASE=/hive/data/genomes/grcH38P11/bed/lastzLepWed1.2015-04-28
TMPDIR=/dev/shm
_EOF_
    # << happy emacs

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl `pwd`/DEF -verbose=2 \
        -chainMinScore=3000 -chainLinearGap=medium \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > do.log 2>&1
    # real    1527m39.249s

    cat fb.grcH38P11.chainLepWed1Link.txt
    # 1557394982 bases of 3049335806 (51.073%) in intersection
    # replacing the previous tuned version:
    # 1446510291 bases of 3049335806 (47.437%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -buildDir=`pwd` grcH38P11 lepWed1) > rbest.log 2>&1 &
    # real    70m0.849s

    # and for the swap:
    mkdir /hive/data/genomes/lepWed1/bed/blastz.grcH38P11.swap
    cd /hive/data/genomes/lepWed1/bed/blastz.grcH38P11.swap

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl -verbose=2 \
      /hive/data/genomes/grcH38P11/bed/lastzLepWed1.2015-04-28/DEF \
        -swap -chainMinScore=3000 -chainLinearGap=medium \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > swap.log 2>&1
    #  real    112m55.510s

    cat fb.lepWed1.chainGrcH38P11Link.txt
    # 1459320253 bases of 2223164129 (65.642%) in intersection
    # replacing the previous tuned version:
    # 1358644851 bases of 2223164129 (61.113%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -buildDir=`pwd` lepWed1 grcH38P11) > rbest.log 2>&1
    # real    83m25.807s

#########################################################################
# LASTZ human/grcH38P11 vs. Pacific walrus/odoRosDiv1 - (TODO - 2015-04-28 - Angie)
    mkdir /hive/data/genomes/grcH38P11/bed/lastzOdoRosDiv1.2015-04-28
    cd /hive/data/genomes/grcH38P11/bed/lastzOdoRosDiv1.2015-04-28

    cat << '_EOF_' > DEF
# human vs Pacific walrus
BLASTZ=/cluster/bin/penn/lastz-distrib-1.03.66/bin/lastz
BLASTZ_O=400
BLASTZ_E=30
BLASTZ_M=254
# default BLASTZ_Q score matrix:
#       A     C     G     T
# A    91  -114   -31  -123
# C  -114   100  -125   -31
# G   -31  -125   100  -114
# T  -123   -31  -114    91

# TARGET: human grcH38P11
SEQ1_DIR=/hive/data/genomes/grcH38P11/grcH38P11.2bit
SEQ1_LEN=/hive/data/genomes/grcH38P11/chrom.sizes
SEQ1_CHUNK=40000000
SEQ1_LIMIT=30
SEQ1_LAP=10000

# QUERY: Pacific walrus odoRosDiv1
SEQ2_DIR=/hive/data/genomes/odoRosDiv1/odoRosDiv1.2bit
SEQ2_LEN=/hive/data/genomes/odoRosDiv1/chrom.sizes
SEQ2_CHUNK=20000000
SEQ2_LIMIT=10
SEQ2_LAP=0

BASE=/hive/data/genomes/grcH38P11/bed/lastzOdoRosDiv1.2015-04-28
TMPDIR=/dev/shm
_EOF_
    # << happy emacs

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl `pwd`/DEF -verbose=2 \
        -chainMinScore=3000 -chainLinearGap=medium \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -noDbNameCheck -syntenicNet) > do.log 2>&1
    # real    1559m56.509s

    cat fb.grcH38P11.chainOdoRosDiv1Link.txt
    # 1591525110 bases of 3049335806 (52.193%) in intersection
    # replacing the previous tuned version:
    # 1463226456 bases of 3049335806 (47.985%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -buildDir=`pwd` grcH38P11 odoRosDiv1) > rbest.log 2>&1 &
    # real    68m19.885s

    # and for the swap:
    mkdir /hive/data/genomes/odoRosDiv1/bed/blastz.grcH38P11.swap
    cd /hive/data/genomes/odoRosDiv1/bed/blastz.grcH38P11.swap

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl -verbose=2 \
      /hive/data/genomes/grcH38P11/bed/lastzOdoRosDiv1.2015-04-28/DEF \
        -swap -chainMinScore=3000 -chainLinearGap=medium \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -noDbNameCheck -syntenicNet) > swap.log 2>&1
    #  real    116m42.765s

    cat fb.odoRosDiv1.chainGrcH38P11Link.txt
    # 1492793949 bases of 2300235512 (64.897%) in intersection
    # replacing the previous tuned version:
    # 1376881973 bases of 2300235512 (59.858%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -buildDir=`pwd` odoRosDiv1 grcH38P11) > rbest.log 2>&1
    # real    129m15.182s

#########################################################################
# LASTZ human/grcH38P11 vs. David's myotis bat/myoDav1 - (TODO - 2015-04-27 - Angie)
    mkdir /hive/data/genomes/grcH38P11/bed/lastzMyoDav1.2015-04-27
    cd /hive/data/genomes/grcH38P11/bed/lastzMyoDav1.2015-04-27

    cat << '_EOF_' > DEF
# human vs David's myotis bat
BLASTZ=/cluster/bin/penn/lastz-distrib-1.03.66/bin/lastz
BLASTZ_O=400
BLASTZ_E=30
BLASTZ_M=254
# default BLASTZ_Q score matrix:
#       A     C     G     T
# A    91  -114   -31  -123
# C  -114   100  -125   -31
# G   -31  -125   100  -114
# T  -123   -31  -114    91

# TARGET: human grcH38P11
SEQ1_DIR=/hive/data/genomes/grcH38P11/grcH38P11.2bit
SEQ1_LEN=/hive/data/genomes/grcH38P11/chrom.sizes
SEQ1_CHUNK=40000000
SEQ1_LIMIT=30
SEQ1_LAP=10000

# QUERY: David's myotis bat myoDav1
SEQ2_DIR=/hive/data/genomes/myoDav1/myoDav1.2bit
SEQ2_LEN=/hive/data/genomes/myoDav1/chrom.sizes
SEQ2_CHUNK=20000000
SEQ2_LIMIT=150
SEQ2_LAP=0

BASE=/hive/data/genomes/grcH38P11/bed/lastzMyoDav1.2015-04-27
TMPDIR=/dev/shm
_EOF_
    # << happy emacs

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl `pwd`/DEF -verbose=2 \
        -chainMinScore=3000 -chainLinearGap=medium \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > do.log 2>&1
    # real    1191m1.115s

    cat fb.grcH38P11.chainMyoDav1Link.txt
    # 1180503256 bases of 3049335806 (38.713%) in intersection
    # replacing the previous tuned version:
    # 1063972348 bases of 3049335806 (34.892%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -buildDir=`pwd` grcH38P11 myoDav1) > rbest.log 2>&1 &
    # real    38m14.019s

    # and for the swap:
    mkdir /hive/data/genomes/myoDav1/bed/blastz.grcH38P11.swap
    cd /hive/data/genomes/myoDav1/bed/blastz.grcH38P11.swap

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl -verbose=2 \
      /hive/data/genomes/grcH38P11/bed/lastzMyoDav1.2015-04-27/DEF \
        -swap -chainMinScore=3000 -chainLinearGap=medium \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > swap.log 2>&1
    #  real    122m57.687s

    cat fb.myoDav1.chainGrcH38P11Link.txt
    # 1132451816 bases of 1878461987 (60.286%) in intersection
    # replacing the previous tuned version:
    # 1025255929 bases of 1878461987 (54.580%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -buildDir=`pwd` myoDav1 grcH38P11) > rbest.log 2>&1
    # real    77m7.749s

#########################################################################
# LASTZ human/grcH38P11 vs. goat/capHir1 - (TODO - 2015-04-27 - Angie)
    mkdir /hive/data/genomes/grcH38P11/bed/lastzCapHir1.2015-04-27
    cd /hive/data/genomes/grcH38P11/bed/lastzCapHir1.2015-04-27

    cat << '_EOF_' > DEF
# human vs goat
BLASTZ=/cluster/bin/penn/lastz-distrib-1.03.66/bin/lastz
BLASTZ_O=400
BLASTZ_E=30
BLASTZ_M=254
# default BLASTZ_Q score matrix:
#       A     C     G     T
# A    91  -114   -31  -123
# C  -114   100  -125   -31
# G   -31  -125   100  -114
# T  -123   -31  -114    91

# TARGET: human grcH38P11
SEQ1_DIR=/hive/data/genomes/grcH38P11/grcH38P11.2bit
SEQ1_LEN=/hive/data/genomes/grcH38P11/chrom.sizes
SEQ1_CHUNK=40000000
SEQ1_LIMIT=30
SEQ1_LAP=10000

# QUERY: goat capHir1
SEQ2_DIR=/hive/data/genomes/capHir1/capHir1.2bit
SEQ2_LEN=/hive/data/genomes/capHir1/chrom.sizes
SEQ2_CHUNK=20000000
SEQ2_LIMIT=130
SEQ2_LAP=0

BASE=/hive/data/genomes/grcH38P11/bed/lastzCapHir1.2015-04-27
TMPDIR=/dev/shm
_EOF_
    # << happy emacs

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl `pwd`/DEF -verbose=2 \
        -chainMinScore=3000 -chainLinearGap=medium \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > do.log 2>&1
    # real    1473m2.628s

    cat fb.grcH38P11.chainCapHir1Link.txt
    # 1380028096 bases of 3049335806 (45.257%) in intersection
    # replacing the previous tuned version:
    # 1259921542 bases of 3049335806 (41.318%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -buildDir=`pwd` grcH38P11 capHir1) > rbest.log 2>&1 &
    # real    84m49.153s

    # and for the swap:
    mkdir /hive/data/genomes/capHir1/bed/blastz.grcH38P11.swap
    cd /hive/data/genomes/capHir1/bed/blastz.grcH38P11.swap

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl -verbose=2 \
      /hive/data/genomes/grcH38P11/bed/lastzCapHir1.2015-04-27/DEF \
        -swap -chainMinScore=3000 -chainLinearGap=medium \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > swap.log 2>&1
    #  real    128m13.474s

    cat fb.capHir1.chainGrcH38P11Link.txt
    # 1314558467 bases of 2495939845 (52.668%) in intersection
    # replacing the previous tuned version:
    # 1201106945 bases of 2495939845 (48.122%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -buildDir=`pwd` capHir1 grcH38P11) > rbest.log 2>&1
    # real    432m43.547s finished manually real    65m19.641s
    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -workhorse=hgwdev -continue=download \
       -buildDir=`pwd` capHir1 grcH38P11) > rbestDownload.log 2>&1
    # real    0m4.386s

#########################################################################
# LASTZ human/grcH38P11 vs. microbat/myoLuc2 - (TODO - 2015-04-27 - Angie)
    mkdir /hive/data/genomes/grcH38P11/bed/lastzMyoLuc2.2015-04-27
    cd /hive/data/genomes/grcH38P11/bed/lastzMyoLuc2.2015-04-27

    cat << '_EOF_' > DEF
# human vs microbat
BLASTZ=/cluster/bin/penn/lastz-distrib-1.03.66/bin/lastz
BLASTZ_O=400
BLASTZ_E=30
BLASTZ_M=254
# default BLASTZ_Q score matrix:
#       A     C     G     T
# A    91  -114   -31  -123
# C  -114   100  -125   -31
# G   -31  -125   100  -114
# T  -123   -31  -114    91

# TARGET: human grcH38P11
SEQ1_DIR=/hive/data/genomes/grcH38P11/grcH38P11.2bit
SEQ1_LEN=/hive/data/genomes/grcH38P11/chrom.sizes
SEQ1_CHUNK=40000000
SEQ1_LIMIT=30
SEQ1_LAP=10000

# QUERY: microbat myoLuc2
SEQ2_DIR=/hive/data/genomes/myoLuc2/myoLuc2.2bit
SEQ2_LEN=/hive/data/genomes/myoLuc2/chrom.sizes
SEQ2_CHUNK=20000000
SEQ2_LIMIT=30
SEQ2_LAP=0

BASE=/hive/data/genomes/grcH38P11/bed/lastzMyoLuc2.2015-04-27
TMPDIR=/dev/shm
_EOF_
    # << happy emacs

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl `pwd`/DEF -verbose=2 \
        -chainMinScore=3000 -chainLinearGap=medium \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > do.log 2>&1
    # real    1062m31.557s

    cat fb.grcH38P11.chainMyoLuc2Link.txt
    # 1176781597 bases of 3049335806 (38.591%) in intersection
    # replacing the previous tuned version:
    # 1071766600 bases of 3049335806 (35.148%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -buildDir=`pwd` grcH38P11 myoLuc2) > rbest.log 2>&1 &
    # real    31m49.720s

    # and for the swap:
    mkdir /hive/data/genomes/myoLuc2/bed/blastz.grcH38P11.swap
    cd /hive/data/genomes/myoLuc2/bed/blastz.grcH38P11.swap

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl -verbose=2 \
      /hive/data/genomes/grcH38P11/bed/lastzMyoLuc2.2015-04-27/DEF \
        -swap -chainMinScore=3000 -chainLinearGap=medium \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > swap.log 2>&1
    #  real    101m34.047s

    cat fb.myoLuc2.chainGrcH38P11Link.txt
    # 1174515059 bases of 1966419868 (59.729%) in intersection
    # replacing the previous tuned version:
    # 1075118724 bases of 1966419868 (54.674%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -buildDir=`pwd` myoLuc2 grcH38P11) > rbest.log 2>&1
    # real    103m44.974s

#########################################################################
# LASTZ human/grcH38P11 vs. Cape elephant shrew/eleEdw1 - (TODO - 2015-02-17 - Angie)
    mkdir /hive/data/genomes/grcH38P11/bed/lastzEleEdw1.2015-02-17
    cd /hive/data/genomes/grcH38P11/bed/lastzEleEdw1.2015-02-17

    cat << '_EOF_' > DEF
# human vs Cape elephant shrew
BLASTZ=/cluster/bin/penn/lastz-distrib-1.03.54/bin/lastz
BLASTZ_O=400
BLASTZ_E=30

# TARGET: human grcH38P11
SEQ1_DIR=/hive/data/genomes/grcH38P11/grcH38P11.2bit
SEQ1_LEN=/hive/data/genomes/grcH38P11/chrom.sizes
SEQ1_CHUNK=40000000
SEQ1_LIMIT=30
SEQ1_LAP=10000

# QUERY: Cape elephant shrew eleEdw1
SEQ2_DIR=/hive/data/genomes/eleEdw1/eleEdw1.2bit
SEQ2_LEN=/hive/data/genomes/eleEdw1/chrom.sizes
SEQ2_CHUNK=20000000
SEQ2_LIMIT=30
SEQ2_LAP=0

BASE=/hive/data/genomes/grcH38P11/bed/lastzEleEdw1.2015-02-17
TMPDIR=/dev/shm
_EOF_
    # << happy emacs

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl `pwd`/DEF -verbose=2 \
        -chainMinScore=3000 -chainLinearGap=medium \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > do.log 2>&1
    # real    2714m54.678s

    cat fb.grcH38P11.chainEleEdw1Link.txt
    # 818423001 bases of 3049335806 (26.839%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -workhorse=hgwdev -buildDir=`pwd` grcH38P11 eleEdw1) \
       > rbest.log 2>&1 &
    # real    46m7.480s

    # and for the swap:
    mkdir /hive/data/genomes/eleEdw1/bed/blastz.grcH38P11.swap
    cd /hive/data/genomes/eleEdw1/bed/blastz.grcH38P11.swap

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl -verbose=2 \
      /hive/data/genomes/grcH38P11/bed/lastzEleEdw1.2015-02-17/DEF \
        -swap -chainMinScore=3000 -chainLinearGap=medium \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > swap.log 2>&1
    #  real    81m53.808s

    cat fb.eleEdw1.chainGrcH38P11Link.txt
    # 801797017 bases of 3315871847 (24.181%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -buildDir=`pwd` eleEdw1 grcH38P11) > rbest.log 2>&1
    # real    30m17.282s

#########################################################################
# LASTZ human/grcH38P11 vs. manatee/triMan1 - (TODO - 2015-04-28 - Angie)
    mkdir /hive/data/genomes/grcH38P11/bed/lastzTriMan1.2015-04-28
    cd /hive/data/genomes/grcH38P11/bed/lastzTriMan1.2015-04-28

    cat << '_EOF_' > DEF
# human vs manatee
BLASTZ=/cluster/bin/penn/lastz-distrib-1.03.66/bin/lastz
BLASTZ_O=400
BLASTZ_E=30
BLASTZ_M=254
# default BLASTZ_Q score matrix:
#       A     C     G     T
# A    91  -114   -31  -123
# C  -114   100  -125   -31
# G   -31  -125   100  -114
# T  -123   -31  -114    91

# TARGET: human grcH38P11
SEQ1_DIR=/hive/data/genomes/grcH38P11/grcH38P11.2bit
SEQ1_LEN=/hive/data/genomes/grcH38P11/chrom.sizes
SEQ1_CHUNK=40000000
SEQ1_LIMIT=30
SEQ1_LAP=10000

# QUERY: manatee triMan1
SEQ2_DIR=/hive/data/genomes/triMan1/triMan1.2bit
SEQ2_LEN=/hive/data/genomes/triMan1/chrom.sizes
SEQ2_CHUNK=20000000
SEQ2_LIMIT=30
SEQ2_LAP=0

BASE=/hive/data/genomes/grcH38P11/bed/lastzTriMan1.2015-04-28
TMPDIR=/dev/shm
_EOF_
    # << happy emacs

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl `pwd`/DEF -verbose=2 \
        -chainMinScore=3000 -chainLinearGap=medium \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > do.log 2>&1
    # real    1801m7.775s

    cat fb.grcH38P11.chainTriMan1Link.txt
    # 1382747603 bases of 3049335806 (45.346%) in intersection
    # replacing the previous tuned version:
    # 1263723305 bases of 3049335806 (41.443%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -buildDir=`pwd` grcH38P11 triMan1) > rbest.log 2>&1 &
    # real    73m5.269s

    # and for the swap:
    mkdir /hive/data/genomes/triMan1/bed/blastz.grcH38P11.swap
    cd /hive/data/genomes/triMan1/bed/blastz.grcH38P11.swap

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl -verbose=2 \
      /hive/data/genomes/grcH38P11/bed/lastzTriMan1.2015-04-28/DEF \
        -swap -chainMinScore=3000 -chainLinearGap=medium \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > swap.log 2>&1
    #  real    103m30.816s

    cat fb.triMan1.chainGrcH38P11Link.txt
    # 1299790980 bases of 2769099677 (46.939%) in intersection
    # replacing the previous tuned version:
    # 1188634635 bases of 2769099677 (42.925%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -workhorse=hgwdev -buildDir=`pwd` triMan1 grcH38P11) \
       > rbest.log 2>&1
    # real    53m44.429s

#########################################################################
# LASTZ human/grcH38P11 vs. lesser Egyptian jerboa/jacJac1 - (TODO - 2015-02-17 - Angie)
    mkdir /hive/data/genomes/grcH38P11/bed/lastzJacJac1.2015-02-17
    cd /hive/data/genomes/grcH38P11/bed/lastzJacJac1.2015-02-17

    cat << '_EOF_' > DEF
# human vs lesser Egyptian jerboa
BLASTZ=/cluster/bin/penn/lastz-distrib-1.03.54/bin/lastz
BLASTZ_O=400
BLASTZ_E=30

# TARGET: human grcH38P11
SEQ1_DIR=/hive/data/genomes/grcH38P11/grcH38P11.2bit
SEQ1_LEN=/hive/data/genomes/grcH38P11/chrom.sizes
SEQ1_CHUNK=40000000
SEQ1_LIMIT=30
SEQ1_LAP=10000

# QUERY: lesser Egyptian jerboa jacJac1
SEQ2_DIR=/hive/data/genomes/jacJac1/jacJac1.2bit
SEQ2_LEN=/hive/data/genomes/jacJac1/chrom.sizes
SEQ2_CHUNK=20000000
SEQ2_LIMIT=30
SEQ2_LAP=0

BASE=/hive/data/genomes/grcH38P11/bed/lastzJacJac1.2015-02-17
TMPDIR=/dev/shm
_EOF_
    # << happy emacs

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl `pwd`/DEF -verbose=2 \
        -chainMinScore=3000 -chainLinearGap=medium \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > do.log 2>&1
    # real    3282m33.094s

    cat fb.grcH38P11.chainJacJac1Link.txt
    # 1041439402 bases of 3049335806 (34.153%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -workhorse=hgwdev -buildDir=`pwd` grcH38P11 jacJac1) \
       > rbest.log 2>&1 &
    # real    43m41.722s

    # and for the swap:
    mkdir /hive/data/genomes/jacJac1/bed/blastz.grcH38P11.swap
    cd /hive/data/genomes/jacJac1/bed/blastz.grcH38P11.swap

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl -verbose=2 \
      /hive/data/genomes/grcH38P11/bed/lastzJacJac1.2015-02-17/DEF \
        -swap -chainMinScore=3000 -chainLinearGap=medium \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > swap.log 2>&1
    #  real    88m19.593s

    cat fb.jacJac1.chainGrcH38P11Link.txt
    # 995506956 bases of 2470259869 (40.300%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -workhorse=hgwdev -buildDir=`pwd` jacJac1 grcH38P11) \
       > rbest.log 2>&1
    # real    46m52.984s

#########################################################################
# LASTZ human/grcH38P11 vs. chinchilla/chiLan1 - (TODO - 2015-04-27 - Angie)
    mkdir /hive/data/genomes/grcH38P11/bed/lastzChiLan1.2015-04-27
    cd /hive/data/genomes/grcH38P11/bed/lastzChiLan1.2015-04-27

    cat << '_EOF_' > DEF
# human vs chinchilla
BLASTZ=/cluster/bin/penn/lastz-distrib-1.03.66/bin/lastz
BLASTZ_O=400
BLASTZ_E=30
BLASTZ_M=254
# default BLASTZ_Q score matrix:
#       A     C     G     T
# A    91  -114   -31  -123
# C  -114   100  -125   -31
# G   -31  -125   100  -114
# T  -123   -31  -114    91

# TARGET: human grcH38P11
SEQ1_DIR=/hive/data/genomes/grcH38P11/grcH38P11.2bit
SEQ1_LEN=/hive/data/genomes/grcH38P11/chrom.sizes
SEQ1_CHUNK=40000000
SEQ1_LIMIT=30
SEQ1_LAP=10000

# QUERY: chinchilla chiLan1
SEQ2_DIR=/hive/data/genomes/chiLan1/chiLan1.2bit
SEQ2_LEN=/hive/data/genomes/chiLan1/chrom.sizes
SEQ2_CHUNK=20000000
SEQ2_LIMIT=30
SEQ2_LAP=0

BASE=/hive/data/genomes/grcH38P11/bed/lastzChiLan1.2015-04-27
TMPDIR=/dev/shm
_EOF_
    # << happy emacs

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl `pwd`/DEF -verbose=2 \
        -chainMinScore=3000 -chainLinearGap=medium \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > do.log 2>&1
    # real    1099m27.880s

    cat fb.grcH38P11.chainChiLan1Link.txt
    # 1392476369 bases of 3049335806 (45.665%) in intersection
    # replacing the previous tuned version:
    # 1244377852 bases of 3049335806 (40.808%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -buildDir=`pwd` grcH38P11 chiLan1) > rbest.log 2>&1 &
    # real    38m31.373s

    # and for the swap:
    mkdir /hive/data/genomes/chiLan1/bed/blastz.grcH38P11.swap
    cd /hive/data/genomes/chiLan1/bed/blastz.grcH38P11.swap

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl -verbose=2 \
      /hive/data/genomes/grcH38P11/bed/lastzChiLan1.2015-04-27/DEF \
        -swap -chainMinScore=3000 -chainLinearGap=medium \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > swap.log 2>&1
    #  real    107m42.158s

    cat fb.chiLan1.chainGrcH38P11Link.txt
    # 1324935425 bases of 2284276400 (58.002%) in intersection
    # replacing the previous tuned version:
    # 1188638834 bases of 2284276400 (52.036%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -buildDir=`pwd` chiLan1 grcH38P11) > rbest.log 2>&1
    # real    62m47.881s

#########################################################################
# LASTZ human/grcH38P11 vs. star nosed mole/conCri1 - (TODO - 2015-04-28 - Angie)
    mkdir /hive/data/genomes/grcH38P11/bed/lastzConCri1.2015-04-28
    cd /hive/data/genomes/grcH38P11/bed/lastzConCri1.2015-04-28

    cat << '_EOF_' > DEF
# human vs star nosed mole
BLASTZ=/cluster/bin/penn/lastz-distrib-1.03.66/bin/lastz
BLASTZ_O=400
BLASTZ_E=30
BLASTZ_M=254
# default BLASTZ_Q score matrix:
#       A     C     G     T
# A    91  -114   -31  -123
# C  -114   100  -125   -31
# G   -31  -125   100  -114
# T  -123   -31  -114    91

# TARGET: human grcH38P11
SEQ1_DIR=/hive/data/genomes/grcH38P11/grcH38P11.2bit
SEQ1_LEN=/hive/data/genomes/grcH38P11/chrom.sizes
SEQ1_CHUNK=40000000
SEQ1_LIMIT=30
SEQ1_LAP=10000

# QUERY: star nosed mole conCri1
SEQ2_DIR=/hive/data/genomes/conCri1/conCri1.2bit
SEQ2_LEN=/hive/data/genomes/conCri1/chrom.sizes
SEQ2_CHUNK=20000000
SEQ2_LIMIT=30
SEQ2_LAP=0

BASE=/hive/data/genomes/grcH38P11/bed/lastzConCri1.2015-04-28
TMPDIR=/dev/shm
_EOF_
    # << happy emacs

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl `pwd`/DEF -verbose=2 \
        -chainMinScore=3000 -chainLinearGap=medium \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > do.log 2>&1
    # real    1423m17.538s

    cat fb.grcH38P11.chainConCri1Link.txt
    # 1095032620 bases of 3049335806 (35.911%) in intersection
    # replacing the previous tuned version:
    # 1007403174 bases of 3049335806 (33.037%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -buildDir=`pwd` grcH38P11 conCri1) > rbest.log 2>&1 &
    # real    99m34.655s

    # and for the swap:
    mkdir /hive/data/genomes/conCri1/bed/blastz.grcH38P11.swap
    cd /hive/data/genomes/conCri1/bed/blastz.grcH38P11.swap

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl -verbose=2 \
      /hive/data/genomes/grcH38P11/bed/lastzConCri1.2015-04-28/DEF \
        -swap -chainMinScore=3000 -chainLinearGap=medium \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > swap.log 2>&1
    #  real    81m47.687s

    cat fb.conCri1.chainGrcH38P11Link.txt
    # 1026633109 bases of 1682542007 (61.017%) in intersection
    # replacing the previous tuned version:
    # 946409492 bases of 1682542007 (56.249%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -buildDir=`pwd` conCri1 grcH38P11) > rbest.log 2>&1
    # real    415m57.506s finished manually real    45m44.330s
    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -workhorse=hgwdev -continue=download \
       -buildDir=`pwd` conCri1 grcH38P11) > rbestDownload.log 2>&1
    # real    0m4.444s

#########################################################################
# LASTZ human/grcH38P11 vs. brush tailed rat/octDeg1 - (TODO - 2015-04-24 - Angie)
    mkdir /hive/data/genomes/grcH38P11/bed/lastzOctDeg1.2015-04-24
    cd /hive/data/genomes/grcH38P11/bed/lastzOctDeg1.2015-04-24

# parameters obtained from a tuning run of lastz_D
# /hive/users/hiram/multiz/100way/hg38.octDeg1/hg38.octDeg.tuning.top400.txt
    cp -p /hive/users/hiram/multiz/100way/hg38.octDeg1/hg38.octDeg1.tuning.top400.txt ./hg38.octDeg1.tuning.Q.txt

    cat << '_EOF_' > DEF
# human vs brush tailed rat
BLASTZ=/cluster/bin/penn/lastz-distrib-1.03.66/bin/lastz
BLASTZ_O=400
BLASTZ_E=30
BLASTZ_M=254
# default BLASTZ_Q score matrix:
#       A     C     G     T
# A    91  -114   -31  -123
# C  -114   100  -125   -31
# G   -31  -125   100  -114
# T  -123   -31  -114    91

# TARGET: human grcH38P11
SEQ1_DIR=/hive/data/genomes/grcH38P11/grcH38P11.2bit
SEQ1_LEN=/hive/data/genomes/grcH38P11/chrom.sizes
SEQ1_CHUNK=40000000
SEQ1_LIMIT=30
SEQ1_LAP=10000

# QUERY: brush tailed rat octDeg1
SEQ2_DIR=/hive/data/genomes/octDeg1/octDeg1.2bit
SEQ2_LEN=/hive/data/genomes/octDeg1/chrom.sizes
SEQ2_CHUNK=20000000
SEQ2_LIMIT=30
SEQ2_LAP=0

BASE=/hive/data/genomes/grcH38P11/bed/lastzOctDeg1.2015-04-24
TMPDIR=/dev/shm
_EOF_
    # << happy emacs

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl `pwd`/DEF -verbose=2 \
        -chainMinScore=3000 -chainLinearGap=medium \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > do.log 2>&1
    # real    311m38.376s

    cat fb.grcH38P11.chainOctDeg1Link.txt
    # 1226996880 bases of 3049335806 (40.238%) in intersection
    # replacing the previous tuned version:
    # 1092487806 bases of 3049335806 (35.827%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -buildDir=`pwd` grcH38P11 octDeg1) > rbest.log 2>&1 &
    # real    36m11.781s

    # and for the swap:
    mkdir /hive/data/genomes/octDeg1/bed/blastz.grcH38P11.swap
    cd /hive/data/genomes/octDeg1/bed/blastz.grcH38P11.swap

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl -verbose=2 \
      /hive/data/genomes/grcH38P11/bed/lastzOctDeg1.2015-04-24/DEF \
        -swap -chainMinScore=3000 -chainLinearGap=medium \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > swap.log 2>&1
    #  real    107m48.695s

    cat fb.octDeg1.chainGrcH38P11Link.txt
    # 1203795092 bases of 2526254702 (47.651%) in intersection
    # replacing the previous tuned version:
    # 1076649085 bases of 2526254702 (42.618%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -buildDir=`pwd` octDeg1 grcH38P11) > rbest.log 2>&1
    # real    38m52.487s

#########################################################################
# LASTZ human/grcH38P11 vs. pika/ochPri3 - (TODO - 2015-04-17 - Angie)
    # mistakenly done in directory name 2015-04-17 when it is really 2015-04-27
    mkdir /hive/data/genomes/grcH38P11/bed/lastzOchPri3.2015-04-17
    cd /hive/data/genomes/grcH38P11/bed/lastzOchPri3.2015-04-17

    cat << '_EOF_' > DEF
# human vs pika
BLASTZ=/cluster/bin/penn/lastz-distrib-1.03.66/bin/lastz
BLASTZ_O=400
BLASTZ_E=30
BLASTZ_M=254
# default BLASTZ_Q score matrix:
#       A     C     G     T
# A    91  -114   -31  -123
# C  -114   100  -125   -31
# G   -31  -125   100  -114
# T  -123   -31  -114    91

# TARGET: human grcH38P11
SEQ1_DIR=/hive/data/genomes/grcH38P11/grcH38P11.2bit
SEQ1_LEN=/hive/data/genomes/grcH38P11/chrom.sizes
SEQ1_CHUNK=40000000
SEQ1_LIMIT=30
SEQ1_LAP=10000

# QUERY: pika ochPri3
SEQ2_DIR=/hive/data/genomes/ochPri3/ochPri3.2bit
SEQ2_LEN=/hive/data/genomes/ochPri3/chrom.sizes
SEQ2_CHUNK=20000000
SEQ2_LIMIT=30
SEQ2_LAP=0

BASE=/hive/data/genomes/grcH38P11/bed/lastzOchPri3.2015-04-17
TMPDIR=/dev/shm
_EOF_
    # << happy emacs

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl `pwd`/DEF -verbose=2 \
        -chainMinScore=3000 -chainLinearGap=medium \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > do.log 2>&1
    # real    971m36.115s

    cat fb.grcH38P11.chainOchPri3Link.txt
    # 1025119076 bases of 3049335806 (33.618%) in intersection
    # replacing the previous tuned version:
    # 922764468 bases of 3049335806 (30.261%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -buildDir=`pwd` grcH38P11 ochPri3) > rbest.log 2>&1 &
    # real    35m7.253s

    # and for the swap:
    mkdir /hive/data/genomes/ochPri3/bed/blastz.grcH38P11.swap
    cd /hive/data/genomes/ochPri3/bed/blastz.grcH38P11.swap

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl -verbose=2 \
      /hive/data/genomes/grcH38P11/bed/lastzOchPri3.2015-04-17/DEF \
        -swap -chainMinScore=3000 -chainLinearGap=medium \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > swap.log 2>&1
    #  real    80m33.697s

    cat fb.ochPri3.chainGrcH38P11Link.txt
    # 968829838 bases of 1943987870 (49.837%) in intersection
    # replacing the previous tuned version:
    # 874404292 bases of 1943987870 (44.980%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -buildDir=`pwd` ochPri3 grcH38P11) > rbest.log 2>&1
    # real    46m26.106s

#########################################################################
# LASTZ human/grcH38P11 vs. hedgehog/eriEur2 - (TODO - 2015-02-17 - Angie)
    mkdir /hive/data/genomes/grcH38P11/bed/lastzEriEur2.2015-02-17
    cd /hive/data/genomes/grcH38P11/bed/lastzEriEur2.2015-02-17

    cat << '_EOF_' > DEF
# human vs hedgehog
BLASTZ=/cluster/bin/penn/lastz-distrib-1.03.54/bin/lastz
BLASTZ_O=400
BLASTZ_E=30

# TARGET: human grcH38P11
SEQ1_DIR=/hive/data/genomes/grcH38P11/grcH38P11.2bit
SEQ1_LEN=/hive/data/genomes/grcH38P11/chrom.sizes
SEQ1_CHUNK=40000000
SEQ1_LIMIT=30
SEQ1_LAP=10000

# QUERY: hedgehog eriEur2
SEQ2_DIR=/hive/data/genomes/eriEur2/eriEur2.2bit
SEQ2_LEN=/hive/data/genomes/eriEur2/chrom.sizes
SEQ2_CHUNK=20000000
SEQ2_LIMIT=30
SEQ2_LAP=0

BASE=/hive/data/genomes/grcH38P11/bed/lastzEriEur2.2015-02-17
TMPDIR=/dev/shm
_EOF_
    # << happy emacs

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl `pwd`/DEF -verbose=2 \
        -chainMinScore=3000 -chainLinearGap=medium \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > do.log 2>&1
    #  real    2763m20.266s

    cat fb.grcH38P11.chainEriEur2Link.txt
    # 777213928 bases of 3049335806 (25.488%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -workhorse=hgwdev -buildDir=`pwd` grcH38P11 eriEur2) \
       > rbest.log 2>&1 &
    # real    32m54.605s

    # and for the swap:
    mkdir /hive/data/genomes/eriEur2/bed/blastz.grcH38P11.swap
    cd /hive/data/genomes/eriEur2/bed/blastz.grcH38P11.swap

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl -verbose=2 \
      /hive/data/genomes/grcH38P11/bed/lastzEriEur2.2015-02-17/DEF \
        -swap -chainMinScore=3000 -chainLinearGap=medium \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > swap.log 2>&1
    #  real    75m12.828s

    cat fb.eriEur2.chainGrcH38P11Link.txt
    # 730172579 bases of 2333073535 (31.297%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -workhorse=hgwdev -buildDir=`pwd` eriEur2 grcH38P11) \
       > rbest.log 2>&1
    # real    34m37.153s

#########################################################################
# LASTZ human/grcH38P11 vs. tenrec/echTel2 - (TODO - 2015-04-28 - Angie)
    mkdir /hive/data/genomes/grcH38P11/bed/lastzEchTel2.2015-04-28
    cd /hive/data/genomes/grcH38P11/bed/lastzEchTel2.2015-04-28

    cat << '_EOF_' > DEF
# human vs tenrec
BLASTZ=/cluster/bin/penn/lastz-distrib-1.03.66/bin/lastz
BLASTZ_O=400
BLASTZ_E=30
BLASTZ_M=254
# default BLASTZ_Q score matrix:
#       A     C     G     T
# A    91  -114   -31  -123
# C  -114   100  -125   -31
# G   -31  -125   100  -114
# T  -123   -31  -114    91

# TARGET: human grcH38P11
SEQ1_DIR=/hive/data/genomes/grcH38P11/grcH38P11.2bit
SEQ1_LEN=/hive/data/genomes/grcH38P11/chrom.sizes
SEQ1_CHUNK=40000000
SEQ1_LIMIT=30
SEQ1_LAP=10000

# QUERY: tenrec echTel2
SEQ2_DIR=/hive/data/genomes/echTel2/echTel2.2bit
SEQ2_LEN=/hive/data/genomes/echTel2/chrom.sizes
SEQ2_CHUNK=20000000
SEQ2_LIMIT=30
SEQ2_LAP=0

BASE=/hive/data/genomes/grcH38P11/bed/lastzEchTel2.2015-04-28
TMPDIR=/dev/shm
_EOF_
    # << happy emacs

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl `pwd`/DEF -verbose=2 \
        -chainMinScore=3000 -chainLinearGap=medium \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > do.log 2>&1
    # real    1689m14.948s

    cat fb.grcH38P11.chainEchTel2Link.txt
    # 893752189 bases of 3049335806 (29.310%) in intersection
    # replacing the previous tuned version:
    # 840080104 bases of 3049335806 (27.550%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -buildDir=`pwd` grcH38P11 echTel2) > rbest.log 2>&1 &
    # real    108m5.914s

    # and for the swap:
    mkdir /hive/data/genomes/echTel2/bed/blastz.grcH38P11.swap
    cd /hive/data/genomes/echTel2/bed/blastz.grcH38P11.swap

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl -verbose=2 \
      /hive/data/genomes/grcH38P11/bed/lastzEchTel2.2015-04-28/DEF \
        -swap -chainMinScore=3000 -chainLinearGap=medium \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > swap.log 2>&1
    #  real    87m14.342s

    cat fb.echTel2.chainGrcH38P11Link.txt
    # 853272550 bases of 2605196361 (32.753%) in intersection
    # replacing the previous tuned version:
    # 802302160 bases of 2605196361 (30.796%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -workhorse=hgwdev -buildDir=`pwd` echTel2 grcH38P11) \
      > rbest.log 2>&1
    # real    42m32.249s

#########################################################################
# LASTZ human/grcH38P11 vs. rat/rn6 - (TODO - 2015-02-14 - Angie)
    mkdir /hive/data/genomes/grcH38P11/bed/lastzRn6.2015-02-14
    cd /hive/data/genomes/grcH38P11/bed/lastzRn6.2015-02-14

# parameters obtained from a tuning run of lastz_D
# /hive/users/hiram/multiz/100way/hg38.rn6/hg38.octDeg.tuning.top400.txt
    cp -p /hive/users/hiram/multiz/100way/hg38.rn6/hg38.rn6.tuning.top400.txt ./hg38.rn6.tuning.Q.txt

    cat << '_EOF_' > DEF
# human vs rat
BLASTZ=/cluster/bin/penn/lastz-distrib-1.03.54/bin/lastz
BLASTZ_O=400
BLASTZ_E=30

# TARGET: human grcH38P11
SEQ1_DIR=/hive/data/genomes/grcH38P11/grcH38P11.2bit
SEQ1_LEN=/hive/data/genomes/grcH38P11/chrom.sizes
SEQ1_CHUNK=40000000
SEQ1_LIMIT=30
SEQ1_LAP=10000

# QUERY: rat rn6
SEQ2_DIR=/hive/data/genomes/rn6/rn6.2bit
SEQ2_LEN=/hive/data/genomes/rn6/chrom.sizes
SEQ2_CHUNK=20000000
SEQ2_LIMIT=30
SEQ2_LAP=0

BASE=/hive/data/genomes/grcH38P11/bed/lastzRn6.2015-02-14
TMPDIR=/dev/shm
_EOF_
    # << happy emacs

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl `pwd`/DEF -verbose=2 \
        -chainMinScore=3000 -chainLinearGap=medium \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > do.log 2>&1
    # real    539m6.068s

    cat fb.grcH38P11.chainRn6Link.txt
    # 947631744 bases of 3049335806 (31.077%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -buildDir=`pwd` grcH38P11 rn6) > rbest.log 2>&1 &
    # real    61m44.574s

    # and for the swap:
    mkdir /hive/data/genomes/rn6/bed/blastz.grcH38P11.swap
    cd /hive/data/genomes/rn6/bed/blastz.grcH38P11.swap

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl -verbose=2 \
      /hive/data/genomes/grcH38P11/bed/lastzRn6.2015-02-14/DEF \
        -swap -chainMinScore=3000 -chainLinearGap=medium \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > swap.log 2>&1
    #  real    114m13.019s

    cat fb.rn6.chainGrcH38P11Link.txt
    # 952700446 bases of 2729860805 (34.899%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -buildDir=`pwd` rn6 grcH38P11) > rbest.log 2>&1
    # real    47m8.081s

#########################################################################
# LASTZ human/grcH38P11 vs. Chinese hamster/criGri1 - (TODO - 2015-02-17 - Angie)
    mkdir /hive/data/genomes/grcH38P11/bed/lastzCriGri1.2015-02-17
    cd /hive/data/genomes/grcH38P11/bed/lastzCriGri1.2015-02-17

    cat << '_EOF_' > DEF
# human vs Chinese hamster
BLASTZ=/cluster/bin/penn/lastz-distrib-1.03.54/bin/lastz
BLASTZ_O=400
BLASTZ_E=30

# TARGET: human grcH38P11
SEQ1_DIR=/hive/data/genomes/grcH38P11/grcH38P11.2bit
SEQ1_LEN=/hive/data/genomes/grcH38P11/chrom.sizes
SEQ1_CHUNK=40000000
SEQ1_LIMIT=30
SEQ1_LAP=10000

# QUERY: Chinese hamster criGri1
SEQ2_DIR=/hive/data/genomes/criGri1/criGri1.2bit
SEQ2_LEN=/hive/data/genomes/criGri1/chrom.sizes
SEQ2_CHUNK=20000000
SEQ2_LIMIT=100
SEQ2_LAP=0

BASE=/hive/data/genomes/grcH38P11/bed/lastzCriGri1.2015-02-17
TMPDIR=/dev/shm
_EOF_
    # << happy emacs

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl `pwd`/DEF -verbose=2 \
        -chainMinScore=3000 -chainLinearGap=medium \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > do.log 2>&1
    # real    3327m39.074s
    # after a crash in lastz, continuing:
    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl `pwd`/DEF -verbose=2 \
        -chainMinScore=3000 -chainLinearGap=medium \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -continue=cat -syntenicNet) > cat.log 2>&1
    # real    399m26.683s

    cat fb.grcH38P11.chainCriGri1Link.txt
    # 1011432843 bases of 3049335806 (33.169%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -workhorse=hgwdev -buildDir=`pwd` grcH38P11 criGri1) \
       > rbest.log 2>&1 &
    # lost the log file
    # real    41m11.272s

    # and for the swap:
    mkdir /hive/data/genomes/criGri1/bed/blastz.grcH38P11.swap
    cd /hive/data/genomes/criGri1/bed/blastz.grcH38P11.swap

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl -verbose=2 \
      /hive/data/genomes/grcH38P11/bed/lastzCriGri1.2015-02-17/DEF \
        -swap -chainMinScore=3000 -chainLinearGap=medium \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > swap.log 2>&1
    #  real    142m31.834s

    cat fb.criGri1.chainGrcH38P11Link.txt
    # 976365873 bases of 2301325917 (42.426%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -workhorse=hgwdev -buildDir=`pwd` criGri1 grcH38P11) \
       > rbest.log 2>&1
    # real    44m9.075s

#########################################################################
# LASTZ human/grcH38P11 vs. Golden hamster/mesAur1 - (TODO - 2015-02-17 - Angie)
    mkdir /hive/data/genomes/grcH38P11/bed/lastzMesAur1.2015-02-17
    cd /hive/data/genomes/grcH38P11/bed/lastzMesAur1.2015-02-17

    cat << '_EOF_' > DEF
# human vs Golden hamster
BLASTZ=/cluster/bin/penn/lastz-distrib-1.03.54/bin/lastz
BLASTZ_O=400
BLASTZ_E=30

# TARGET: human grcH38P11
SEQ1_DIR=/hive/data/genomes/grcH38P11/grcH38P11.2bit
SEQ1_LEN=/hive/data/genomes/grcH38P11/chrom.sizes
SEQ1_CHUNK=40000000
SEQ1_LIMIT=30
SEQ1_LAP=10000

# QUERY: Golden hamster mesAur1
SEQ2_DIR=/hive/data/genomes/mesAur1/mesAur1.2bit
SEQ2_LEN=/hive/data/genomes/mesAur1/chrom.sizes
SEQ2_CHUNK=20000000
SEQ2_LIMIT=50
SEQ2_LAP=0

BASE=/hive/data/genomes/grcH38P11/bed/lastzMesAur1.2015-02-17
TMPDIR=/dev/shm
_EOF_
    # << happy emacs

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl `pwd`/DEF -verbose=2 \
        -chainMinScore=3000 -chainLinearGap=medium \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > do.log 2>&1
    # real    3321m29.849s

    cat fb.grcH38P11.chainMesAur1Link.txt
    # 939276772 bases of 3049335806 (30.803%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -workhorse=hgwdev -buildDir=`pwd` grcH38P11 mesAur1) \
       > rbest.log 2>&1 &
    # real    40m43.963s

    # and for the swap:
    mkdir /hive/data/genomes/mesAur1/bed/blastz.grcH38P11.swap
    cd /hive/data/genomes/mesAur1/bed/blastz.grcH38P11.swap

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl -verbose=2 \
      /hive/data/genomes/grcH38P11/bed/lastzMesAur1.2015-02-17/DEF \
        -swap -chainMinScore=3000 -chainLinearGap=medium \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > swap.log 2>&1
    #  real    97m31.454s

    cat fb.mesAur1.chainGrcH38P11Link.txt
    # 894722574 bases of 2076176254 (43.095%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -workhorse=hgwdev -buildDir=`pwd` mesAur1 grcH38P11) \
       > rbest.log 2>&1
    # real    43m18.764s

#########################################################################
# LASTZ human/grcH38P11 vs. Prairie vole/micOch1 - (TODO - 2015-02-14 - Angie)
    mkdir /hive/data/genomes/grcH38P11/bed/lastzMicOch1.2015-02-14
    cd /hive/data/genomes/grcH38P11/bed/lastzMicOch1.2015-02-14

    cat << '_EOF_' > DEF
# human vs Prairie vole
BLASTZ=/cluster/bin/penn/lastz-distrib-1.03.54/bin/lastz

# TARGET: human grcH38P11
SEQ1_DIR=/hive/data/genomes/grcH38P11/grcH38P11.2bit
SEQ1_LEN=/hive/data/genomes/grcH38P11/chrom.sizes
SEQ1_CHUNK=40000000
SEQ1_LIMIT=30
SEQ1_LAP=10000

# QUERY: Prairie vole micOch1
SEQ2_DIR=/hive/data/genomes/micOch1/micOch1.2bit
SEQ2_LEN=/hive/data/genomes/micOch1/chrom.sizes
SEQ2_CHUNK=20000000
SEQ2_LIMIT=20
SEQ2_LAP=0

BASE=/hive/data/genomes/grcH38P11/bed/lastzMicOch1.2015-02-14
TMPDIR=/dev/shm
_EOF_
    # << happy emacs

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl `pwd`/DEF -verbose=2 \
        -chainMinScore=3000 -chainLinearGap=medium \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > do.log 2>&1
    # real    493m1.575s

    cat fb.grcH38P11.chainMicOch1Link.txt
    # 960200428 bases of 3049335806 (31.489%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -buildDir=`pwd` grcH38P11 micOch1) > rbest.log 2>&1 &
    # real    28m17.738s

    # and for the swap:
    mkdir /hive/data/genomes/micOch1/bed/blastz.grcH38P11.swap
    cd /hive/data/genomes/micOch1/bed/blastz.grcH38P11.swap

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl -verbose=2 \
      /hive/data/genomes/grcH38P11/bed/lastzMicOch1.2015-02-14/DEF \
        -swap -chainMinScore=3000 -chainLinearGap=medium \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > swap.log 2>&1
    #  real    111m26.473s

    cat fb.micOch1.chainGrcH38P11Link.txt
    # 916196683 bases of 2104321675 (43.539%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -buildDir=`pwd` micOch1 grcH38P11) > rbest.log 2>&1
    # real    84m4.019s

#########################################################################
# LASTZ human/grcH38P11 vs. shrew/sorAra2 - (TODO - 2015-02-17 - Angie)
    mkdir /hive/data/genomes/grcH38P11/bed/lastzSorAra2.2015-02-17
    cd /hive/data/genomes/grcH38P11/bed/lastzSorAra2.2015-02-17

    cat << '_EOF_' > DEF
# human vs shrew
BLASTZ=/cluster/bin/penn/lastz-distrib-1.03.54/bin/lastz
BLASTZ_O=400
BLASTZ_E=30

# TARGET: human grcH38P11
SEQ1_DIR=/hive/data/genomes/grcH38P11/grcH38P11.2bit
SEQ1_LEN=/hive/data/genomes/grcH38P11/chrom.sizes
SEQ1_CHUNK=40000000
SEQ1_LIMIT=30
SEQ1_LAP=10000

# QUERY: shrew sorAra2
SEQ2_DIR=/hive/data/genomes/sorAra2/sorAra2.2bit
SEQ2_LEN=/hive/data/genomes/sorAra2/chrom.sizes
SEQ2_CHUNK=20000000
SEQ2_LIMIT=20
SEQ2_LAP=0

BASE=/hive/data/genomes/grcH38P11/bed/lastzSorAra2.2015-02-17
TMPDIR=/dev/shm
_EOF_
    # << happy emacs

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl `pwd`/DEF -verbose=2 \
        -chainMinScore=3000 -chainLinearGap=medium \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > do.log 2>&1
    # real    3480m4.393s

    cat fb.grcH38P11.chainSorAra2Link.txt
    # 820409269 bases of 3049335806 (26.905%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -workhorse=hgwdev -buildDir=`pwd` grcH38P11 sorAra2) \
       > rbest.log 2>&1 &
    # real    37m5.305s

    # and for the swap:
    mkdir /hive/data/genomes/sorAra2/bed/blastz.grcH38P11.swap
    cd /hive/data/genomes/sorAra2/bed/blastz.grcH38P11.swap

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl -verbose=2 \
      /hive/data/genomes/grcH38P11/bed/lastzSorAra2.2015-02-17/DEF \
        -swap -chainMinScore=3000 -chainLinearGap=medium \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > swap.log 2>&1
    #  real    106m55.651s

    cat fb.sorAra2.chainGrcH38P11Link.txt
    # 783891768 bases of 2192103426 (35.760%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -workhorse=hgwdev -buildDir=`pwd` sorAra2 grcH38P11) \
       > rbest.log 2>&1
    # real    37m44.557s

#########################################################################
# LASTZ human/grcH38P11 vs. wallaby/macEug2 - (TODO - 2015-02-17 - Angie)
    mkdir /hive/data/genomes/grcH38P11/bed/lastzMacEug2.2015-02-17
    cd /hive/data/genomes/grcH38P11/bed/lastzMacEug2.2015-02-17

    cat << '_EOF_' > DEF
# human vs wallaby
BLASTZ=/cluster/bin/penn/lastz-distrib-1.03.54/bin/lastz
BLASTZ_O=400
BLASTZ_E=30

# TARGET: human grcH38P11
SEQ1_DIR=/hive/data/genomes/grcH38P11/grcH38P11.2bit
SEQ1_LEN=/hive/data/genomes/grcH38P11/chrom.sizes
SEQ1_CHUNK=40000000
SEQ1_LIMIT=30
SEQ1_LAP=10000

# QUERY: wallaby macEug2
SEQ2_DIR=/hive/data/genomes/macEug2/macEug2.2bit
SEQ2_LEN=/hive/data/genomes/macEug2/chrom.sizes
SEQ2_CHUNK=20000000
SEQ2_LIMIT=300
SEQ2_LAP=0

BASE=/hive/data/genomes/grcH38P11/bed/lastzMacEug2.2015-02-17
TMPDIR=/dev/shm
_EOF_
    # << happy emacs

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl `pwd`/DEF -verbose=2 \
        -chainMinScore=5000 -chainLinearGap=loose \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > do.log 2>&1
    # real    3321m43.912s

    cat fb.grcH38P11.chainMacEug2Link.txt
    # 194475426 bases of 3049335806 (6.378%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -workhorse=hgwdev -buildDir=`pwd` grcH38P11 macEug2) \
       > rbest.log 2>&1 &
    # real    17m42.993s

    # and for the swap:
    mkdir /hive/data/genomes/macEug2/bed/blastz.grcH38P11.swap
    cd /hive/data/genomes/macEug2/bed/blastz.grcH38P11.swap

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl -verbose=2 \
      /hive/data/genomes/grcH38P11/bed/lastzMacEug2.2015-02-17/DEF \
        -swap -chainMinScore=5000 -chainLinearGap=loose \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > swap.log 2>&1
    #  real    185m57.086s

    cat fb.macEug2.chainGrcH38P11Link.txt
    # 182916846 bases of 2536076957 (7.213%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -workhorse=hgwdev -buildDir=`pwd` macEug2 grcH38P11) \
       > rbest.log 2>&1
    # real    143m14.162s

#########################################################################
# LASTZ human/grcH38P11 vs. Tasmanian devil/sarHar1 - (TODO - 2015-02-13 - Angie)
    mkdir /hive/data/genomes/grcH38P11/bed/lastzSarHar1.2015-02-13
    cd /hive/data/genomes/grcH38P11/bed/lastzSarHar1.2015-02-13

    cat << '_EOF_' > DEF
# human vs Tasmanian devil
BLASTZ=/cluster/bin/penn/lastz-distrib-1.03.54/bin/lastz
BLASTZ_O=400
BLASTZ_E=30
BLASTZ_Y=3400
BLASTZ_L=6000
BLASTZ_K=2200
BLASTZ_M=50
BLASTZ_Q=/scratch/data/blastz/HoxD55.q
#      A    C    G    T
#     91  -90  -25 -100
#    -90  100 -100  -25
#    -25 -100  100  -90
#   -100  -25  -90  91

# TARGET: human grcH38P11
SEQ1_DIR=/hive/data/genomes/grcH38P11/grcH38P11.2bit
SEQ1_LEN=/hive/data/genomes/grcH38P11/chrom.sizes
SEQ1_CHUNK=40000000
SEQ1_LIMIT=30
SEQ1_LAP=10000

# QUERY: Tasmanian devil sarHar1
SEQ2_DIR=/hive/data/genomes/sarHar1/sarHar1.2bit
SEQ2_LEN=/hive/data/genomes/sarHar1/chrom.sizes
SEQ2_CHUNK=20000000
SEQ2_LIMIT=60
SEQ2_LAP=0

BASE=/hive/data/genomes/grcH38P11/bed/lastzSarHar1.2015-02-13
TMPDIR=/dev/shm
_EOF_
    # << happy emacs

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl `pwd`/DEF -verbose=2 \
        -chainMinScore=5000 -chainLinearGap=loose \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > do.log 2>&1
    # real    862m32.202s

    cat fb.grcH38P11.chainSarHar1Link.txt
    # 388903768 bases of 3049335806 (12.754%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -buildDir=`pwd` grcH38P11 sarHar1) > rbest.log 2>&1 &
    # real    34m31.714s

    # and for the swap:
    mkdir /hive/data/genomes/sarHar1/bed/blastz.grcH38P11.swap
    cd /hive/data/genomes/sarHar1/bed/blastz.grcH38P11.swap

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl -verbose=2 \
      /hive/data/genomes/grcH38P11/bed/lastzSarHar1.2015-02-13/DEF \
        -swap -chainMinScore=5000 -chainLinearGap=loose \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > swap.log 2>&1
    # real    69m33.260s

    cat fb.sarHar1.chainGrcH38P11Link.txt
    # 378889609 bases of 2931539702 (12.925%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -buildDir=`pwd` sarHar1 grcH38P11) > rbest.log 2>&1
    # real    22m1.912s

#########################################################################
# LASTZ human/grcH38P11 vs. Spiny softshell turtle/apaSpi1 - (TODO - 2015-02-13 - Angie)
    mkdir /hive/data/genomes/grcH38P11/bed/lastzApaSpi1.2015-02-13
    cd /hive/data/genomes/grcH38P11/bed/lastzApaSpi1.2015-02-13

    cat << '_EOF_' > DEF
# human vs Spiny softshell turtle
BLASTZ=/cluster/bin/penn/lastz-distrib-1.03.54/bin/lastz
BLASTZ_O=400
BLASTZ_E=30
BLASTZ_Y=3400
BLASTZ_L=6000
BLASTZ_K=2200
BLASTZ_M=50
BLASTZ_Q=/scratch/data/blastz/HoxD55.q
#      A    C    G    T
#     91  -90  -25 -100
#    -90  100 -100  -25
#    -25 -100  100  -90
#   -100  -25  -90  91

# TARGET: human grcH38P11
SEQ1_DIR=/hive/data/genomes/grcH38P11/grcH38P11.2bit
SEQ1_LEN=/hive/data/genomes/grcH38P11/chrom.sizes
SEQ1_CHUNK=40000000
SEQ1_LIMIT=30
SEQ1_LAP=10000

# QUERY: Spiny softshell turtle apaSpi1
SEQ2_DIR=/hive/data/genomes/apaSpi1/apaSpi1.2bit
SEQ2_LEN=/hive/data/genomes/apaSpi1/chrom.sizes
SEQ2_CHUNK=20000000
SEQ2_LIMIT=400
SEQ2_LAP=0

BASE=/hive/data/genomes/grcH38P11/bed/lastzApaSpi1.2015-02-13
TMPDIR=/dev/shm
_EOF_
    # << happy emacs

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl `pwd`/DEF -verbose=2 \
        -chainMinScore=5000 -chainLinearGap=loose \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > do.log 2>&1
    # real    737m19.211s

    cat fb.grcH38P11.chainApaSpi1Link.txt
    # 140617559 bases of 3049335806 (4.611%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -buildDir=`pwd` grcH38P11 apaSpi1) > rbest.log 2>&1 &
    # real    19m56.198s

    # and for the swap:
    mkdir /hive/data/genomes/apaSpi1/bed/blastz.grcH38P11.swap
    cd /hive/data/genomes/apaSpi1/bed/blastz.grcH38P11.swap

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl -verbose=2 \
      /hive/data/genomes/grcH38P11/bed/lastzApaSpi1.2015-02-13/DEF \
        -swap -chainMinScore=5000 -chainLinearGap=loose \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > swap.log 2>&1
    #  real    47m41.422s

    cat fb.apaSpi1.chainGrcH38P11Link.txt
    # 118690974 bases of 1877982184 (6.320%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -buildDir=`pwd` apaSpi1 grcH38P11) > rbest.log 2>&1
    # real    48m11.487s

#########################################################################
# LASTZ human/grcH38P11 vs. Chinese softshell turtle/pelSin1 - (TODO - 2015-02-13 - Angie)
    mkdir /hive/data/genomes/grcH38P11/bed/lastzPelSin1.2015-02-13
    cd /hive/data/genomes/grcH38P11/bed/lastzPelSin1.2015-02-13

    cat << '_EOF_' > DEF
# human vs Chinese softshell turtle
BLASTZ=/cluster/bin/penn/lastz-distrib-1.03.54/bin/lastz
BLASTZ_O=400
BLASTZ_E=30
BLASTZ_Y=3400
BLASTZ_L=6000
BLASTZ_K=2200
BLASTZ_M=50
BLASTZ_Q=/scratch/data/blastz/HoxD55.q
#      A    C    G    T
#     91  -90  -25 -100
#    -90  100 -100  -25
#    -25 -100  100  -90
#   -100  -25  -90  91

# TARGET: human grcH38P11
SEQ1_DIR=/hive/data/genomes/grcH38P11/grcH38P11.2bit
SEQ1_LEN=/hive/data/genomes/grcH38P11/chrom.sizes
SEQ1_CHUNK=40000000
SEQ1_LIMIT=30
SEQ1_LAP=10000

# QUERY: Chinese softshell turtle pelSin1
SEQ2_DIR=/hive/data/genomes/pelSin1/pelSin1.2bit
SEQ2_LEN=/hive/data/genomes/pelSin1/chrom.sizes
SEQ2_CHUNK=20000000
SEQ2_LIMIT=30
SEQ2_LAP=0

BASE=/hive/data/genomes/grcH38P11/bed/lastzPelSin1.2015-02-13
TMPDIR=/dev/shm
_EOF_
    # << happy emacs

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl `pwd`/DEF -verbose=2 \
        -chainMinScore=5000 -chainLinearGap=loose \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > do.log 2>&1
    # real    749m6.906s

    cat fb.grcH38P11.chainPelSin1Link.txt
    # 174304542 bases of 3049335806 (5.716%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -buildDir=`pwd` grcH38P11 pelSin1) > rbest.log 2>&1 &
    # real    32m56.986s

    # and for the swap:
    mkdir /hive/data/genomes/pelSin1/bed/blastz.grcH38P11.swap
    cd /hive/data/genomes/pelSin1/bed/blastz.grcH38P11.swap

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl -verbose=2 \
      /hive/data/genomes/grcH38P11/bed/lastzPelSin1.2015-02-13/DEF \
        -swap -chainMinScore=5000 -chainLinearGap=loose \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > swap.log 2>&1
    # real    28m15.790s

    cat fb.pelSin1.chainGrcH38P11Link.txt
    # 151827556 bases of 2106639384 (7.207%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -buildDir=`pwd` pelSin1 grcH38P11) > rbest.log 2>&1
    # real    63m22.391s

#########################################################################
# LASTZ human/grcH38P11 vs. platypus/ornAna1 - (TODO - 2015-02-13 - Angie)
    mkdir /hive/data/genomes/grcH38P11/bed/lastzOrnAna1.2015-02-13
    cd /hive/data/genomes/grcH38P11/bed/lastzOrnAna1.2015-02-13

    cat << '_EOF_' > DEF
# human vs platypus
BLASTZ=/cluster/bin/penn/lastz-distrib-1.03.54/bin/lastz
BLASTZ_O=400
BLASTZ_E=30
BLASTZ_Y=3400
BLASTZ_L=6000
BLASTZ_K=2200
BLASTZ_M=50
BLASTZ_Q=/scratch/data/blastz/HoxD55.q
#      A    C    G    T
#     91  -90  -25 -100
#    -90  100 -100  -25
#    -25 -100  100  -90
#   -100  -25  -90  91

# TARGET: human grcH38P11
SEQ1_DIR=/hive/data/genomes/grcH38P11/grcH38P11.2bit
SEQ1_LEN=/hive/data/genomes/grcH38P11/chrom.sizes
SEQ1_CHUNK=40000000
SEQ1_LIMIT=30
SEQ1_LAP=10000

# QUERY: platypus ornAna1
SEQ2_DIR=/hive/data/genomes/ornAna1/ornAna1.2bit
SEQ2_LEN=/hive/data/genomes/ornAna1/chrom.sizes
SEQ2_CHUNK=20000000
SEQ2_LIMIT=300
SEQ2_LAP=0

BASE=/hive/data/genomes/grcH38P11/bed/lastzOrnAna1.2015-02-13
TMPDIR=/dev/shm
_EOF_
    # << happy emacs

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl `pwd`/DEF -verbose=2 \
        -chainMinScore=5000 -chainLinearGap=loose \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > do.log 2>&1
    # real    714m38.972s

    cat fb.grcH38P11.chainOrnAna1Link.txt
    # 236893911 bases of 3049335806 (7.769%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -buildDir=`pwd` grcH38P11 ornAna1) > rbest.log 2>&1 &
    # real    38m4.653s

    # and for the swap:
    mkdir /hive/data/genomes/ornAna1/bed/blastz.grcH38P11.swap
    cd /hive/data/genomes/ornAna1/bed/blastz.grcH38P11.swap

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl -verbose=2 \
      /hive/data/genomes/grcH38P11/bed/lastzOrnAna1.2015-02-13/DEF \
        -swap -chainMinScore=5000 -chainLinearGap=loose \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > swap.log 2>&1
    #  real    84m45.882s

    cat fb.ornAna1.chainGrcH38P11Link.txt
    # 217095490 bases of 1842236818 (11.784%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -buildDir=`pwd` ornAna1 grcH38P11) > rbest.log 2>&1
    # real    61m34.921s

#########################################################################
# LASTZ human/grcH38P11 vs. American alligator/allMis1 - (TODO - 2015-02-13 - Angie)
    mkdir /hive/data/genomes/grcH38P11/bed/lastzAllMis1.2015-02-13
    cd /hive/data/genomes/grcH38P11/bed/lastzAllMis1.2015-02-13

    cat << '_EOF_' > DEF
# human vs American alligator
BLASTZ=/cluster/bin/penn/lastz-distrib-1.03.54/bin/lastz
BLASTZ_O=400
BLASTZ_E=30
BLASTZ_Y=3400
BLASTZ_L=6000
BLASTZ_K=2200
BLASTZ_M=50
BLASTZ_Q=/scratch/data/blastz/HoxD55.q
#      A    C    G    T
#     91  -90  -25 -100
#    -90  100 -100  -25
#    -25 -100  100  -90
#   -100  -25  -90  91

# TARGET: human grcH38P11
SEQ1_DIR=/hive/data/genomes/grcH38P11/grcH38P11.2bit
SEQ1_LEN=/hive/data/genomes/grcH38P11/chrom.sizes
SEQ1_CHUNK=40000000
SEQ1_LIMIT=30
SEQ1_LAP=10000

# QUERY: American alligator allMis1
SEQ2_DIR=/hive/data/genomes/allMis1/allMis1.2bit
SEQ2_LEN=/hive/data/genomes/allMis1/chrom.sizes
SEQ2_CHUNK=20000000
SEQ2_LIMIT=30
SEQ2_LAP=0

BASE=/hive/data/genomes/grcH38P11/bed/lastzAllMis1.2015-02-13
TMPDIR=/dev/shm
_EOF_
    # << happy emacs

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl `pwd`/DEF -verbose=2 \
        -chainMinScore=5000 -chainLinearGap=loose \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > do.log 2>&1
    # real    773m58.250s

    cat fb.grcH38P11.chainAllMis1Link.txt
    # 230567044 bases of 3049335806 (7.561%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -buildDir=`pwd` grcH38P11 allMis1) > rbest.log 2>&1 &
    # real    32m25.167s

    # and for the swap:
    mkdir /hive/data/genomes/allMis1/bed/blastz.grcH38P11.swap
    cd /hive/data/genomes/allMis1/bed/blastz.grcH38P11.swap

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl -verbose=2 \
      /hive/data/genomes/grcH38P11/bed/lastzAllMis1.2015-02-13/DEF \
        -swap -chainMinScore=5000 -chainLinearGap=loose \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > swap.log 2>&1
    #  real    41m40.053s

    cat fb.allMis1.chainGrcH38P11Link.txt
    # 184529544 bases of 2129659933 (8.665%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -buildDir=`pwd` allMis1 grcH38P11) > rbest.log 2>&1
    # real    20m37.259s

#########################################################################
# LASTZ human/grcH38P11 vs. Rock pigeon/colLiv1 - (TODO - 2015-02-13 - Angie)
    mkdir /hive/data/genomes/grcH38P11/bed/lastzColLiv1.2015-02-13
    cd /hive/data/genomes/grcH38P11/bed/lastzColLiv1.2015-02-13

    cat << '_EOF_' > DEF
# human vs Rock pigeon
BLASTZ=/cluster/bin/penn/lastz-distrib-1.03.54/bin/lastz
BLASTZ_O=400
BLASTZ_E=30
BLASTZ_Y=3400
BLASTZ_L=6000
BLASTZ_K=2200
BLASTZ_M=50
BLASTZ_Q=/scratch/data/blastz/HoxD55.q
#      A    C    G    T
#     91  -90  -25 -100
#    -90  100 -100  -25
#    -25 -100  100  -90
#   -100  -25  -90  91

# TARGET: human grcH38P11
SEQ1_DIR=/hive/data/genomes/grcH38P11/grcH38P11.2bit
SEQ1_LEN=/hive/data/genomes/grcH38P11/chrom.sizes
SEQ1_CHUNK=40000000
SEQ1_LIMIT=30
SEQ1_LAP=10000

# QUERY: Rock pigeon colLiv1
SEQ2_DIR=/hive/data/genomes/colLiv1/colLiv1.2bit
SEQ2_LEN=/hive/data/genomes/colLiv1/chrom.sizes
SEQ2_CHUNK=20000000
SEQ2_LIMIT=30
SEQ2_LAP=0

BASE=/hive/data/genomes/grcH38P11/bed/lastzColLiv1.2015-02-13
TMPDIR=/dev/shm
_EOF_
    # << happy emacs

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl `pwd`/DEF -verbose=2 \
        -chainMinScore=5000 -chainLinearGap=loose \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > do.log 2>&1
    # real    577m9.861s

    cat fb.grcH38P11.chainColLiv1Link.txt
    # 143694750 bases of 3049335806 (4.712%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -buildDir=`pwd` grcH38P11 colLiv1) > rbest.log 2>&1 &
    # real    39m12.952s

    # and for the swap:
    mkdir /hive/data/genomes/colLiv1/bed/blastz.grcH38P11.swap
    cd /hive/data/genomes/colLiv1/bed/blastz.grcH38P11.swap

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl -verbose=2 \
      /hive/data/genomes/grcH38P11/bed/lastzColLiv1.2015-02-13/DEF \
        -swap -chainMinScore=5000 -chainLinearGap=loose \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > swap.log 2>&1
    #  real    17m12.980s

    cat fb.colLiv1.chainGrcH38P11Link.txt
    # 111080887 bases of 1086925875 (10.220%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -buildDir=`pwd` colLiv1 grcH38P11) > rbest.log 2>&1
    # real    57m22.697s

#########################################################################
# LASTZ human/grcH38P11 vs. chicken/galGal4 - (TODO - 2015-02-13 - Angie)
    mkdir /hive/data/genomes/grcH38P11/bed/lastzGalGal4.2015-02-13
    cd /hive/data/genomes/grcH38P11/bed/lastzGalGal4.2015-02-13

    cat << '_EOF_' > DEF
# human vs chicken
BLASTZ=/cluster/bin/penn/lastz-distrib-1.03.54/bin/lastz
BLASTZ_O=400
BLASTZ_E=30
BLASTZ_Y=3400
BLASTZ_L=6000
BLASTZ_K=2200
BLASTZ_M=50
BLASTZ_Q=/scratch/data/blastz/HoxD55.q
#      A    C    G    T
#     91  -90  -25 -100
#    -90  100 -100  -25
#    -25 -100  100  -90
#   -100  -25  -90  91

# TARGET: human grcH38P11
SEQ1_DIR=/hive/data/genomes/grcH38P11/grcH38P11.2bit
SEQ1_LEN=/hive/data/genomes/grcH38P11/chrom.sizes
SEQ1_CHUNK=40000000
SEQ1_LIMIT=30
SEQ1_LAP=10000

# QUERY: chicken galGal4
SEQ2_DIR=/hive/data/genomes/galGal4/galGal4.2bit
SEQ2_LEN=/hive/data/genomes/galGal4/chrom.sizes
SEQ2_CHUNK=20000000
SEQ2_LIMIT=30
SEQ2_LAP=0

BASE=/hive/data/genomes/grcH38P11/bed/lastzGalGal4.2015-02-13
TMPDIR=/dev/shm
_EOF_
    # << happy emacs

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl `pwd`/DEF -verbose=2 \
        -chainMinScore=5000 -chainLinearGap=loose \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > do.log 2>&1
    # real    591m53.978s

    cat fb.grcH38P11.chainGalGal4Link.txt
    # 143193682 bases of 3049335806 (4.696%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -buildDir=`pwd` grcH38P11 galGal4) > rbest.log 2>&1 &
    # real    22m9.725s

    # and for the swap:
    mkdir /hive/data/genomes/galGal4/bed/blastz.grcH38P11.swap
    cd /hive/data/genomes/galGal4/bed/blastz.grcH38P11.swap

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl -verbose=2 \
      /hive/data/genomes/grcH38P11/bed/lastzGalGal4.2015-02-13/DEF \
        -swap -chainMinScore=5000 -chainLinearGap=loose \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > swap.log 2>&1
    #  real    19m26.680s

    cat fb.galGal4.chainGrcH38P11Link.txt
    # 112454237 bases of 1032854810 (10.888%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -buildDir=`pwd` galGal4 grcH38P11) > rbest.log 2>&1
    # real    16m49.158s

#########################################################################
# LASTZ human/grcH38P11 vs. Mallard duck/anaPla1 - (TODO - 2015-02-13 - Angie)
    mkdir /hive/data/genomes/grcH38P11/bed/lastzAnaPla1.2015-02-13
    cd /hive/data/genomes/grcH38P11/bed/lastzAnaPla1.2015-02-13

    cat << '_EOF_' > DEF
# human vs Mallard duck
BLASTZ=/cluster/bin/penn/lastz-distrib-1.03.54/bin/lastz
BLASTZ_O=400
BLASTZ_E=30
BLASTZ_Y=3400
BLASTZ_L=6000
BLASTZ_K=2200
BLASTZ_M=50
BLASTZ_Q=/scratch/data/blastz/HoxD55.q
#      A    C    G    T
#     91  -90  -25 -100
#    -90  100 -100  -25
#    -25 -100  100  -90
#   -100  -25  -90  91

# TARGET: human grcH38P11
SEQ1_DIR=/hive/data/genomes/grcH38P11/grcH38P11.2bit
SEQ1_LEN=/hive/data/genomes/grcH38P11/chrom.sizes
SEQ1_CHUNK=40000000
SEQ1_LIMIT=30
SEQ1_LAP=10000

# QUERY: Mallard duck anaPla1
SEQ2_DIR=/hive/data/genomes/anaPla1/anaPla1.2bit
SEQ2_LEN=/hive/data/genomes/anaPla1/chrom.sizes
SEQ2_CHUNK=20000000
SEQ2_LIMIT=200
SEQ2_LAP=0

BASE=/hive/data/genomes/grcH38P11/bed/lastzAnaPla1.2015-02-13
TMPDIR=/dev/shm
_EOF_
    # << happy emacs

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl `pwd`/DEF -verbose=2 \
        -chainMinScore=5000 -chainLinearGap=loose \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > do.log 2>&1
    # real    548m49.861s

    cat fb.grcH38P11.chainAnaPla1Link.txt
    # 130130831 bases of 3049335806 (4.268%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -buildDir=`pwd` grcH38P11 anaPla1) > rbest.log 2>&1 &
    # real    40m39.914s

    # and for the swap:
    mkdir /hive/data/genomes/anaPla1/bed/blastz.grcH38P11.swap
    cd /hive/data/genomes/anaPla1/bed/blastz.grcH38P11.swap

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl -verbose=2 \
      /hive/data/genomes/grcH38P11/bed/lastzAnaPla1.2015-02-13/DEF \
        -swap -chainMinScore=5000 -chainLinearGap=loose \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > swap.log 2>&1
    #  real    18m52.863s

    cat fb.anaPla1.chainGrcH38P11Link.txt
    # 103561071 bases of 1069972754 (9.679%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -buildDir=`pwd` anaPla1 grcH38P11) > rbest.log 2>&1
    # real    68m35.285s

#########################################################################
# LASTZ human/grcH38P11 vs. turkey/melGal1 - (TODO - 2015-02-13 - Angie)
    mkdir /hive/data/genomes/grcH38P11/bed/lastzMelGal1.2015-02-13
    cd /hive/data/genomes/grcH38P11/bed/lastzMelGal1.2015-02-13

    cat << '_EOF_' > DEF
# human vs turkey
BLASTZ=/cluster/bin/penn/lastz-distrib-1.03.54/bin/lastz
BLASTZ_O=400
BLASTZ_E=30
BLASTZ_Y=3400
BLASTZ_L=6000
BLASTZ_K=2200
BLASTZ_M=50
BLASTZ_Q=/scratch/data/blastz/HoxD55.q
#      A    C    G    T
#     91  -90  -25 -100
#    -90  100 -100  -25
#    -25 -100  100  -90
#   -100  -25  -90  91

# TARGET: human grcH38P11
SEQ1_DIR=/hive/data/genomes/grcH38P11/grcH38P11.2bit
SEQ1_LEN=/hive/data/genomes/grcH38P11/chrom.sizes
SEQ1_CHUNK=40000000
SEQ1_LIMIT=30
SEQ1_LAP=10000

# QUERY: turkey melGal1
SEQ2_DIR=/hive/data/genomes/melGal1/melGal1.2bit
SEQ2_LEN=/hive/data/genomes/melGal1/chrom.sizes
SEQ2_CHUNK=20000000
SEQ2_LIMIT=30
SEQ2_LAP=0

BASE=/hive/data/genomes/grcH38P11/bed/lastzMelGal1.2015-02-13
TMPDIR=/dev/shm
_EOF_
    # << happy emacs

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl `pwd`/DEF -verbose=2 \
        -chainMinScore=5000 -chainLinearGap=loose \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > do.log 2>&1
    # real    655m4.317s

    cat fb.grcH38P11.chainMelGal1Link.txt
    # 131975070 bases of 3049335806 (4.328%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -buildDir=`pwd` grcH38P11 melGal1) > rbest.log 2>&1 &
    # real    14m2.560s

    # and for the swap:
    mkdir /hive/data/genomes/melGal1/bed/blastz.grcH38P11.swap
    cd /hive/data/genomes/melGal1/bed/blastz.grcH38P11.swap

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl -verbose=2 \
      /hive/data/genomes/grcH38P11/bed/lastzMelGal1.2015-02-13/DEF \
        -swap -chainMinScore=5000 -chainLinearGap=loose \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > swap.log 2>&1
    #  real    12m24.021s

    cat fb.melGal1.chainGrcH38P11Link.txt
    # 102272881 bases of 935922386 (10.927%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -buildDir=`pwd` melGal1 grcH38P11) > rbest.log 2>&1
    # real    7m21.946s

#########################################################################
# LASTZ human/grcH38P11 vs. Saker falcon/falChe1 - (TODO - 2015-02-13 - Angie)
    mkdir /hive/data/genomes/grcH38P11/bed/lastzFalChe1.2015-02-13
    cd /hive/data/genomes/grcH38P11/bed/lastzFalChe1.2015-02-13

    cat << '_EOF_' > DEF
# human vs Saker falcon
BLASTZ=/cluster/bin/penn/lastz-distrib-1.03.54/bin/lastz
BLASTZ_O=400
BLASTZ_E=30
BLASTZ_Y=3400
BLASTZ_L=6000
BLASTZ_K=2200
BLASTZ_M=50
BLASTZ_Q=/scratch/data/blastz/HoxD55.q
#      A    C    G    T
#     91  -90  -25 -100
#    -90  100 -100  -25
#    -25 -100  100  -90
#   -100  -25  -90  91

# TARGET: human grcH38P11
SEQ1_DIR=/hive/data/genomes/grcH38P11/grcH38P11.2bit
SEQ1_LEN=/hive/data/genomes/grcH38P11/chrom.sizes
SEQ1_CHUNK=40000000
SEQ1_LIMIT=30
SEQ1_LAP=10000

# QUERY: Saker falcon falChe1
SEQ2_DIR=/hive/data/genomes/falChe1/falChe1.2bit
SEQ2_LEN=/hive/data/genomes/falChe1/chrom.sizes
SEQ2_CHUNK=20000000
SEQ2_LIMIT=30
SEQ2_LAP=0

BASE=/hive/data/genomes/grcH38P11/bed/lastzFalChe1.2015-02-13
TMPDIR=/dev/shm
_EOF_
    # << happy emacs

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl `pwd`/DEF -verbose=2 \
        -chainMinScore=5000 -chainLinearGap=loose \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > do.log 2>&1
    # real    542m16.464s

    cat fb.grcH38P11.chainFalChe1Link.txt
    # 147225031 bases of 3049335806 (4.828%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -buildDir=`pwd` grcH38P11 falChe1) > rbest.log 2>&1 &
    # real    8m23.849s

    # and for the swap:
    mkdir /hive/data/genomes/falChe1/bed/blastz.grcH38P11.swap
    cd /hive/data/genomes/falChe1/bed/blastz.grcH38P11.swap

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl -verbose=2 \
      /hive/data/genomes/grcH38P11/bed/lastzFalChe1.2015-02-13/DEF \
        -swap -chainMinScore=5000 -chainLinearGap=loose \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > swap.log 2>&1
    #  real    14m3.049s

    cat fb.falChe1.chainGrcH38P11Link.txt
    # 113693444 bases of 1150993769 (9.878%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -buildDir=`pwd` falChe1 grcH38P11) > rbest.log 2>&1
    # real    18m4.600s

#########################################################################
# LASTZ human/grcH38P11 vs. Peregrine falcon/falPer1 - (TODO - 2015-02-13 - Angie)
    mkdir /hive/data/genomes/grcH38P11/bed/lastzFalPer1.2015-02-13
    cd /hive/data/genomes/grcH38P11/bed/lastzFalPer1.2015-02-13

    cat << '_EOF_' > DEF
# human vs Peregrine falcon
BLASTZ=/cluster/bin/penn/lastz-distrib-1.03.54/bin/lastz
BLASTZ_O=400
BLASTZ_E=30
BLASTZ_Y=3400
BLASTZ_L=6000
BLASTZ_K=2200
BLASTZ_M=50
BLASTZ_Q=/scratch/data/blastz/HoxD55.q
#      A    C    G    T
#     91  -90  -25 -100
#    -90  100 -100  -25
#    -25 -100  100  -90
#   -100  -25  -90  91

# TARGET: human grcH38P11
SEQ1_DIR=/hive/data/genomes/grcH38P11/grcH38P11.2bit
SEQ1_LEN=/hive/data/genomes/grcH38P11/chrom.sizes
SEQ1_CHUNK=40000000
SEQ1_LIMIT=30
SEQ1_LAP=10000

# QUERY: Peregrine falcon falPer1
SEQ2_DIR=/hive/data/genomes/falPer1/falPer1.2bit
SEQ2_LEN=/hive/data/genomes/falPer1/chrom.sizes
SEQ2_CHUNK=20000000
SEQ2_LIMIT=30
SEQ2_LAP=0

BASE=/hive/data/genomes/grcH38P11/bed/lastzFalPer1.2015-02-13
TMPDIR=/dev/shm
_EOF_
    # << happy emacs

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl `pwd`/DEF -verbose=2 \
        -chainMinScore=5000 -chainLinearGap=loose \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > do.log 2>&1
    # real    551m19.392s

    cat fb.grcH38P11.chainFalPer1Link.txt
    # 150205756 bases of 3049335806 (4.926%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -buildDir=`pwd` grcH38P11 falPer1) > rbest.log 2>&1 &
    # real    6m7.675s

    # and for the swap:
    mkdir /hive/data/genomes/falPer1/bed/blastz.grcH38P11.swap
    cd /hive/data/genomes/falPer1/bed/blastz.grcH38P11.swap

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl -verbose=2 \
      /hive/data/genomes/grcH38P11/bed/lastzFalPer1.2015-02-13/DEF \
        -swap -chainMinScore=5000 -chainLinearGap=loose \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > swap.log 2>&1
    #  real    14m47.580s

    cat fb.falPer1.chainGrcH38P11Link.txt
    # 115649151 bases of 1153404357 (10.027%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -buildDir=`pwd` falPer1 grcH38P11) > rbest.log 2>&1
    # real    25m36.021s

#########################################################################
# LASTZ human/grcH38P11 vs. parrot/amaVit1 - (TODO - 2015-02-13 - Angie)
    mkdir /hive/data/genomes/grcH38P11/bed/lastzAmaVit1.2015-02-13
    cd /hive/data/genomes/grcH38P11/bed/lastzAmaVit1.2015-02-13

    cat << '_EOF_' > DEF
# human vs parrot
BLASTZ=/cluster/bin/penn/lastz-distrib-1.03.54/bin/lastz
BLASTZ_O=400
BLASTZ_E=30
BLASTZ_Y=3400
BLASTZ_L=6000
BLASTZ_K=2200
BLASTZ_M=50
BLASTZ_Q=/scratch/data/blastz/HoxD55.q
#      A    C    G    T
#     91  -90  -25 -100
#    -90  100 -100  -25
#    -25 -100  100  -90
#   -100  -25  -90  91

# TARGET: human grcH38P11
SEQ1_DIR=/hive/data/genomes/grcH38P11/grcH38P11.2bit
SEQ1_LEN=/hive/data/genomes/grcH38P11/chrom.sizes
SEQ1_CHUNK=40000000
SEQ1_LIMIT=30
SEQ1_LAP=10000

# QUERY: parrot amaVit1
SEQ2_DIR=/hive/data/genomes/amaVit1/amaVit1.2bit
SEQ2_LEN=/hive/data/genomes/amaVit1/chrom.sizes
SEQ2_CHUNK=20000000
SEQ2_LIMIT=200
SEQ2_LAP=0

BASE=/hive/data/genomes/grcH38P11/bed/lastzAmaVit1.2015-02-13
TMPDIR=/dev/shm
_EOF_
    # << happy emacs

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl `pwd`/DEF -verbose=2 \
        -chainMinScore=5000 -chainLinearGap=loose \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > do.log 2>&1
    # real    657m27.659s

    cat fb.grcH38P11.chainAmaVit1Link.txt
    # 127630825 bases of 3049335806 (4.186%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -buildDir=`pwd` grcH38P11 amaVit1) > rbest.log 2>&1 &
    # real    9m2.061s

    # and for the swap:
    mkdir /hive/data/genomes/amaVit1/bed/blastz.grcH38P11.swap
    cd /hive/data/genomes/amaVit1/bed/blastz.grcH38P11.swap

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl -verbose=2 \
      /hive/data/genomes/grcH38P11/bed/lastzAmaVit1.2015-02-13/DEF \
        -swap -chainMinScore=5000 -chainLinearGap=loose \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > swap.log 2>&1
    #  real    76m6.072s

    cat fb.amaVit1.chainGrcH38P11Link.txt
    # 106957200 bases of 1128255752 (9.480%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -buildDir=`pwd` amaVit1 grcH38P11) > rbest.log 2>&1
    # real    107m34.617s

#########################################################################
# LASTZ human/grcH38P11 vs. Scarlet macaw/araMac1 - (TODO - 2015-02-17 - Angie)
    mkdir /hive/data/genomes/grcH38P11/bed/lastzAraMac1.2015-02-17
    cd /hive/data/genomes/grcH38P11/bed/lastzAraMac1.2015-02-17

    cat << '_EOF_' > DEF
# human vs Scarlet macaw
BLASTZ=/cluster/bin/penn/lastz-distrib-1.03.54/bin/lastz
BLASTZ_O=400
BLASTZ_E=30
BLASTZ_Y=3400
BLASTZ_L=6000
BLASTZ_K=2200
BLASTZ_M=50
BLASTZ_Q=/scratch/data/blastz/HoxD55.q
#      A    C    G    T
#     91  -90  -25 -100
#    -90  100 -100  -25
#    -25 -100  100  -90
#   -100  -25  -90  91

# TARGET: human grcH38P11
SEQ1_DIR=/hive/data/genomes/grcH38P11/grcH38P11.2bit
SEQ1_LEN=/hive/data/genomes/grcH38P11/chrom.sizes
SEQ1_CHUNK=40000000
SEQ1_LIMIT=30
SEQ1_LAP=10000

# QUERY: Scarlet macaw araMac1
SEQ2_DIR=/hive/data/genomes/araMac1/araMac1.2bit
SEQ2_LEN=/hive/data/genomes/araMac1/chrom.sizes
SEQ2_CHUNK=20000000
SEQ2_LIMIT=200
SEQ2_LAP=0

BASE=/hive/data/genomes/grcH38P11/bed/lastzAraMac1.2015-02-17
TMPDIR=/dev/shm
_EOF_
    # << happy emacs

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl `pwd`/DEF -verbose=2 \
        -chainMinScore=5000 -chainLinearGap=loose \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > do.log 2>&1
    # real    246m48.471s

    cat fb.grcH38P11.chainAraMac1Link.txt
    # 115478631 bases of 3049335806 (3.787%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -buildDir=`pwd` grcH38P11 araMac1) > rbest.log 2>&1 &
    # real    9m59.145s   # lost rbest.log

    # and for the swap:
    mkdir /hive/data/genomes/araMac1/bed/blastz.grcH38P11.swap
    cd /hive/data/genomes/araMac1/bed/blastz.grcH38P11.swap

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl -verbose=2 \
      /hive/data/genomes/grcH38P11/bed/lastzAraMac1.2015-02-17/DEF \
        -swap -chainMinScore=5000 -chainLinearGap=loose \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > swap.log 2>&1
    #  real    70m16.338s

    cat fb.araMac1.chainGrcH38P11Link.txt
    # 90173740 bases of 997636166 (9.039%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -buildDir=`pwd` araMac1 grcH38P11) > rbest.log 2>&1
    # real    42m44.255s

#########################################################################
# LASTZ human/grcH38P11 vs. Tibetan ground jay/pseHum1 - (TODO - 2015-02-17 - Angie)
    mkdir /hive/data/genomes/grcH38P11/bed/lastzPseHum1.2015-02-17
    cd /hive/data/genomes/grcH38P11/bed/lastzPseHum1.2015-02-17

    cat << '_EOF_' > DEF
# human vs Tibetan ground jay
BLASTZ=/cluster/bin/penn/lastz-distrib-1.03.54/bin/lastz
BLASTZ_O=400
BLASTZ_E=30
BLASTZ_Y=3400
BLASTZ_L=6000
BLASTZ_K=2200
BLASTZ_M=50
BLASTZ_Q=/scratch/data/blastz/HoxD55.q
#      A    C    G    T
#     91  -90  -25 -100
#    -90  100 -100  -25
#    -25 -100  100  -90
#   -100  -25  -90  91

# TARGET: human grcH38P11
SEQ1_DIR=/hive/data/genomes/grcH38P11/grcH38P11.2bit
SEQ1_LEN=/hive/data/genomes/grcH38P11/chrom.sizes
SEQ1_CHUNK=40000000
SEQ1_LIMIT=30
SEQ1_LAP=10000

# QUERY: Tibetan ground jay pseHum1
SEQ2_DIR=/hive/data/genomes/pseHum1/pseHum1.2bit
SEQ2_LEN=/hive/data/genomes/pseHum1/chrom.sizes
SEQ2_CHUNK=20000000
SEQ2_LIMIT=30
SEQ2_LAP=0

BASE=/hive/data/genomes/grcH38P11/bed/lastzPseHum1.2015-02-17
TMPDIR=/dev/shm
_EOF_
    # << happy emacs

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl `pwd`/DEF -verbose=2 \
        -chainMinScore=5000 -chainLinearGap=loose \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > do.log 2>&1
    # real    70m22.110s
    # continuing after cluster trouble:
    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl `pwd`/DEF -verbose=2 \
        -chainMinScore=5000 -chainLinearGap=loose \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -continue=cat -syntenicNet) > cat.log 2>&1
    # real    34m11.495s

    cat fb.grcH38P11.chainPseHum1Link.txt
    # 156923153 bases of 3049335806 (5.146%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -workhorse=hgwdev -buildDir=`pwd` grcH38P11 pseHum1) \
       > rbest.log 2>&1 &
    # real    11m52.623s

    # and for the swap:
    mkdir /hive/data/genomes/pseHum1/bed/blastz.grcH38P11.swap
    cd /hive/data/genomes/pseHum1/bed/blastz.grcH38P11.swap

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl -verbose=2 \
      /hive/data/genomes/grcH38P11/bed/lastzPseHum1.2015-02-17/DEF \
        -swap -chainMinScore=5000 -chainLinearGap=loose \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > swap.log 2>&1
    #  real    14m38.524s

    cat fb.pseHum1.chainGrcH38P11Link.txt
    # 122950927 bases of 1030030436 (11.937%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -workhorse=hgwdev -buildDir=`pwd` pseHum1 grcH38P11) \
       > rbest.log 2>&1
    # real    11m38.841s

#########################################################################
# LASTZ human/grcH38P11 vs. budgerigar/melUnd1 - (TODO - 2015-02-17 - Angie)
    mkdir /hive/data/genomes/grcH38P11/bed/lastzMelUnd1.2015-02-17
    cd /hive/data/genomes/grcH38P11/bed/lastzMelUnd1.2015-02-17

    cat << '_EOF_' > DEF
# human vs budgerigar
BLASTZ=/cluster/bin/penn/lastz-distrib-1.03.54/bin/lastz
BLASTZ_O=400
BLASTZ_E=30
BLASTZ_Y=3400
BLASTZ_L=6000
BLASTZ_K=2200
BLASTZ_M=50
BLASTZ_Q=/scratch/data/blastz/HoxD55.q
#      A    C    G    T
#     91  -90  -25 -100
#    -90  100 -100  -25
#    -25 -100  100  -90
#   -100  -25  -90  91

# TARGET: human grcH38P11
SEQ1_DIR=/hive/data/genomes/grcH38P11/grcH38P11.2bit
SEQ1_LEN=/hive/data/genomes/grcH38P11/chrom.sizes
SEQ1_CHUNK=40000000
SEQ1_LIMIT=30
SEQ1_LAP=10000

# QUERY: budgerigar melUnd1
SEQ2_DIR=/hive/data/genomes/melUnd1/melUnd1.2bit
SEQ2_LEN=/hive/data/genomes/melUnd1/chrom.sizes
SEQ2_CHUNK=20000000
SEQ2_LIMIT=30
SEQ2_LAP=0

BASE=/hive/data/genomes/grcH38P11/bed/lastzMelUnd1.2015-02-17
TMPDIR=/dev/shm
_EOF_
    # << happy emacs

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl `pwd`/DEF -verbose=2 \
        -chainMinScore=5000 -chainLinearGap=loose \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > do.log 2>&1
    # real    2082m35.909s

    cat fb.grcH38P11.chainMelUnd1Link.txt
    # 136423508 bases of 3049335806 (4.474%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -workhorse=hgwdev -buildDir=`pwd` grcH38P11 melUnd1) \
       > rbest.log 2>&1 &
    # real    9m33.306s

    # and for the swap:
    mkdir /hive/data/genomes/melUnd1/bed/blastz.grcH38P11.swap
    cd /hive/data/genomes/melUnd1/bed/blastz.grcH38P11.swap

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl -verbose=2 \
      /hive/data/genomes/grcH38P11/bed/lastzMelUnd1.2015-02-17/DEF \
        -swap -chainMinScore=5000 -chainLinearGap=loose \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > swap.log 2>&1
    #  real    12m38.168s

    cat fb.melUnd1.chainGrcH38P11Link.txt
    # 107164699 bases of 1086614815 (9.862%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -workhorse=hgwdev -buildDir=`pwd` melUnd1 grcH38P11) \
       > rbest.log 2>&1
    # real    9m40.749s

#########################################################################
# LASTZ human/grcH38P11 vs. Collard flycatcher/ficAlb2 - (TODO - 2015-02-17 - Angie)
    mkdir /hive/data/genomes/grcH38P11/bed/lastzFicAlb2.2015-02-17
    cd /hive/data/genomes/grcH38P11/bed/lastzFicAlb2.2015-02-17

    cat << '_EOF_' > DEF
# human vs Collard flycatcher
BLASTZ=/cluster/bin/penn/lastz-distrib-1.03.54/bin/lastz
BLASTZ_O=400
BLASTZ_E=30
BLASTZ_Y=3400
BLASTZ_L=6000
BLASTZ_K=2200
BLASTZ_M=50
BLASTZ_Q=/scratch/data/blastz/HoxD55.q
#      A    C    G    T
#     91  -90  -25 -100
#    -90  100 -100  -25
#    -25 -100  100  -90
#   -100  -25  -90  91

# TARGET: human grcH38P11
SEQ1_DIR=/hive/data/genomes/grcH38P11/grcH38P11.2bit
SEQ1_LEN=/hive/data/genomes/grcH38P11/chrom.sizes
SEQ1_CHUNK=40000000
SEQ1_LIMIT=30
SEQ1_LAP=10000

# QUERY: Collard flycatcher ficAlb2
SEQ2_DIR=/hive/data/genomes/ficAlb2/ficAlb2.2bit
SEQ2_LEN=/hive/data/genomes/ficAlb2/chrom.sizes
SEQ2_CHUNK=20000000
SEQ2_LIMIT=30
SEQ2_LAP=0

BASE=/hive/data/genomes/grcH38P11/bed/lastzFicAlb2.2015-02-17
TMPDIR=/dev/shm
_EOF_
    # << happy emacs

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl `pwd`/DEF -verbose=2 \
        -chainMinScore=5000 -chainLinearGap=loose \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > do.log 2>&1
    # real    1978m13.358s

    cat fb.grcH38P11.chainFicAlb2Link.txt
    # 147048785 bases of 3049335806 (4.822%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -buildDir=`pwd` grcH38P11 ficAlb2) > rbest.log 2>&1 &
    # real    10m49.556s

    # and for the swap:
    mkdir /hive/data/genomes/ficAlb2/bed/blastz.grcH38P11.swap
    cd /hive/data/genomes/ficAlb2/bed/blastz.grcH38P11.swap

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl -verbose=2 \
      /hive/data/genomes/grcH38P11/bed/lastzFicAlb2.2015-02-17/DEF \
        -swap -chainMinScore=5000 -chainLinearGap=loose \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > swap.log 2>&1
    #  real    15m26.251s

    cat fb.ficAlb2.chainGrcH38P11Link.txt
    # 118476285 bases of 1102325870 (10.748%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -workhorse=hgwdev -buildDir=`pwd` ficAlb2 grcH38P11) \
        > rbest.log 2>&1
    # real    12m43.894s

#########################################################################
# LASTZ human/grcH38P11 vs. White throaqted sparrow/zonAlb1 - (TODO - 2015-02-17 - Angie)
    mkdir /hive/data/genomes/grcH38P11/bed/lastzZonAlb1.2015-02-17
    cd /hive/data/genomes/grcH38P11/bed/lastzZonAlb1.2015-02-17

    cat << '_EOF_' > DEF
# human vs White throaqted sparrow
BLASTZ=/cluster/bin/penn/lastz-distrib-1.03.54/bin/lastz
BLASTZ_O=400
BLASTZ_E=30
BLASTZ_Y=3400
BLASTZ_L=6000
BLASTZ_K=2200
BLASTZ_M=50
BLASTZ_Q=/scratch/data/blastz/HoxD55.q
#      A    C    G    T
#     91  -90  -25 -100
#    -90  100 -100  -25
#    -25 -100  100  -90
#   -100  -25  -90  91

# TARGET: human grcH38P11
SEQ1_DIR=/hive/data/genomes/grcH38P11/grcH38P11.2bit
SEQ1_LEN=/hive/data/genomes/grcH38P11/chrom.sizes
SEQ1_CHUNK=40000000
SEQ1_LIMIT=30
SEQ1_LAP=10000

# QUERY: White throaqted sparrow zonAlb1
SEQ2_DIR=/hive/data/genomes/zonAlb1/zonAlb1.2bit
SEQ2_LEN=/hive/data/genomes/zonAlb1/chrom.sizes
SEQ2_CHUNK=20000000
SEQ2_LIMIT=30
SEQ2_LAP=0

BASE=/hive/data/genomes/grcH38P11/bed/lastzZonAlb1.2015-02-17
TMPDIR=/dev/shm
_EOF_
    # << happy emacs

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl `pwd`/DEF -verbose=2 \
        -chainMinScore=5000 -chainLinearGap=loose \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > do.log 2>&1
    # real    1615m23.324s

    cat fb.grcH38P11.chainZonAlb1Link.txt
    # 137040575 bases of 3049335806 (4.494%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -buildDir=`pwd` grcH38P11 zonAlb1) > rbest.log 2>&1 &
    # real    6m4.340s

    # and for the swap:
    mkdir /hive/data/genomes/zonAlb1/bed/blastz.grcH38P11.swap
    cd /hive/data/genomes/zonAlb1/bed/blastz.grcH38P11.swap

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl -verbose=2 \
      /hive/data/genomes/grcH38P11/bed/lastzZonAlb1.2015-02-17/DEF \
        -swap -chainMinScore=5000 -chainLinearGap=loose \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > swap.log 2>&1
    #  real    12m59.040s

    cat fb.zonAlb1.chainGrcH38P11Link.txt
    # 106367271 bases of 1006303327 (10.570%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -buildDir=`pwd` zonAlb1 grcH38P11) > rbest.log 2>&1
    # real    6m51.403s

#########################################################################
# LASTZ human/grcH38P11 vs. Medium ground finch/geoFor1 - (TODO - 2015-02-17 - Angie)
    mkdir /hive/data/genomes/grcH38P11/bed/lastzGeoFor1.2015-02-17
    cd /hive/data/genomes/grcH38P11/bed/lastzGeoFor1.2015-02-17

    cat << '_EOF_' > DEF
# human vs Medium ground finch
BLASTZ=/cluster/bin/penn/lastz-distrib-1.03.54/bin/lastz
BLASTZ_O=400
BLASTZ_E=30
BLASTZ_Y=3400
BLASTZ_L=6000
BLASTZ_K=2200
BLASTZ_M=50
BLASTZ_Q=/scratch/data/blastz/HoxD55.q
#      A    C    G    T
#     91  -90  -25 -100
#    -90  100 -100  -25
#    -25 -100  100  -90
#   -100  -25  -90  91

# TARGET: human grcH38P11
SEQ1_DIR=/hive/data/genomes/grcH38P11/grcH38P11.2bit
SEQ1_LEN=/hive/data/genomes/grcH38P11/chrom.sizes
SEQ1_CHUNK=40000000
SEQ1_LIMIT=30
SEQ1_LAP=10000

# QUERY: Medium ground finch geoFor1
SEQ2_DIR=/hive/data/genomes/geoFor1/geoFor1.2bit
SEQ2_LEN=/hive/data/genomes/geoFor1/chrom.sizes
SEQ2_CHUNK=20000000
SEQ2_LIMIT=30
SEQ2_LAP=0

BASE=/hive/data/genomes/grcH38P11/bed/lastzGeoFor1.2015-02-17
TMPDIR=/dev/shm
_EOF_
    # << happy emacs

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl `pwd`/DEF -verbose=2 \
        -chainMinScore=5000 -chainLinearGap=loose \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > do.log 2>&1
    # real    2097m14.874s

    cat fb.grcH38P11.chainGeoFor1Link.txt
    # 135529241 bases of 3049335806 (4.445%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -workhorse=hgwdev -buildDir=`pwd` grcH38P11 geoFor1) \
       > rbest.log 2>&1 &
    # real    9m9.547s

    # and for the swap:
    mkdir /hive/data/genomes/geoFor1/bed/blastz.grcH38P11.swap
    cd /hive/data/genomes/geoFor1/bed/blastz.grcH38P11.swap

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl -verbose=2 \
      /hive/data/genomes/grcH38P11/bed/lastzGeoFor1.2015-02-17/DEF \
        -swap -chainMinScore=5000 -chainLinearGap=loose \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > swap.log 2>&1
    #  real    13m19.205s

    cat fb.geoFor1.chainGrcH38P11Link.txt
    # 107944681 bases of 1041286029 (10.366%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -workhorse=hgwdev -buildDir=`pwd` geoFor1 grcH38P11) \
       > rbest.log 2>&1
    # real    9m35.765s

#########################################################################
# LASTZ human/grcH38P11 vs. Zebra finch/taeGut2 - (TODO - 2015-02-17 - Angie)
    mkdir /hive/data/genomes/grcH38P11/bed/lastzTaeGut2.2015-02-17
    cd /hive/data/genomes/grcH38P11/bed/lastzTaeGut2.2015-02-17

    cat << '_EOF_' > DEF
# human vs Zebra finch
BLASTZ=/cluster/bin/penn/lastz-distrib-1.03.54/bin/lastz
BLASTZ_O=400
BLASTZ_E=30
BLASTZ_Y=3400
BLASTZ_L=6000
BLASTZ_K=2200
BLASTZ_M=50
BLASTZ_Q=/scratch/data/blastz/HoxD55.q
#      A    C    G    T
#     91  -90  -25 -100
#    -90  100 -100  -25
#    -25 -100  100  -90
#   -100  -25  -90  91

# TARGET: human grcH38P11
SEQ1_DIR=/hive/data/genomes/grcH38P11/grcH38P11.2bit
SEQ1_LEN=/hive/data/genomes/grcH38P11/chrom.sizes
SEQ1_CHUNK=40000000
SEQ1_LIMIT=30
SEQ1_LAP=10000

# QUERY: Zebra finch taeGut2
SEQ2_DIR=/hive/data/genomes/taeGut2/taeGut2.2bit
SEQ2_LEN=/hive/data/genomes/taeGut2/chrom.sizes
SEQ2_CHUNK=20000000
SEQ2_LIMIT=30
SEQ2_LAP=0

BASE=/hive/data/genomes/grcH38P11/bed/lastzTaeGut2.2015-02-17
TMPDIR=/dev/shm
_EOF_
    # << happy emacs

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl `pwd`/DEF -verbose=2 \
        -chainMinScore=5000 -chainLinearGap=loose \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > do.log 2>&1
    # real    3301m5.574s

    cat fb.grcH38P11.chainTaeGut2Link.txt
    # 179692554 bases of 3049335806 (5.893%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -workhorse=hgwdev -buildDir=`pwd` grcH38P11 taeGut2) \
       > rbest.log 2>&1 &
    # real    14m16.442s

    # and for the swap:
    mkdir /hive/data/genomes/taeGut2/bed/blastz.grcH38P11.swap
    cd /hive/data/genomes/taeGut2/bed/blastz.grcH38P11.swap

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl -verbose=2 \
      /hive/data/genomes/grcH38P11/bed/lastzTaeGut2.2015-02-17/DEF \
        -swap -chainMinScore=5000 -chainLinearGap=loose \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > swap.log 2>&1
    #  real    37m48.256s

    cat fb.taeGut2.chainGrcH38P11Link.txt
    # 151099393 bases of 1222864691 (12.356%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -workhorse=hgwdev -buildDir=`pwd` taeGut2 grcH38P11) \
       > rbest.log 2>&1
    # real    20m21.580s

#########################################################################
# LASTZ human/grcH38P11 vs. Atlantic cod/gadMor1 - (TODO - 2015-02-17 - Angie)
    mkdir /hive/data/genomes/grcH38P11/bed/lastzGadMor1.2015-02-17
    cd /hive/data/genomes/grcH38P11/bed/lastzGadMor1.2015-02-17

    cat << '_EOF_' > DEF
# human vs Atlantic cod
BLASTZ=/cluster/bin/penn/lastz-distrib-1.03.54/bin/lastz
BLASTZ_O=400
BLASTZ_E=30
BLASTZ_Y=3400
BLASTZ_L=6000
BLASTZ_K=2200
BLASTZ_M=50
BLASTZ_Q=/scratch/data/blastz/HoxD55.q
#      A    C    G    T
#     91  -90  -25 -100
#    -90  100 -100  -25
#    -25 -100  100  -90
#   -100  -25  -90  91

# TARGET: human grcH38P11
SEQ1_DIR=/hive/data/genomes/grcH38P11/grcH38P11.2bit
SEQ1_LEN=/hive/data/genomes/grcH38P11/chrom.sizes
SEQ1_CHUNK=40000000
SEQ1_LIMIT=30
SEQ1_LAP=10000

# QUERY: Atlantic cod gadMor1
SEQ2_DIR=/hive/data/genomes/gadMor1/gadMor1.2bit
SEQ2_LEN=/hive/data/genomes/gadMor1/chrom.sizes
SEQ2_CHUNK=20000000
SEQ2_LIMIT=500
SEQ2_LAP=0

BASE=/hive/data/genomes/grcH38P11/bed/lastzGadMor1.2015-02-17
TMPDIR=/dev/shm
_EOF_
    # << happy emacs

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl `pwd`/DEF -verbose=2 \
        -chainMinScore=5000 -chainLinearGap=loose \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > do.log 2>&1
    # real    1588m35.829s

    cat fb.grcH38P11.chainGadMor1Link.txt
    # 50624248 bases of 3049335806 (1.660%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -buildDir=`pwd` grcH38P11 gadMor1) > rbest.log 2>&1 &
    # real    4m28.029s

    # and for the swap:
    mkdir /hive/data/genomes/gadMor1/bed/blastz.grcH38P11.swap
    cd /hive/data/genomes/gadMor1/bed/blastz.grcH38P11.swap

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl -verbose=2 \
      /hive/data/genomes/grcH38P11/bed/lastzGadMor1.2015-02-17/DEF \
        -swap -chainMinScore=5000 -chainLinearGap=loose \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > swap.log 2>&1
    #  real    74m26.591s

    cat fb.gadMor1.chainGrcH38P11Link.txt
    # 42019467 bases of 608038597 (6.911%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -buildDir=`pwd` gadMor1 grcH38P11) > rbest.log 2>&1
    # real    35m52.207s

#########################################################################
# LASTZ human/grcH38P11 vs. Stickleback/gasAcu1 - (TODO - 2015-02-17 - Angie)
    mkdir /hive/data/genomes/grcH38P11/bed/lastzGasAcu1.2015-02-17
    cd /hive/data/genomes/grcH38P11/bed/lastzGasAcu1.2015-02-17

    cat << '_EOF_' > DEF
# human vs Stickleback
BLASTZ=/cluster/bin/penn/lastz-distrib-1.03.54/bin/lastz
BLASTZ_O=400
BLASTZ_E=30
BLASTZ_Y=3400
BLASTZ_L=6000
BLASTZ_K=2200
BLASTZ_M=50
BLASTZ_Q=/scratch/data/blastz/HoxD55.q
#      A    C    G    T
#     91  -90  -25 -100
#    -90  100 -100  -25
#    -25 -100  100  -90
#   -100  -25  -90  91

# TARGET: human grcH38P11
SEQ1_DIR=/hive/data/genomes/grcH38P11/grcH38P11.2bit
SEQ1_LEN=/hive/data/genomes/grcH38P11/chrom.sizes
SEQ1_CHUNK=40000000
SEQ1_LIMIT=30
SEQ1_LAP=10000

# QUERY: Stickleback gasAcu1
SEQ2_DIR=/hive/data/genomes/gasAcu1/gasAcu1.2bit
SEQ2_LEN=/hive/data/genomes/gasAcu1/chrom.sizes
SEQ2_CHUNK=20000000
SEQ2_LIMIT=1
SEQ2_LAP=0

BASE=/hive/data/genomes/grcH38P11/bed/lastzGasAcu1.2015-02-17
TMPDIR=/dev/shm
_EOF_
    # << happy emacs

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl `pwd`/DEF -verbose=2 \
        -chainMinScore=5000 -chainLinearGap=loose \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > do.log 2>&1
    # real    1053m23.074s

    cat fb.grcH38P11.chainGasAcu1Link.txt
    # 63437294 bases of 3049335806 (2.080%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -buildDir=`pwd` grcH38P11 gasAcu1) > rbest.log 2>&1 &
    # about 6 minutes - lost rbest.log

    # and for the swap:
    mkdir /hive/data/genomes/gasAcu1/bed/blastz.grcH38P11.swap
    cd /hive/data/genomes/gasAcu1/bed/blastz.grcH38P11.swap

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl -verbose=2 \
      /hive/data/genomes/grcH38P11/bed/lastzGasAcu1.2015-02-17/DEF \
        -swap -chainMinScore=5000 -chainLinearGap=loose \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > swap.log 2>&1
    #  real    9m14.802s

    cat fb.gasAcu1.chainGrcH38P11Link.txt
    # 53397634 bases of 446627861 (11.956%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -buildDir=`pwd` gasAcu1 grcH38P11) > rbest.log 2>&1
    # real    10m7.401s

#########################################################################
# LASTZ human/grcH38P11 vs. Nile tilapia/oreNil2 - (TODO - 2015-02-17 - Angie)
    mkdir /hive/data/genomes/grcH38P11/bed/lastzOreNil2.2015-02-17
    cd /hive/data/genomes/grcH38P11/bed/lastzOreNil2.2015-02-17

    cat << '_EOF_' > DEF
# human vs Nile tilapia
BLASTZ=/cluster/bin/penn/lastz-distrib-1.03.54/bin/lastz
BLASTZ_O=400
BLASTZ_E=30
BLASTZ_Y=3400
BLASTZ_L=6000
BLASTZ_K=2200
BLASTZ_M=50
BLASTZ_Q=/scratch/data/blastz/HoxD55.q
#      A    C    G    T
#     91  -90  -25 -100
#    -90  100 -100  -25
#    -25 -100  100  -90
#   -100  -25  -90  91

# TARGET: human grcH38P11
SEQ1_DIR=/hive/data/genomes/grcH38P11/grcH38P11.2bit
SEQ1_LEN=/hive/data/genomes/grcH38P11/chrom.sizes
SEQ1_CHUNK=40000000
SEQ1_LIMIT=30
SEQ1_LAP=10000

# QUERY: Nile tilapia oreNil2
SEQ2_DIR=/hive/data/genomes/oreNil2/oreNil2.2bit
SEQ2_LEN=/hive/data/genomes/oreNil2/chrom.sizes
SEQ2_CHUNK=20000000
SEQ2_LIMIT=20
SEQ2_LAP=0

BASE=/hive/data/genomes/grcH38P11/bed/lastzOreNil2.2015-02-17
TMPDIR=/dev/shm
_EOF_
    # << happy emacs

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl `pwd`/DEF -verbose=2 \
        -chainMinScore=5000 -chainLinearGap=loose \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > do.log 2>&1
    # real    1380m11.717s

    cat fb.grcH38P11.chainOreNil2Link.txt
    # 56961010 bases of 3049335806 (1.868%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -workhorse=hgwdev -buildDir=`pwd` grcH38P11 oreNil2) \
       > rbest.log 2>&1 &
    # real    8m9.098s

    # and for the swap:
    mkdir /hive/data/genomes/oreNil2/bed/blastz.grcH38P11.swap
    cd /hive/data/genomes/oreNil2/bed/blastz.grcH38P11.swap

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl -verbose=2 \
      /hive/data/genomes/grcH38P11/bed/lastzOreNil2.2015-02-17/DEF \
        -swap -chainMinScore=5000 -chainLinearGap=loose \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > swap.log 2>&1
    # real    8m56.062s

    cat fb.oreNil2.chainGrcH38P11Link.txt
    # 50933712 bases of 816084674 (6.241%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -workhorse=hgwdev -buildDir=`pwd` oreNil2 grcH38P11) \
       > rbest.log 2>&1
    # real    7m54.354s

#########################################################################
# LASTZ human/grcH38P11 vs. Tetraodon/tetNig2 - (TODO - 2015-02-17 - Angie)
    mkdir /hive/data/genomes/grcH38P11/bed/lastzTetNig2.2015-02-17
    cd /hive/data/genomes/grcH38P11/bed/lastzTetNig2.2015-02-17

    cat << '_EOF_' > DEF
# human vs Tetraodon
BLASTZ=/cluster/bin/penn/lastz-distrib-1.03.54/bin/lastz
BLASTZ_O=400
BLASTZ_E=30
BLASTZ_Y=3400
BLASTZ_L=6000
BLASTZ_K=2200
BLASTZ_M=50
BLASTZ_Q=/scratch/data/blastz/HoxD55.q
#      A    C    G    T
#     91  -90  -25 -100
#    -90  100 -100  -25
#    -25 -100  100  -90
#   -100  -25  -90  91

# TARGET: human grcH38P11
SEQ1_DIR=/hive/data/genomes/grcH38P11/grcH38P11.2bit
SEQ1_LEN=/hive/data/genomes/grcH38P11/chrom.sizes
SEQ1_CHUNK=40000000
SEQ1_LIMIT=30
SEQ1_LAP=10000

# QUERY: Tetraodon tetNig2
SEQ2_DIR=/hive/data/genomes/tetNig2/tetNig2.2bit
SEQ2_LEN=/hive/data/genomes/tetNig2/chrom.sizes
SEQ2_CHUNK=20000000
SEQ2_LIMIT=1
SEQ2_LAP=0

BASE=/hive/data/genomes/grcH38P11/bed/lastzTetNig2.2015-02-17
TMPDIR=/dev/shm
_EOF_
    # << happy emacs

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl `pwd`/DEF -verbose=2 \
        -chainMinScore=5000 -chainLinearGap=loose \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > do.log 2>&1
    # real    537m38.314s

    cat fb.grcH38P11.chainTetNig2Link.txt
    # 53138885 bases of 3049335806 (1.743%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -buildDir=`pwd` grcH38P11 tetNig2) > rbest.log 2>&1 &
    # real    8m12.538s

    # and for the swap:
    mkdir /hive/data/genomes/tetNig2/bed/blastz.grcH38P11.swap
    cd /hive/data/genomes/tetNig2/bed/blastz.grcH38P11.swap

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl -verbose=2 \
      /hive/data/genomes/grcH38P11/bed/lastzTetNig2.2015-02-17/DEF \
        -swap -chainMinScore=5000 -chainLinearGap=loose \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > swap.log 2>&1
    #  real    6m31.168s

    cat fb.tetNig2.chainGrcH38P11Link.txt
    # 43299390 bases of 302314788 (14.323%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -buildDir=`pwd` tetNig2 grcH38P11) > rbest.log 2>&1
    # real    5m5.399s

#########################################################################
# LASTZ human/grcH38P11 vs. Princess of Burundi/neoBri1 - (TODO - 2015-02-17 - Angie)
    mkdir /hive/data/genomes/grcH38P11/bed/lastzNeoBri1.2015-02-17
    cd /hive/data/genomes/grcH38P11/bed/lastzNeoBri1.2015-02-17

    cat << '_EOF_' > DEF
# human vs Princess of Burundi
BLASTZ=/cluster/bin/penn/lastz-distrib-1.03.54/bin/lastz
BLASTZ_O=400
BLASTZ_E=30
BLASTZ_Y=3400
BLASTZ_L=6000
BLASTZ_K=2200
BLASTZ_M=50
BLASTZ_Q=/scratch/data/blastz/HoxD55.q
#      A    C    G    T
#     91  -90  -25 -100
#    -90  100 -100  -25
#    -25 -100  100  -90
#   -100  -25  -90  91

# TARGET: human grcH38P11
SEQ1_DIR=/hive/data/genomes/grcH38P11/grcH38P11.2bit
SEQ1_LEN=/hive/data/genomes/grcH38P11/chrom.sizes
SEQ1_CHUNK=40000000
SEQ1_LIMIT=30
SEQ1_LAP=10000

# QUERY: Princess of Burundi neoBri1
SEQ2_DIR=/hive/data/genomes/neoBri1/neoBri1.2bit
SEQ2_LEN=/hive/data/genomes/neoBri1/chrom.sizes
SEQ2_CHUNK=20000000
SEQ2_LIMIT=20
SEQ2_LAP=0

BASE=/hive/data/genomes/grcH38P11/bed/lastzNeoBri1.2015-02-17
TMPDIR=/dev/shm
_EOF_
    # << happy emacs

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl `pwd`/DEF -verbose=2 \
        -chainMinScore=5000 -chainLinearGap=loose \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > do.log 2>&1
    # real    1316m55.223s

    cat fb.grcH38P11.chainNeoBri1Link.txt
    # 53868820 bases of 3049335806 (1.767%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -buildDir=`pwd` grcH38P11 neoBri1) > rbest.log 2>&1 &
    # real    4m18.813s

    # and for the swap:
    mkdir /hive/data/genomes/neoBri1/bed/blastz.grcH38P11.swap
    cd /hive/data/genomes/neoBri1/bed/blastz.grcH38P11.swap

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl -verbose=2 \
      /hive/data/genomes/grcH38P11/bed/lastzNeoBri1.2015-02-17/DEF \
        -swap -chainMinScore=5000 -chainLinearGap=loose \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > swap.log 2>&1
    #  real    8m59.125s

    cat fb.neoBri1.chainGrcH38P11Link.txt
    # 46915356 bases of 685897281 (6.840%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -buildDir=`pwd` neoBri1 grcH38P11) > rbest.log 2>&1
    # real    6m25.911s

#########################################################################
# LASTZ human/grcH38P11 vs. Yellowbelly pufferfish/takFla1 - (TODO - 2015-02-17 - Angie)
    mkdir /hive/data/genomes/grcH38P11/bed/lastzTakFla1.2015-02-17
    cd /hive/data/genomes/grcH38P11/bed/lastzTakFla1.2015-02-17

    cat << '_EOF_' > DEF
# human vs Yellowbelly pufferfish
BLASTZ=/cluster/bin/penn/lastz-distrib-1.03.54/bin/lastz
BLASTZ_O=400
BLASTZ_E=30
BLASTZ_Y=3400
BLASTZ_L=6000
BLASTZ_K=2200
BLASTZ_M=50
BLASTZ_Q=/scratch/data/blastz/HoxD55.q
#      A    C    G    T
#     91  -90  -25 -100
#    -90  100 -100  -25
#    -25 -100  100  -90
#   -100  -25  -90  91

# TARGET: human grcH38P11
SEQ1_DIR=/hive/data/genomes/grcH38P11/grcH38P11.2bit
SEQ1_LEN=/hive/data/genomes/grcH38P11/chrom.sizes
SEQ1_CHUNK=40000000
SEQ1_LIMIT=30
SEQ1_LAP=10000

# QUERY: Yellowbelly pufferfish takFla1
SEQ2_DIR=/hive/data/genomes/takFla1/takFla1.2bit
SEQ2_LEN=/hive/data/genomes/takFla1/chrom.sizes
SEQ2_CHUNK=20000000
SEQ2_LIMIT=40
SEQ2_LAP=0

BASE=/hive/data/genomes/grcH38P11/bed/lastzTakFla1.2015-02-17
TMPDIR=/dev/shm
_EOF_
    # << happy emacs

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl `pwd`/DEF -verbose=2 \
        -chainMinScore=5000 -chainLinearGap=loose \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > do.log 2>&1
    # real    1193m52.421s

    cat fb.grcH38P11.chainTakFla1Link.txt
    # 47205001 bases of 3049335806 (1.548%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -buildDir=`pwd` grcH38P11 takFla1) > rbest.log 2>&1 &
    # real    2m58.484s

    # and for the swap:
    mkdir /hive/data/genomes/takFla1/bed/blastz.grcH38P11.swap
    cd /hive/data/genomes/takFla1/bed/blastz.grcH38P11.swap

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl -verbose=2 \
      /hive/data/genomes/grcH38P11/bed/lastzTakFla1.2015-02-17/DEF \
        -swap -chainMinScore=5000 -chainLinearGap=loose \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > swap.log 2>&1
    #  real    7m24.854s

    cat fb.takFla1.chainGrcH38P11Link.txt
    # 35632361 bases of 314848639 (11.317%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -buildDir=`pwd` takFla1 grcH38P11) > rbest.log 2>&1
    # real    8m20.901s

#########################################################################
# LASTZ human/grcH38P11 vs. Burton's mouthbreeder/hapBur1 - (TODO - 2015-02-17 - Angie)
    mkdir /hive/data/genomes/grcH38P11/bed/lastzHapBur1.2015-02-17
    cd /hive/data/genomes/grcH38P11/bed/lastzHapBur1.2015-02-17

    cat << '_EOF_' > DEF
# human vs Burton's mouthbreeder
BLASTZ=/cluster/bin/penn/lastz-distrib-1.03.54/bin/lastz
BLASTZ_O=400
BLASTZ_E=30
BLASTZ_Y=3400
BLASTZ_L=6000
BLASTZ_K=2200
BLASTZ_M=50
BLASTZ_Q=/scratch/data/blastz/HoxD55.q
#      A    C    G    T
#     91  -90  -25 -100
#    -90  100 -100  -25
#    -25 -100  100  -90
#   -100  -25  -90  91

# TARGET: human grcH38P11
SEQ1_DIR=/hive/data/genomes/grcH38P11/grcH38P11.2bit
SEQ1_LEN=/hive/data/genomes/grcH38P11/chrom.sizes
SEQ1_CHUNK=40000000
SEQ1_LIMIT=30
SEQ1_LAP=10000

# QUERY: Burton's mouthbreeder hapBur1
SEQ2_DIR=/hive/data/genomes/hapBur1/hapBur1.2bit
SEQ2_LEN=/hive/data/genomes/hapBur1/chrom.sizes
SEQ2_CHUNK=20000000
SEQ2_LIMIT=20
SEQ2_LAP=0

BASE=/hive/data/genomes/grcH38P11/bed/lastzHapBur1.2015-02-17
TMPDIR=/dev/shm
_EOF_
    # << happy emacs

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl `pwd`/DEF -verbose=2 \
        -chainMinScore=5000 -chainLinearGap=loose \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > do.log 2>&1
    # real    1288m42.717s

    cat fb.grcH38P11.chainHapBur1Link.txt
    # 54379915 bases of 3049335806 (1.783%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -buildDir=`pwd` grcH38P11 hapBur1) > rbest.log 2>&1 &
    # real    3m45.453s

    # and for the swap:
    mkdir /hive/data/genomes/hapBur1/bed/blastz.grcH38P11.swap
    cd /hive/data/genomes/hapBur1/bed/blastz.grcH38P11.swap

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl -verbose=2 \
      /hive/data/genomes/grcH38P11/bed/lastzHapBur1.2015-02-17/DEF \
        -swap -chainMinScore=5000 -chainLinearGap=loose \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > swap.log 2>&1
    #  real    9m18.063s

    cat fb.hapBur1.chainGrcH38P11Link.txt
    # 47956127 bases of 698936397 (6.861%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -buildDir=`pwd` hapBur1 grcH38P11) > rbest.log 2>&1
    # real    6m53.796s

#########################################################################
# LASTZ human/grcH38P11 vs. Fugu/fr3 - (TODO - 2015-02-17 - Angie)
    mkdir /hive/data/genomes/grcH38P11/bed/lastzFr3.2015-02-17
    cd /hive/data/genomes/grcH38P11/bed/lastzFr3.2015-02-17

    cat << '_EOF_' > DEF
# human vs Fugu
BLASTZ=/cluster/bin/penn/lastz-distrib-1.03.54/bin/lastz
BLASTZ_O=400
BLASTZ_E=30
BLASTZ_Y=3400
BLASTZ_L=6000
BLASTZ_K=2200
BLASTZ_M=50
BLASTZ_Q=/scratch/data/blastz/HoxD55.q
#      A    C    G    T
#     91  -90  -25 -100
#    -90  100 -100  -25
#    -25 -100  100  -90
#   -100  -25  -90  91

# TARGET: human grcH38P11
SEQ1_DIR=/hive/data/genomes/grcH38P11/grcH38P11.2bit
SEQ1_LEN=/hive/data/genomes/grcH38P11/chrom.sizes
SEQ1_CHUNK=40000000
SEQ1_LIMIT=30
SEQ1_LAP=10000

# QUERY: Fugu fr3
SEQ2_DIR=/hive/data/genomes/fr3/fr3.2bit
SEQ2_LEN=/hive/data/genomes/fr3/chrom.sizes
SEQ2_CHUNK=20000000
SEQ2_LIMIT=20
SEQ2_LAP=0

BASE=/hive/data/genomes/grcH38P11/bed/lastzFr3.2015-02-17
TMPDIR=/dev/shm
_EOF_
    # << happy emacs

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl `pwd`/DEF -verbose=2 \
        -chainMinScore=5000 -chainLinearGap=loose \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > do.log 2>&1
    # real    906m48.419s

    cat fb.grcH38P11.chainFr3Link.txt
    # 54409247 bases of 3049335806 (1.784%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -buildDir=`pwd` grcH38P11 fr3) > rbest.log 2>&1 &
    # real    4m4.720s

    # and for the swap:
    mkdir /hive/data/genomes/fr3/bed/blastz.grcH38P11.swap
    cd /hive/data/genomes/fr3/bed/blastz.grcH38P11.swap

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl -verbose=2 \
      /hive/data/genomes/grcH38P11/bed/lastzFr3.2015-02-17/DEF \
        -swap -chainMinScore=5000 -chainLinearGap=loose \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > swap.log 2>&1
    #  real    6m35.968s

    cat fb.fr3.chainGrcH38P11Link.txt
    # 43496560 bases of 350961831 (12.394%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -buildDir=`pwd` fr3 grcH38P11) > rbest.log 2>&1
    # real    11m12.304s

#########################################################################
# LASTZ human/grcH38P11 vs. Mexican tetra cavefish/astMex1 - (TODO - 2015-02-17 - Angie)
    mkdir /hive/data/genomes/grcH38P11/bed/lastzAstMex1.2015-02-17
    cd /hive/data/genomes/grcH38P11/bed/lastzAstMex1.2015-02-17

    cat << '_EOF_' > DEF
# human vs Mexican tetra cavefish
BLASTZ=/cluster/bin/penn/lastz-distrib-1.03.54/bin/lastz
BLASTZ_O=400
BLASTZ_E=30
BLASTZ_Y=3400
BLASTZ_L=6000
BLASTZ_K=2200
BLASTZ_M=50
BLASTZ_Q=/scratch/data/blastz/HoxD55.q
#      A    C    G    T
#     91  -90  -25 -100
#    -90  100 -100  -25
#    -25 -100  100  -90
#   -100  -25  -90  91

# TARGET: human grcH38P11
SEQ1_DIR=/hive/data/genomes/grcH38P11/grcH38P11.2bit
SEQ1_LEN=/hive/data/genomes/grcH38P11/chrom.sizes
SEQ1_CHUNK=40000000
SEQ1_LIMIT=30
SEQ1_LAP=10000

# QUERY: Mexican tetra cavefish astMex1
SEQ2_DIR=/hive/data/genomes/astMex1/astMex1.2bit
SEQ2_LEN=/hive/data/genomes/astMex1/chrom.sizes
SEQ2_CHUNK=20000000
SEQ2_LIMIT=20
SEQ2_LAP=0

BASE=/hive/data/genomes/grcH38P11/bed/lastzAstMex1.2015-02-17
TMPDIR=/dev/shm
_EOF_
    # << happy emacs

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl `pwd`/DEF -verbose=2 \
        -chainMinScore=5000 -chainLinearGap=loose \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > do.log 2>&1
    # real    1566m37.808s

    cat fb.grcH38P11.chainAstMex1Link.txt
    # 67854134 bases of 3049335806 (2.225%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -buildDir=`pwd` grcH38P11 astMex1) > rbest.log 2>&1 &
    # real    4m58.664s

    # and for the swap:
    mkdir /hive/data/genomes/astMex1/bed/blastz.grcH38P11.swap
    cd /hive/data/genomes/astMex1/bed/blastz.grcH38P11.swap

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl -verbose=2 \
      /hive/data/genomes/grcH38P11/bed/lastzAstMex1.2015-02-17/DEF \
        -swap -chainMinScore=5000 -chainLinearGap=loose \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > swap.log 2>&1
    #  real    13m50.072s

    cat fb.astMex1.chainGrcH38P11Link.txt
    # 61379040 bases of 964264884 (6.365%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -buildDir=`pwd` astMex1 grcH38P11) > rbest.log 2>&1
    # real    6m31.123s

#########################################################################
# LASTZ human/grcH38P11 vs. X. tropicalis/xenTro7 - (TODO - 2015-02-18 - Angie)
    mkdir /hive/data/genomes/grcH38P11/bed/lastzXenTro7.2015-02-18
    cd /hive/data/genomes/grcH38P11/bed/lastzXenTro7.2015-02-18

    cat << '_EOF_' > DEF
# human vs X. tropicalis
BLASTZ=/cluster/bin/penn/lastz-distrib-1.03.54/bin/lastz
BLASTZ_O=400
BLASTZ_E=30
BLASTZ_Y=3400
BLASTZ_L=6000
BLASTZ_K=2200
BLASTZ_M=50
BLASTZ_Q=/scratch/data/blastz/HoxD55.q
#      A    C    G    T
#     91  -90  -25 -100
#    -90  100 -100  -25
#    -25 -100  100  -90
#   -100  -25  -90  91

# TARGET: human grcH38P11
SEQ1_DIR=/hive/data/genomes/grcH38P11/grcH38P11.2bit
SEQ1_LEN=/hive/data/genomes/grcH38P11/chrom.sizes
SEQ1_CHUNK=40000000
SEQ1_LIMIT=30
SEQ1_LAP=10000

# QUERY: X. tropicalis xenTro7
SEQ2_DIR=/hive/data/genomes/xenTro7/xenTro7.2bit
SEQ2_LEN=/hive/data/genomes/xenTro7/chrom.sizes
SEQ2_CHUNK=20000000
SEQ2_LIMIT=20
SEQ2_LAP=0

BASE=/hive/data/genomes/grcH38P11/bed/lastzXenTro7.2015-02-18
TMPDIR=/dev/shm
_EOF_
    # << happy emacs

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl `pwd`/DEF -verbose=2 \
        -chainMinScore=5000 -chainLinearGap=loose \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > do.log 2>&1
    # real    1991m40.229s

    cat fb.grcH38P11.chainXenTro7Link.txt
    # 116213822 bases of 3049335806 (3.811%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -workhorse=hgwdev -buildDir=`pwd` grcH38P11 xenTro7) \
       > rbest.log 2>&1 &
    # real    15m54.917s

    # and for the swap:
    mkdir /hive/data/genomes/xenTro7/bed/blastz.grcH38P11.swap
    cd /hive/data/genomes/xenTro7/bed/blastz.grcH38P11.swap

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl -verbose=2 \
      /hive/data/genomes/grcH38P11/bed/lastzXenTro7.2015-02-18/DEF \
        -swap -chainMinScore=5000 -chainLinearGap=loose \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > swap.log 2>&1
    #  real    53m28.988s

    cat fb.xenTro7.chainGrcH38P11Link.txt
    # 108823737 bases of 1365936747 (7.967%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -workhorse=hgwdev -buildDir=`pwd` xenTro7 grcH38P11) \
       > rbest.log 2>&1
    # real    16m4.622s

#########################################################################
# LASTZ human/grcH38P11 vs. Coelacanth/latCha1 - (TODO - 2015-02-18 - Angie)
    mkdir /hive/data/genomes/grcH38P11/bed/lastzLatCha1.2015-02-18
    cd /hive/data/genomes/grcH38P11/bed/lastzLatCha1.2015-02-18

    cat << '_EOF_' > DEF
# human vs Coelacanth
BLASTZ=/cluster/bin/penn/lastz-distrib-1.03.54/bin/lastz
BLASTZ_O=400
BLASTZ_E=30
BLASTZ_Y=3400
BLASTZ_L=6000
BLASTZ_K=2200
BLASTZ_M=50
BLASTZ_Q=/scratch/data/blastz/HoxD55.q
#      A    C    G    T
#     91  -90  -25 -100
#    -90  100 -100  -25
#    -25 -100  100  -90
#   -100  -25  -90  91

# TARGET: human grcH38P11
SEQ1_DIR=/hive/data/genomes/grcH38P11/grcH38P11.2bit
SEQ1_LEN=/hive/data/genomes/grcH38P11/chrom.sizes
SEQ1_CHUNK=40000000
SEQ1_LIMIT=30
SEQ1_LAP=10000

# QUERY: Coelacanth latCha1
SEQ2_DIR=/hive/data/genomes/latCha1/latCha1.2bit
SEQ2_LEN=/hive/data/genomes/latCha1/chrom.sizes
SEQ2_CHUNK=20000000
SEQ2_LIMIT=20
SEQ2_LAP=0

BASE=/hive/data/genomes/grcH38P11/bed/lastzLatCha1.2015-02-18
TMPDIR=/dev/shm
_EOF_
    # << happy emacs

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl `pwd`/DEF -verbose=2 \
        -chainMinScore=5000 -chainLinearGap=loose \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > do.log 2>&1
    # real    2036m36.030s

    cat fb.grcH38P11.chainLatCha1Link.txt
    # 87594238 bases of 3049335806 (2.873%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -workhorse=hgwdev -buildDir=`pwd` grcH38P11 latCha1) \
       > rbest.log 2>&1 &
    # real    8m36.393s

    # and for the swap:
    mkdir /hive/data/genomes/latCha1/bed/blastz.grcH38P11.swap
    cd /hive/data/genomes/latCha1/bed/blastz.grcH38P11.swap

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl -verbose=2 \
      /hive/data/genomes/grcH38P11/bed/lastzLatCha1.2015-02-18/DEF \
        -swap -chainMinScore=5000 -chainLinearGap=loose \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > swap.log 2>&1
    #  real    19m14.665s

    cat fb.latCha1.chainGrcH38P11Link.txt
    # 75312106 bases of 2183592768 (3.449%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -workhorse=hgwdev -buildDir=`pwd` latCha1 grcH38P11) \
       > rbest.log 2>&1
    # real    10m14.893s

#########################################################################
# LASTZ human/grcH38P11 vs. Spotted gar/lepOcu1 - (TODO - 2015-02-18 - Angie)
    mkdir /hive/data/genomes/grcH38P11/bed/lastzLepOcu1.2015-02-18
    cd /hive/data/genomes/grcH38P11/bed/lastzLepOcu1.2015-02-18

    cat << '_EOF_' > DEF
# human vs Spotted gar
BLASTZ=/cluster/bin/penn/lastz-distrib-1.03.54/bin/lastz
BLASTZ_O=400
BLASTZ_E=30
BLASTZ_Y=3400
BLASTZ_L=6000
BLASTZ_K=2200
BLASTZ_M=50
BLASTZ_Q=/scratch/data/blastz/HoxD55.q
#      A    C    G    T
#     91  -90  -25 -100
#    -90  100 -100  -25
#    -25 -100  100  -90
#   -100  -25  -90  91

# TARGET: human grcH38P11
SEQ1_DIR=/hive/data/genomes/grcH38P11/grcH38P11.2bit
SEQ1_LEN=/hive/data/genomes/grcH38P11/chrom.sizes
SEQ1_CHUNK=40000000
SEQ1_LIMIT=30
SEQ1_LAP=10000

# QUERY: Spotted gar lepOcu1
SEQ2_DIR=/hive/data/genomes/lepOcu1/lepOcu1.2bit
SEQ2_LEN=/hive/data/genomes/lepOcu1/chrom.sizes
SEQ2_CHUNK=20000000
SEQ2_LIMIT=20
SEQ2_LAP=0

BASE=/hive/data/genomes/grcH38P11/bed/lastzLepOcu1.2015-02-18
TMPDIR=/dev/shm
_EOF_
    # << happy emacs

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl `pwd`/DEF -verbose=2 \
        -chainMinScore=5000 -chainLinearGap=loose \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > do.log 2>&1
    # real    917m10.105s

    cat fb.grcH38P11.chainLepOcu1Link.txt
    # 76570858 bases of 3049335806 (2.511%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -workhorse=hgwdev -buildDir=`pwd` grcH38P11 lepOcu1) \
       > rbest.log 2>&1 &
    # real    11m4.401s

    # and for the swap:
    mkdir /hive/data/genomes/lepOcu1/bed/blastz.grcH38P11.swap
    cd /hive/data/genomes/lepOcu1/bed/blastz.grcH38P11.swap

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl -verbose=2 \
      /hive/data/genomes/grcH38P11/bed/lastzLepOcu1.2015-02-18/DEF \
        -swap -chainMinScore=5000 -chainLinearGap=loose \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > swap.log 2>&1
    #  real    8m52.863s

    cat fb.lepOcu1.chainGrcH38P11Link.txt
    # 57676637 bases of 869414361 (6.634%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -workhorse=hgwdev -buildDir=`pwd` lepOcu1 grcH38P11) \
       > rbest.log 2>&1
    # real    8m31.395s

#########################################################################
# LASTZ human/grcH38P11 Tree shrew/tupBel1 - (TODO - 2015-03-27 - Angie)
#   re-running with default parameters, this provides more coverage
    mkdir /hive/data/genomes/grcH38P11/bed/lastzTupBel1.2015-03-27
    cd /hive/data/genomes/grcH38P11/bed/lastzTupBel1.2015-03-27

    cat << '_EOF_' > DEF
# human vs Tree shrew
BLASTZ=/cluster/bin/penn/lastz-distrib-1.03.54/bin/lastz
BLASTZ_M=254

# TARGET: human grcH38P11
SEQ1_DIR=/hive/data/genomes/grcH38P11/grcH38P11.2bit
SEQ1_LEN=/hive/data/genomes/grcH38P11/chrom.sizes
SEQ1_CHUNK=40000000
SEQ1_LIMIT=10
SEQ1_LAP=10000

# QUERY: Tree shrew tupBel1
SEQ2_DIR=/hive/data/genomes/tupBel1/tupBel1.2bit
SEQ2_LEN=/hive/data/genomes/tupBel1/chrom.sizes
SEQ2_CHUNK=20000000
SEQ2_LIMIT=300
SEQ2_LAP=0

BASE=/hive/data/genomes/grcH38P11/bed/lastzTupBel1.2015-03-27
TMPDIR=/dev/shm
_EOF_
    # << happy emacs

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl -verbose=2 `pwd`/DEF \
  -chainMinScore=3000 -chainLinearGap=medium \
     -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku) > do.log 2>&1
    # real    372m50.142s

    cat fb.grcH38P11.chainTupBel1Link.txt
    # 1067849727 bases of 3049335806 (35.019%) in intersection
    # replacing the previous tuned version:
    # 753229970 bases of 3049335806 (24.701%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -buildDir=`pwd` grcH38P11 tupBel1) > rbest.log 2>&1 &
    # real    33m33.647s

    # and for the swap:
    mkdir /hive/data/genomes/tupBel1/bed/blastz.grcH38P11.swap
    cd /hive/data/genomes/tupBel1/bed/blastz.grcH38P11.swap

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl -verbose=2 \
      /hive/data/genomes/grcH38P11/bed/lastzTupBel1.2015-03-27/DEF \
        -swap -chainMinScore=3000 -chainLinearGap=medium \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > swap.log 2>&1
    #  real    256m18.000s

    cat fb.tupBel1.chainGrcH38P11Link.txt
    # 1056254191 bases of 2137225476 (49.422%) in intersection
    # replacing the previous tuned version:
    # 749930137 bases of 2137225476 (35.089%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -buildDir=`pwd` tupBel1 grcH38P11) > rbest.log 2>&1
    # real    112m44.439s

#########################################################################
# LASTZ human/grcH38P11 Tree mouse/mm10 - (TODO - 2015-04-10 - Angie)
#   re-running to correct missing contig alignments from canFam3
    mkdir /hive/data/genomes/grcH38P11/bed/lastzMm10.2015-04-08
    cd /hive/data/genomes/grcH38P11/bed/lastzMm10.2015-04-08

    cat << '_EOF_' > DEF
# human vs mouse
BLASTZ=/cluster/bin/penn/lastz-distrib-1.03.66/bin/lastz

# TARGET: Human grcH38P11
SEQ1_DIR=/hive/data/genomes/grcH38P11/grcH38P11.2bit
SEQ1_LEN=/hive/data/genomes/grcH38P11/chrom.sizes
SEQ1_CHUNK=40000000
SEQ1_LAP=10000

# QUERY: Mouse Mm10
SEQ2_DIR=/scratch/data/mm10/mm10.2bit
SEQ2_LEN=/scratch/data/mm10/chrom.sizes
SEQ2_CHUNK=20000000
SEQ2_LAP=0

BASE=/hive/data/genomes/grcH38P11/bed/lastzMm10.2015-04-08
TMPDIR=/dev/shm
_EOF_
    # << happy emacs

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl -verbose=2 `pwd`/DEF \
        -syntenicNet -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
        -fileServer=hgwdev -chainMinScore=3000 -chainLinearGap=medium) \
           > do.log 2>&1
    # real    323m51.165s

    cat fb.grcH38P11.chainMm10Link.txt
    # 965211935 bases of 3049335806 (31.653%) in intersection
    # replacing the broken run from Jan 2014:
    # 964465044 bases of 3049335806 (31.629%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -buildDir=`pwd` grcH38P11 mm10) > rbest.log 2>&1 &
    # real    32m22.990s

    # load up the recip best chainNet tables
    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -load -continue=load -workhorse=hgwdev \
	-buildDir=`pwd` grcH38P11 mm10) > loadRBest.log 2>&1 &
    cat fb.grcH38P11.chainRBestMm10Link.txt
# 891562094 bases of 3049335806 (29.238%) in intersection

    # create and load up the syntenic chainNet tables 2017-10-30
cd /hive/data/genomes/grcH38P11/bed/lastzMm10.2015-04-08/axtChain
netToAxt grcH38P11.mm10.syn.net.gz grcH38P11.mm10.all.chain.gz \
/scratch/data/grcH38P11/grcH38P11.2bit /hive/data/genomes/mm10/mm10.2bit stdout \
  | axtSort stdin stdout \
     | axtToChain stdin /hive/data/genomes/grcH38P11/chrom.sizes \
        /hive/data/genomes/mm10/chrom.sizes stdout \
            | gzip -c > grcH38P11.mm10.syn.chain.gz
hgLoadChain -tIndex grcH38P11 chainSynMm10 grcH38P11.mm10.syn.chain.gz
netFilter -minGap=10 grcH38P11.mm10.syn.net.gz \
  | hgLoadNet -verbose=0 grcH38P11 netSynMm10 stdin
cd /hive/data/genomes/grcH38P11/bed/lastzMm10.2015-04-08
featureBits grcH38P11 chainSynMm10Link > fb.grcH38P11.chainSynMm10Link.txt 2>&1
cat fb.grcH38P11.chainSynMm10Link.txt
# 913707143 bases of 3049335806 (29.964%) in intersection

    # and for the swap:
    mkdir /hive/data/genomes/mm10/bed/blastz.grcH38P11.swap
    cd /hive/data/genomes/mm10/bed/blastz.grcH38P11.swap

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl -verbose=2 \
      /hive/data/genomes/grcH38P11/bed/lastzMm10.2015-04-08/DEF \
        -swap -chainMinScore=3000 -chainLinearGap=medium \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > swap.log 2>&1
    #  real    74m49.827s

    cat fb.mm10.chainGrcH38P11Link.txt
    # 938348519 bases of 2652783500 (35.372%) in intersection
    # replacing the broken run from Jan 2014:
    # 937030766 bases of 2652783500 (35.323%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -buildDir=`pwd` mm10 grcH38P11) > rbest.log 2>&1
    # real    32m38.549s

#########################################################################
# LASTZ human/grcH38P11 Tree dog/canFam3 - (TODO - 2015-04-10 - Angie)
#   re-running to correct missing contig alignments from canFam3
    mkdir /hive/data/genomes/grcH38P11/bed/lastzCanFam3.2015-04-08
    cd /hive/data/genomes/grcH38P11/bed/lastzCanFam3.2015-04-08

    cat << '_EOF_' > DEF
# human vs dog
BLASTZ=/cluster/bin/penn/lastz-distrib-1.03.66/bin/lastz

# TARGET: Human grcH38P11
SEQ1_DIR=/hive/data/genomes/grcH38P11/grcH38P11.2bit
SEQ1_LEN=/hive/data/genomes/grcH38P11/chrom.sizes
SEQ1_CHUNK=20000000
SEQ1_LAP=10000

# QUERY: Dog CanFam3
SEQ2_DIR=/hive/data/genomes/canFam3/canFam3.2bit
SEQ2_LEN=/hive/data/genomes/canFam3/chrom.sizes
SEQ2_CHUNK=20000000
SEQ2_LAP=0

BASE=/hive/data/genomes/grcH38P11/bed/lastzCanFam3.2015-04-08
TMPDIR=/dev/shm
_EOF_
    # << happy emacs

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl -verbose=2 `pwd`/DEF \
        -syntenicNet -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
        -fileServer=hgwdev -chainMinScore=3000 -chainLinearGap=medium) \
          > do.log 2>&1
    # real    821m15.144s

    cat fb.grcH38P11.chainCanFam3Link.txt
    # 1536721546 bases of 3049335806 (50.395%) in intersection
    # replacing the broken one from Jan 2014:
    # 1523987456 bases of 3049335806 (49.978%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -buildDir=`pwd` grcH38P11 canFam3) > rbest.log 2>&1 &
    # real    42m21.276s

    # load up the recip best chainNet tables
    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -load -continue=load -workhorse=hgwdev \
	-buildDir=`pwd` grcH38P11 canFam3) > loadRBest.log 2>&1 &
    cat fb.grcH38P11.chainRBestCanFam3Link.txt
# 1415877801 bases of 3049335806 (46.432%) in intersection

    # create and load up the syntenic chainNet tables 2017-10-30
cd /hive/data/genomes/grcH38P11/bed/lastzCanFam3.2015-04-08/axtChain
netToAxt grcH38P11.canFam3.syn.net.gz grcH38P11.canFam3.all.chain.gz \
/scratch/data/grcH38P11/grcH38P11.2bit /hive/data/genomes/canFam3/canFam3.2bit stdout \
  | axtSort stdin stdout \
     | axtToChain stdin /hive/data/genomes/grcH38P11/chrom.sizes \
        /hive/data/genomes/canFam3/chrom.sizes stdout \
            | gzip -c > grcH38P11.canFam3.syn.chain.gz
hgLoadChain -tIndex grcH38P11 chainSynCanFam3 grcH38P11.canFam3.syn.chain.gz
netFilter -minGap=10 grcH38P11.canFam3.syn.net.gz \
  | hgLoadNet -verbose=0 grcH38P11 netSynCanFam3 stdin
cd /hive/data/genomes/grcH38P11/bed/lastzCanFam3.2015-04-08
featureBits grcH38P11 chainSynCanFam3Link > fb.grcH38P11.chainSynCanFam3Link.txt 2>&1
cat fb.grcH38P11.chainSynCanFam3Link.txt
# 1478843439 bases of 3049335806 (48.497%) in intersection

    # and for the swap:
    mkdir /hive/data/genomes/canFam3/bed/blastz.grcH38P11.swap
    cd /hive/data/genomes/canFam3/bed/blastz.grcH38P11.swap

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl -verbose=2 \
      /hive/data/genomes/grcH38P11/bed/lastzCanFam3.2015-04-08/DEF \
        -swap -chainMinScore=3000 -chainLinearGap=medium \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > swap.log 2>&1
    #  real    105m19.994s

    cat fb.canFam3.chainGrcH38P11Link.txt
    # 1456224911 bases of 2392715236 (60.861%) in intersection
    # replacing the broken one from Jan 2014:
    # 1437624815 bases of 2392715236 (60.083%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -buildDir=`pwd` canFam3 grcH38P11) > rbest.log 2>&1
    # real    43m54.042s

#########################################################################
# LASTZ human/grcH38P11 Rhesus macaque/rheMac3 - (TODO - 2015-04-10 - Angie)
#   re-running to correct missing contig alignments from rheMac3
    mkdir /hive/data/genomes/grcH38P11/bed/lastzRheMac3.2015-04-08
    cd /hive/data/genomes/grcH38P11/bed/lastzRheMac3.2015-04-08

    cat << '_EOF_' > DEF
# human vs macaca mulatta
BLASTZ=/cluster/bin/penn/lastz-distrib-1.03.66/bin/lastz
# maximum M allowed with lastz is only 254
BLASTZ_M=254
BLASTZ_Q=/scratch/data/blastz/human_chimp.v2.q
BLASTZ_O=600
BLASTZ_E=150
# other parameters from panTro2 vs hg18 lastz on advice from Webb
BLASTZ_K=4500
BLASTZ_Y=15000
BLASTZ_T=2

# TARGET: Human grcH38P11
SEQ1_DIR=/hive/data/genomes/grcH38P11/grcH38P11.2bit
SEQ1_LEN=/hive/data/genomes/grcH38P11/chrom.sizes
SEQ1_CHUNK=20000000
SEQ1_LAP=10000

# QUERY: Macaca Mulatta RheMac3
SEQ2_DIR=/scratch/data/rheMac3/rheMac3.2bit
SEQ2_LEN=/scratch/data/rheMac3/chrom.sizes
SEQ2_CHUNK=20000000
SEQ2_LAP=0
SEQ2_IN_CONTIGS=0

BASE=/hive/data/genomes/grcH38P11/bed/lastzRheMac3.2015-04-08
TMPDIR=/dev/shm
_EOF_
    # << happy emacs

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl -verbose=2 `pwd`/DEF \
        -syntenicNet -fileServer=hgwdev \
        -chainMinScore=5000 -chainLinearGap=medium \
        -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku) \
          > do.log 2>&1
    # real    193m23.828s

    cat fb.grcH38P11.chainRheMac3Link.txt
    # 2464716257 bases of 3049335806 (80.828%) in intersection
    # replacing the broken one from Jan 2014:
    # 2431208700 bases of 3049335806 (79.729%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -buildDir=`pwd` grcH38P11 rheMac3) > rbest.log 2>&1 &
    # real    38m25.112s

    # and for the swap:
    mkdir /hive/data/genomes/rheMac3/bed/blastz.grcH38P11.swap
    cd /hive/data/genomes/rheMac3/bed/blastz.grcH38P11.swap

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl -verbose=2 \
      /hive/data/genomes/grcH38P11/bed/lastzRheMac3.2015-04-08/DEF \
        -swap -chainMinScore=5000 -chainLinearGap=medium \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > swap.log 2>&1
    #  real    83m14.955s

    cat fb.rheMac3.chainGrcH38P11Link.txt
    # 2328257435 bases of 2639145830 (88.220%) in intersection
    # replacing the broken one from Jan 2014:
    # 2288533769 bases of 2639145830 (86.715%) in intersection


    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -buildDir=`pwd` rheMac3 grcH38P11) > rbest.log 2>&1
    # real    39m52.256s

#########################################################################
# LASTZ human/grcH38P11 mouse/mm10 - (TODO - 2015-04-30 - Angie)
#   experiment to see if lineage specific repeats does more coverage
    mkdir /hive/data/genomes/grcH38P11/bed/lastzMm10.2015-04-30
    cd /hive/data/genomes/grcH38P11/bed/lastzMm10.2015-04-30

    cat << '_EOF_' > DEF
# human vs mouse
BLASTZ=/cluster/bin/penn/lastz-distrib-1.03.66/bin/lastz
BLASTZ_ABRIDGE_REPEATS=1

# TARGET: Human grcH38P11
SEQ1_DIR=/scratch/data/grcH38P11/nib
SEQ1_LEN=/hive/data/genomes/grcH38P11/chrom.sizes
SEQ1_SMSK=/hive/data/genomes/grcH38P11/bed/linSpecRep/humanSpecific
SEQ1_CHUNK=40000000
SEQ1_LAP=10000

# QUERY: Mouse Mm10
SEQ2_DIR=/scratch/data/mm10/nib
SEQ2_SMSK=/scratch/data/mm10/notInOthers
SEQ2_LEN=/scratch/data/mm10/chrom.sizes
SEQ2_CHUNK=20000000
SEQ2_LAP=0

BASE=/hive/data/genomes/grcH38P11/bed/lastzMm10.2015-04-30
TMPDIR=/dev/shm
_EOF_
    # << happy emacs

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl -stop=net -verbose=2 `pwd`/DEF \
        -syntenicNet -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
        -fileServer=hgwdev -chainMinScore=3000 -chainLinearGap=medium) \
           > net.log 2>&1
    # real    323m51.165s
    # test load, -debug to generate loadUp.csh, then modify the table names
    doBlastzChainNet.pl -stop=net -verbose=2 `pwd`/DEF -continue=load -debug \
      -syntenicNet -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
      -stop=load -fileServer=hgwdev -chainMinScore=3000 -chainLinearGap=medium
           > net.log 2>&1
    # real    167m38.082s

    cat fb.grcH38P11.chainMm10Link.txt
    #  1044599372 bases of 3049335806 (34.257%) in intersection
    # this procedure does produce more coverage

    cat fb.grcH38P11.chainMm10Link.txt
    # 965211935 bases of 3049335806 (31.653%) in intersection
    # replacing the broken run from Jan 2014:
    # 964465044 bases of 3049335806 (31.629%) in intersection

    # XXX experiment concluded, not continued from here
    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -buildDir=`pwd` grcH38P11 mm10) > rbest.log 2>&1 &
    # real    32m22.990s

    # and for the swap:
    mkdir /hive/data/genomes/mm10/bed/blastz.grcH38P11.swap
    cd /hive/data/genomes/mm10/bed/blastz.grcH38P11.swap

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl -verbose=2 \
      /hive/data/genomes/grcH38P11/bed/lastzMm10.2015-04-30/DEF \
        -swap -chainMinScore=3000 -chainLinearGap=medium \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > swap.log 2>&1
    #  real    74m49.827s

    cat fb.mm10.chainGrcH38P11Link.txt
    # 938348519 bases of 2652783500 (35.372%) in intersection
    # replacing the broken run from Jan 2014:
    # 937030766 bases of 2652783500 (35.323%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -buildDir=`pwd` mm10 grcH38P11) > rbest.log 2>&1
    # real    32m38.549s

#########################################################################
# LASTZ human/grcH38P11 Mouse lemur/micMur2 - (TODO - 2015-05-05 - Angie)
    # for some odd reason, these results were lost
    # the same procedure was re-run March 2015 in: lastzMicMur2.2015-03-17
    mkdir /hive/data/genomes/grcH38P11/bed/lastzMicMur2.2015-05-06
    cd /hive/data/genomes/grcH38P11/bed/lastzMicMur2.2015-05-06

    cp -p \
/hive/users/hiram/multiz/100way/hg38.micMur2/hg38.micMur2.tuning.top400.txt \
     ./hg38.micMur2.tuning.Q.txt

    cat << '_EOF_' > DEF
# human vs Mouse lemur
# parameters obtained from a tuning run of lastz_D
#  /hive/users/hiram/multiz/100way/hg38.micMur2/hg38.micMur2.tuning.top400.txt
BLASTZ=/cluster/bin/penn/lastz-distrib-1.03.66/bin/lastz
BLASTZ_T=2
BLASTZ_O=400
BLASTZ_E=30
BLASTZ_M=254
BLASTZ_X=1000
BLASTZ_Y=3400
BLASTZ_Q=/hive/data/genomes/grcH38P11/bed/lastzMicMur2.2015-05-06/hg38.micMur2.tuning.Q.txt
#       A     C     G     T
# A   100  -164   -34  -127
# C  -164    93  -186   -34
# G   -34  -186    93  -164
# T  -127   -34  -164   100

# TARGET: human grcH38P11
SEQ1_DIR=/hive/data/genomes/grcH38P11/grcH38P11.2bit
SEQ1_LEN=/hive/data/genomes/grcH38P11/chrom.sizes
SEQ1_CHUNK=40000000
SEQ1_LIMIT=10
SEQ1_LAP=10000

# QUERY: Mouse lemur micMur2
SEQ2_DIR=/hive/data/genomes/micMur2/micMur2.2bit
SEQ2_LEN=/hive/data/genomes/micMur2/chrom.sizes
SEQ2_CHUNK=20000000
SEQ2_LIMIT=20
SEQ2_LAP=0

BASE=/hive/data/genomes/grcH38P11/bed/lastzMicMur2.2015-05-06
TMPDIR=/dev/shm
_EOF_
    # << happy emacs

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl `pwd`/DEF -verbose=2 \
        -chainMinScore=3000 -chainLinearGap=medium \
          -workhorse=hgwdev -smallClusterHub=ku \
            -bigClusterHub=ku -syntenicNet) > do.log 2>&1
    # real    286m0.829s

    cat fb.grcH38P11.chainMicMur2Link.txt
    # 1632306331 bases of 3049335806 (53.530%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -buildDir=`pwd` grcH38P11 micMur2) > rbest.log 2>&1 &
    # real    37m38.749s

    # and for the swap:
    mkdir /hive/data/genomes/micMur2/bed/blastz.grcH38P11.swap
    cd /hive/data/genomes/micMur2/bed/blastz.grcH38P11.swap

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl -verbose=2 \
      /hive/data/genomes/grcH38P11/bed/lastzMicMur2.2015-05-06/DEF \
        -swap -chainMinScore=3000 -chainLinearGap=medium \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > swap.log 2>&1
    #  real    108m50.264s

    cat fb.micMur2.chainGrcH38P11Link.txt
    # 1587083892 bases of 2377775715 (66.747%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -workhorse=hgwdev -buildDir=`pwd` micMur2 grcH38P11) \
      > rbest.log 2>&1
    # real    59m8.207s

#########################################################################
# LASTZ human/grcH38P11 Tree chimp/rheMac8 - (TODO - 2016-02-05 - Angie)
    mkdir /hive/data/genomes/grcH38P11/bed/lastzRheMac8.2016-02-05
    cd /hive/data/genomes/grcH38P11/bed/lastzRheMac8.2016-02-05

    printf '# human vs macaca mulatta
BLASTZ=/cluster/bin/penn/lastz-distrib-1.03.66/bin/lastz
# maximum M allowed with lastz is only 254
BLASTZ_M=254
BLASTZ_Q=/scratch/data/blastz/human_chimp.v2.q
BLASTZ_O=600
BLASTZ_E=150
# other parameters from panTro2 vs hg18 lastz on advice from Webb
BLASTZ_K=4500
BLASTZ_Y=15000
BLASTZ_T=2

# TARGET: Human grcH38P11
SEQ1_DIR=/hive/data/genomes/grcH38P11/grcH38P11.2bit
SEQ1_LEN=/hive/data/genomes/grcH38P11/chrom.sizes
SEQ1_CHUNK=20000000
SEQ1_LAP=10000

# QUERY: Macaca Mulatta RheMac8
SEQ2_DIR=/hive/data/genomes/rheMac8/rheMac8.2bit
SEQ2_LEN=/hive/data/genomes/rheMac8/chrom.sizes
SEQ2_CHUNK=20000000
SEQ2_LIMIT=600
SEQ2_LAP=0
SEQ2_IN_CONTIGS=0

BASE=/hive/data/genomes/grcH38P11/bed/lastzRheMac8.2016-02-05
TMPDIR=/dev/shm
' > DEF
    # << happy emacs

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl -verbose=2 `pwd`/DEF \
        -syntenicNet -fileServer=hgwdev \
        -chainMinScore=5000 -chainLinearGap=medium \
        -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku) > do.log 2>&1
    # real    4099m2.582s

    # broken cluster run, continuing:
    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl -verbose=2 `pwd`/DEF \
        -continue=cat -syntenicNet -fileServer=hgwdev \
        -chainMinScore=5000 -chainLinearGap=medium \
        -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku) > cat.log 2>&1
    #  real    101m51.644s


    cat fb.grcH38P11.chainRheMac8Link.txt
    # 2576861166 bases of 3049335806 (84.506%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -buildDir=`pwd` grcH38P11 rheMac8) > rbest.log 2>&1 &
    # real    182m11.216s
    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -load -continue=load -workhorse=hgwdev \
	-buildDir=`pwd` grcH38P11 rheMac8) > loadRBest.log 2>&1 &
    cat fb.grcH38P11.chainRBestRheMac8Link.txt
    # 2401566032 bases of 3049335806 (78.757%) in intersection

    # create and load up syntenic chainNet: 2017-10-27
cd /hive/data/genomes/grcH38P11/bed/lastzRheMac8.2016-02-05/axtChain
netToAxt grcH38P11.rheMac8.syn.net.gz grcH38P11.rheMac8.all.chain.gz \
/scratch/data/grcH38P11/grcH38P11.2bit /hive/data/genomes/rheMac8/rheMac8.2bit stdout \
  | axtSort stdin stdout \
     | axtToChain stdin /hive/data/genomes/grcH38P11/chrom.sizes \
        /hive/data/genomes/rheMac8/chrom.sizes stdout \
            | gzip -c > grcH38P11.rheMac8.syn.chain.gz
hgLoadChain -tIndex grcH38P11 chainSynRheMac8 grcH38P11.rheMac8.syn.chain.gz
netFilter -minGap=10 grcH38P11.rheMac8.syn.net.gz \
  | hgLoadNet -verbose=0 grcH38P11 netSynRheMac8 stdin
cd /hive/data/genomes/grcH38P11/bed/lastzRheMac8.2016-02-05
featureBits grcH38P11 chainSynRheMac8Link > fb.grcH38P11.chainSynRheMac8Link.txt 2>&1
cat fb.grcH38P11.chainSynRheMac8Link.txt
# 2535752862 bases of 3049335806 (83.158%) in intersection

    # and for the swap:
    mkdir /hive/data/genomes/rheMac8/bed/blastz.grcH38P11.swap
    cd /hive/data/genomes/rheMac8/bed/blastz.grcH38P11.swap

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl -verbose=2 \
      /hive/data/genomes/grcH38P11/bed/lastzRheMac8.2016-02-05/DEF \
        -swap -chainMinScore=5000 -chainLinearGap=medium \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > swap.log 2>&1
    #  real    234m24.287s

    cat fb.rheMac8.chainGrcH38P11Link.txt
    # 2499211352 bases of 3142093174 (79.540%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -buildDir=`pwd` rheMac8 grcH38P11) > rbest.log 2>&1
    # real    355m16.431s

#########################################################################
# LASTZ human/grcH38P11 vs. chicken/galGal5 - (TODO - 2016-04-19 - Angie)
    mkdir /hive/data/genomes/grcH38P11/bed/lastzGalGal5.2016-04-19
    cd /hive/data/genomes/grcH38P11/bed/lastzGalGal5.2016-04-19

    printf "# human vs chicken
BLASTZ=/cluster/bin/penn/lastz-distrib-1.03.54/bin/lastz
BLASTZ_O=400
BLASTZ_E=30
BLASTZ_Y=3400
BLASTZ_L=6000
BLASTZ_K=2200
BLASTZ_M=50
BLASTZ_Q=/scratch/data/blastz/HoxD55.q
#      A    C    G    T
#     91  -90  -25 -100
#    -90  100 -100  -25
#    -25 -100  100  -90
#   -100  -25  -90  91

# TARGET: human grcH38P11
SEQ1_DIR=/hive/data/genomes/grcH38P11/grcH38P11.2bitUU
SEQ1_LEN=/hive/data/genomes/grcH38P11/chrom.sizes
SEQ1_CHUNK=40000000
SEQ1_LIMIT=30
SEQ1_LAP=10000

# QUERY: chicken galGal5
SEQ2_DIR=/hive/data/genomes/galGal5/galGal5.2bit
SEQ2_LEN=/hive/data/genomes/galGal5/chrom.sizes
SEQ2_CHUNK=20000000
SEQ2_LIMIT=30
SEQ2_LAP=0

BASE=/hive/data/genomes/grcH38P11/bed/lastzGalGal5.2016-04-19
TMPDIR=/dev/shm
" > DEF
    # << happy emacs

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl `pwd`/DEF -verbose=2 \
        -chainMinScore=5000 -chainLinearGap=loose \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > do.log 2>&1
    # real    341m2.910s

    cat fb.grcH38P11.chainGalGal5Link.txt
    # 155942333 bases of 3049335806 (5.114%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -buildDir=`pwd` grcH38P11 galGal5) > rbest.log 2>&1 &
    # real    235m31.028s

    # and for the swap:
    mkdir /hive/data/genomes/galGal5/bed/blastz.grcH38P11.swap
    cd /hive/data/genomes/galGal5/bed/blastz.grcH38P11.swap

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl -verbose=2 \
      /hive/data/genomes/grcH38P11/bed/lastzGalGal5.2016-04-19/DEF \
        -swap -chainMinScore=5000 -chainLinearGap=loose \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > swap.log 2>&1
    #  real    17m45.055s

    cat fb.galGal5.chainGrcH38P11Link.txt
    # 131657596 bases of 1218501075 (10.805%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -buildDir=`pwd` galGal5 grcH38P11) > rbest.log 2>&1
    # real    196m46.991s

#########################################################################
# LASTZ human/grcH38P11 vs. Malayan flying lemur/galVar1 - (TODO - 2016-04-25 - Angie)
    mkdir /hive/data/genomes/grcH38P11/bed/lastzGalVar1.2016-04-25
    cd /hive/data/genomes/grcH38P11/bed/lastzGalVar1.2016-04-25

    printf "# human vs Malayan flying lemur
BLASTZ=/cluster/bin/penn/lastz-distrib-1.03.66/bin/lastz
BLASTZ_O=400
BLASTZ_E=30
BLASTZ_M=254
# default BLASTZ_Q score matrix:
#       A     C     G     T
# A    91  -114   -31  -123
# C  -114   100  -125   -31
# G   -31  -125   100  -114
# T  -123   -31  -114    91

# TARGET: human grcH38P11
SEQ1_DIR=/hive/data/genomes/grcH38P11/grcH38P11.2bit
SEQ1_LEN=/hive/data/genomes/grcH38P11/chrom.sizes
SEQ1_CHUNK=40000000
SEQ1_LIMIT=30
SEQ1_LAP=10000

# QUERY: Malayan flying lemur galVar1
SEQ2_DIR=/hive/data/genomes/galVar1/galVar1.2bit
SEQ2_LEN=/hive/data/genomes/galVar1/chrom.sizes
SEQ2_CHUNK=20000000
SEQ2_LIMIT=400
SEQ2_LAP=0

BASE=/hive/data/genomes/grcH38P11/bed/lastzGalVar1.2016-04-25
TMPDIR=/dev/shm
" > DEF
    # << happy emacs

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl `pwd`/DEF -verbose=2 \
        -chainMinScore=3000 -chainLinearGap=medium \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > do.log 2>&1
    # real    916m34.893s

    cat fb.grcH38P11.chainGalVar1Link.txt
    # 1739210426 bases of 3049335806 (57.036%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -workhorse=hgwdev -buildDir=`pwd` grcH38P11 galVar1) \
       > rbest.log 2>&1 &
    # real    1055m58.835s

    # and for the swap:
    mkdir /hive/data/genomes/galVar1/bed/blastz.grcH38P11.swap
    cd /hive/data/genomes/galVar1/bed/blastz.grcH38P11.swap

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl -verbose=2 \
      /hive/data/genomes/grcH38P11/bed/lastzGalVar1.2016-04-25/DEF \
        -swap -chainMinScore=3000 -chainLinearGap=medium \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > swap.log 2>&1
    #  real    357m45.647s

    cat fb.galVar1.chainGrcH38P11Link.txt
    # 1818567752 bases of 2802917674 (64.881%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -workhorse=hgwdev -buildDir=`pwd` galVar1 grcH38P11) \
        > rbest.log 2>&1
    # real    1774m42.560s

#########################################################################
# LASTZ human/grcH38P11 Gorilla/panPan2 - (TODO - 2016-05-24 - Angie)
    mkdir /hive/data/genomes/grcH38P11/bed/lastzPanPan2.2016-05-24
    cd /hive/data/genomes/grcH38P11/bed/lastzPanPan2.2016-05-24

    cp -p \
/hive/users/hiram/multiz/100way/hg38.panPan2/hg38.panPan2.tuning.top200.txt \
     ./hg38.panPan2.tuning.Q.txt

    printf '# human vs bonobo
# parameters obtained from a tuning run of lastz_D
# /hive/users/hiram/multiz/100way/hg38.panPan2/hg38.panPan2.tuning.top200.txt
BLASTZ=/cluster/bin/penn/lastz-distrib-1.03.66/bin/lastz
BLASTZ_T=2
BLASTZ_O=600
BLASTZ_E=150
BLASTZ_M=254
BLASTZ_K=4500
BLASTZ_L=4500
BLASTZ_Y=15000
BLASTZ_Q=/hive/data/genomes/grcH38P11/bed/lastzPanPan2.2016-05-24/hg38.panPan2.tuning.Q.txt
#       A     C     G     T
# A    90  -330  -236  -356
# C  -330   100  -318  -236
# G  -236  -318   100  -330
# T  -356  -236  -330    90

# TARGET: human grcH38P11
SEQ1_DIR=/hive/data/genomes/grcH38P11/grcH38P11.2bit
SEQ1_LEN=/hive/data/genomes/grcH38P11/chrom.sizes
SEQ1_CHUNK=40000000
SEQ1_LIMIT=10
SEQ1_LAP=10000

# QUERY: bonobo panPan2
SEQ2_DIR=/hive/data/genomes/panPan2/panPan2.2bit
SEQ2_LEN=/hive/data/genomes/panPan2/chrom.sizes
SEQ2_CHUNK=20000000
SEQ2_LIMIT=50
SEQ2_LAP=0

BASE=/hive/data/genomes/grcH38P11/bed/lastzPanPan2.2016-05-24
TMPDIR=/dev/shm
' > DEF

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl `pwd`/DEF -verbose=2 \
        -chainMinScore=3000 -chainLinearGap=medium \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > do.log 2>&1
    # real    203m58.095s

    cat fb.grcH38P11.chainPanPan2Link.txt
    # 2826289232 bases of 3049335806 (92.685%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -workhorse=hgwdev -buildDir=`pwd` grcH38P11 panPan2) \
      > rbest.log 2>&1 &
    # real    184m43.685s
    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -load -continue=load -workhorse=hgwdev \
	-buildDir=`pwd` grcH38P11 panPan2) > loadRBest.log 2>&1 &
    cat fb.grcH38P11.chainRBestPanPan2Link.txt
    # 2653262611 bases of 3049335806 (87.011%) in intersection

    # create and load up syntenic chainNet: 2017-10-27
cd /hive/data/genomes/grcH38P11/bed/lastzPanPan2.2016-05-24/axtChain
netToAxt grcH38P11.panPan2.syn.net.gz grcH38P11.panPan2.all.chain.gz \
/scratch/data/grcH38P11/grcH38P11.2bit /hive/data/genomes/panPan2/panPan2.2bit stdout \
  | axtSort stdin stdout \
     | axtToChain stdin /hive/data/genomes/grcH38P11/chrom.sizes \
        /hive/data/genomes/panPan2/chrom.sizes stdout \
            | gzip -c > grcH38P11.panPan2.syn.chain.gz
hgLoadChain -tIndex grcH38P11 chainSynPanPan2 grcH38P11.panPan2.syn.chain.gz
netFilter -minGap=10 grcH38P11.panPan2.syn.net.gz \
  | hgLoadNet -verbose=0 grcH38P11 netSynPanPan2 stdin
cd /hive/data/genomes/grcH38P11/bed/lastzPanPan2.2016-05-24
featureBits grcH38P11 chainSynPanPan2Link > fb.grcH38P11.chainSynPanPan2Link.txt 2>&1
cat fb.grcH38P11.chainSynPanPan2Link.txt
# 2790018893 bases of 3049335806 (91.496%) in intersection

    # and for the swap:
    mkdir /hive/data/genomes/panPan2/bed/blastz.grcH38P11.swap
    cd /hive/data/genomes/panPan2/bed/blastz.grcH38P11.swap

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl -verbose=2 \
      /hive/data/genomes/grcH38P11/bed/lastzPanPan2.2016-05-24/DEF \
        -swap -chainMinScore=3000 -chainLinearGap=medium \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > swap.log 2>&1
    #  real    127m16.000s

    cat fb.panPan2.chainGrcH38P11Link.txt
    # 2664377492 bases of 2725937399 (97.742%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -buildDir=`pwd` panPan2 grcH38P11) > rbest.log 2>&1
    # real    84m33.540s

#########################################################################
# LASTZ human/grcH38P11 vs. Killer whale/orcOrc1 - (TODO - 2015-04-28 - Angie)
    mkdir /hive/data/genomes/grcH38P11/bed/lastzOrcOrc1.2016-06-03
    cd /hive/data/genomes/grcH38P11/bed/lastzOrcOrc1.2016-06-03

    printf '# human vs Killer whale
BLASTZ=/cluster/bin/penn/lastz-distrib-1.03.66/bin/lastz
BLASTZ_M=254
# default BLASTZ_Q score matrix:
#       A     C     G     T
# A    91  -114   -31  -123
# C  -114   100  -125   -31
# G   -31  -125   100  -114
# T  -123   -31  -114    91

# TARGET: human grcH38P11
SEQ1_DIR=/hive/data/genomes/grcH38P11/grcH38P11.2bit
SEQ1_LEN=/hive/data/genomes/grcH38P11/chrom.sizes
SEQ1_CHUNK=40000000
SEQ1_LIMIT=30
SEQ1_LAP=10000

# QUERY: Killer whale orcOrc1
SEQ2_DIR=/hive/data/genomes/orcOrc1/orcOrc1.2bit
SEQ2_LEN=/hive/data/genomes/orcOrc1/chrom.sizes
SEQ2_CHUNK=20000000
SEQ2_LIMIT=5
SEQ2_LAP=0

BASE=/hive/data/genomes/grcH38P11/bed/lastzOrcOrc1.2016-06-03
TMPDIR=/dev/shm
' > DEF

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl `pwd`/DEF -verbose=2 \
        -chainMinScore=3000 -chainLinearGap=medium \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > do.log 2>&1
    # real    772m18.962s

    cat fb.grcH38P11.chainOrcOrc1Link.txt
    # 1544655174 bases of 3049335806 (50.655%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -workhorse=hgwdev -buildDir=`pwd` grcH38P11 orcOrc1) \
       > rbest.log 2>&1 &
    #    real    529m17.865s

    # and for the swap:
    mkdir /hive/data/genomes/orcOrc1/bed/blastz.grcH38P11.swap
    cd /hive/data/genomes/orcOrc1/bed/blastz.grcH38P11.swap

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl -verbose=2 \
      /hive/data/genomes/grcH38P11/bed/lastzOrcOrc1.2016-06-03/DEF \
        -swap -chainMinScore=3000 -chainLinearGap=medium \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > swap.log 2>&1 &
    #  real    128m38.587s

    cat fb.orcOrc1.chainGrcH38P11Link.txt
    # 1447157896 bases of 2249582125 (64.330%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -workhorse=hgwdev -buildDir=`pwd` orcOrc1 grcH38P11) \
	> rbest.log 2>&1
    # real    467m24.661s

#########################################################################
# LASTZ human/grcH38P11 Tree dolphin/turTru2 - (TODO - 2017-02-21 - Angie)
    mkdir /hive/data/genomes/grcH38P11/bed/lastzTurTru2.2017-02-21
    cd /hive/data/genomes/grcH38P11/bed/lastzTurTru2.2017-02-21

    printf '# human vs dolphin
BLASTZ=/cluster/bin/penn/lastz-distrib-1.03.66/bin/lastz

# TARGET: Human grcH38P11
SEQ1_DIR=/hive/data/genomes/grcH38P11/grcH38P11.2bit
SEQ1_LEN=/hive/data/genomes/grcH38P11/chrom.sizes
SEQ1_CHUNK=20000000
SEQ1_LAP=10000

# QUERY: Dog TurTru2
SEQ2_DIR=/hive/data/genomes/turTru2/turTru2.2bit
SEQ2_LEN=/hive/data/genomes/turTru2/chrom.sizes
SEQ2_CHUNK=20000000
SEQ2_LIMIT=600
SEQ2_LAP=0

BASE=/hive/data/genomes/grcH38P11/bed/lastzTurTru2.2017-02-21
TMPDIR=/dev/shm
' > DEF

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl -verbose=2 `pwd`/DEF \
        -syntenicNet -workhorse=hgwdev -smallClusterHub=ku \
          -bigClusterHub=ku -fileServer=hgwdev \
             -chainMinScore=3000 -chainLinearGap=medium) > do.log 2>&1
    # real    572m54.888s

    cat fb.grcH38P11.chainTurTru2Link.txt
    # 1516482527 bases of 3049335806 (49.732%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -workhorse=hgwdev -buildDir=`pwd` grcH38P11 turTru2) \
      > rbest.log 2>&1 &
    # real    1079m31.677s

    # and for the swap:
    mkdir /hive/data/genomes/turTru2/bed/blastz.grcH38P11.swap
    cd /hive/data/genomes/turTru2/bed/blastz.grcH38P11.swap

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl -verbose=2 \
      /hive/data/genomes/grcH38P11/bed/lastzTurTru2.2017-02-21/DEF \
        -swap -chainMinScore=3000 -chainLinearGap=medium \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > swap.log 2>&1
    #  real    228m9.744s

    cat fb.turTru2.chainGrcH38P11Link.txt
    # 1432042877 bases of 2332402443 (61.398%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -workhorse=hgwdev -buildDir=`pwd` turTru2 grcH38P11) \
          > rbest.log 2>&1
    # real    1295m48.357s

#############################################################################
# Chlorocebus sabaeus/Green monkey Lastz run (TODO - 2014-07-11 - Angie)
    screen -S grcH38P11ChlSab2      # use a screen to manage this longish running job
    mkdir /hive/data/genomes/grcH38P11/bed/lastzChlSab2.2014-07-11
    cd /hive/data/genomes/grcH38P11/bed/lastzChlSab2.2014-07-11

    # always set the BLASTZ program so we know what version was used
    printf "# human vs Chlorocebus sabaeus
BLASTZ=/cluster/bin/penn/lastz-distrib-1.03.52/bin/lastz
# maximum M allowed with lastz is only 254
BLASTZ_M=254
BLASTZ_Q=/scratch/data/blastz/human_chimp.v2.q
BLASTZ_O=600
BLASTZ_E=150
# other parameters from panTro2 vs hg18 lastz on advice from Webb
BLASTZ_K=4500
BLASTZ_Y=15000
BLASTZ_T=2


# TARGET: Human grcH38P11
SEQ1_DIR=/hive/data/genomes/grcH38P11/grcH38P11.2bit
SEQ1_LEN=/hive/data/genomes/grcH38P11/chrom.sizes
SEQ1_CHUNK=20000000
SEQ1_LAP=10000

# QUERY Chlorocebus sabaeus chlSab2
SEQ2_DIR=/hive/data/genomes/chlSab2/chlSab2.2bit
SEQ2_LEN=/hive/data/genomes/chlSab2/chrom.sizes
SEQ2_CHUNK=20000000
SEQ2_LAP=0
SEQ2_IN_CONTIGS=0

BASE=/hive/data/genomes/grcH38P11/bed/lastzChlSab2.2014-07-11
TMPDIR=/dev/shm
" > DEF

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl `pwd`/DEF -verbose=2 \
        -chainMinScore=5000 -chainLinearGap=medium \
        -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
        -syntenicNet) > do.log 2>&1
    # Elapsed time: 142m4s

    cat fb.grcH38P11.chainChlSab2Link.txt
    # 2573435303 bases of 3049335806 (84.393%) in intersection

    # filter with doRecipBest.pl
    doRecipBest.pl -workhorse=hgwdev -buildDir=`pwd` \
        grcH38P11 chlSab2

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -load -continue=load -workhorse=hgwdev \
	-buildDir=`pwd` grcH38P11 chlSab2) > loadRBest.log 2>&1 &
    cat fb.grcH38P11.chainRBestChlSab2Link.txt
    # 2397287473 bases of 3049335806 (78.617%) in intersection

    # create and load up syntenic chainNet: 2017-10-27
cd /hive/data/genomes/grcH38P11/bed/lastzChlSab2.2014-07-11/axtChain
netToAxt grcH38P11.chlSab2.syn.net.gz grcH38P11.chlSab2.all.chain.gz \
/scratch/data/grcH38P11/grcH38P11.2bit /hive/data/genomes/chlSab2/chlSab2.2bit stdout \
  | axtSort stdin stdout \
     | axtToChain stdin /hive/data/genomes/grcH38P11/chrom.sizes \
        /hive/data/genomes/chlSab2/chrom.sizes stdout \
            | gzip -c > grcH38P11.chlSab2.syn.chain.gz
hgLoadChain -tIndex grcH38P11 chainSynChlSab2 grcH38P11.chlSab2.syn.chain.gz
netFilter -minGap=10 grcH38P11.chlSab2.syn.net.gz \
  | hgLoadNet -verbose=0 grcH38P11 netSynChlSab2 stdin
cd /hive/data/genomes/grcH38P11/bed/lastzChlSab2.2014-07-11
featureBits grcH38P11 chainSynChlSab2Link > fb.grcH38P11.chainSynChlSab2Link.txt 2>&1
cat fb.grcH38P11.chainSynChlSab2Link.txt
# 2537786701 bases of 3049335806 (83.224%) in intersection

    # running the swap
    mkdir /hive/data/genomes/chlSab2/bed/blastz.grcH38P11.swap
    cd /hive/data/genomes/chlSab2/bed/blastz.grcH38P11.swap
    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl -verbose=2 \
        -swap /hive/data/genomes/grcH38P11/bed/lastzChlSab2.2014-07-11/DEF \
        -chainMinScore=5000 -chainLinearGap=medium \
        -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
        -syntenicNet) > swap.log 2>&1
    # Elapsed time: 88m48s

    cat fb.chlSab2.chainGrcH38P11Link.txt
    # 2429053010 bases of 2752019208 (88.264%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -workhorse=hgwdev -buildDir=`pwd` \
        chlSab2 grcH38P11) > rbest.log 2>&1
    # real    240m25.264s

###########################################################################

#### dbs that were omitted from hg38/lastzRuns.txt, winging it:

###########################################################################

####  Maybe later for these that are not used in the 100-way: ####

###########################################################################
# Chimp Lastz run (TODO - 2016-08-03 - Angie)
    screen -S grcH38P11PanTro5      # use a screen to manage this longish running job
    mkdir /hive/data/genomes/grcH38P11/bed/lastzPanTro5.2016-08-03
    cd /hive/data/genomes/grcH38P11/bed/lastzPanTro5.2016-08-03

    # always set the BLASTZ program so we know what version was used
    printf "# human vs chimp
BLASTZ=/cluster/bin/penn/lastz-distrib-1.03.66/bin/lastz
BLASTZ_T=2
BLASTZ_O=600
BLASTZ_E=150
BLASTZ_M=254
BLASTZ_K=4500
BLASTZ_L=4500
BLASTZ_Y=15000
BLASTZ_Q=/scratch/data/blastz/human_chimp.v2.q
#    A    C    G    T
#    90 -330 -236 -356
#  -330  100 -318 -236
#  -236 -318  100 -330
#  -356 -236 -330   90

# TARGET: Human grcH38P11
SEQ1_DIR=/scratch/data/grcH38P11/grcH38P11.2bit
SEQ1_LEN=/scratch/data/grcH38P11/chrom.sizes
SEQ1_CHUNK=40000000
SEQ1_LAP=10000
SEQ1_IN_CONTIGS=0

# QUERY: Chimp PanTro5
SEQ2_DIR=/hive/data/genomes/panTro5/panTro5.2bit
SEQ2_LEN=/hive/data/genomes/panTro5/chrom.sizes
SEQ2_CHUNK=20000000
SEQ2_LAP=0
SEQ2_LIMIT=100
SEQ2_IN_CONTIGS=0

BASE=/hive/data/genomes/grcH38P11/bed/lastzPanTro5.2016-08-03
TMPDIR=/dev/shm
" > DEF

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl `pwd`/DEF -verbose=2 \
        -chainMinScore=5000 -chainLinearGap=medium \
        -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
        -syntenicNet) > do.log 2>&1
    # real    209m31.431s

    cat fb.grcH38P11.chainPanTro5Link.txt
    # 2907702790 bases of 3049335806 (95.355%) in intersection

    # filter with doRecipBest.pl
    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -workhorse=hgwdev -buildDir=`pwd` \
        grcH38P11 panTro5) > rbest.log 2>&1
    # real    195m53.750s

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -load -continue=load -workhorse=hgwdev -buildDir=`pwd` grcH38P11 panTro5) \
	> loadRBest.log 2>&1
    # real    2m36.993s

    cat fb.grcH38P11.chainRBestPanTro5Link.txt
    # 2737882959 bases of 3049335806 (89.786%) in intersection

    # create and load up syntenic chainNet: 2017-10-27
cd /hive/data/genomes/grcH38P11/bed/lastzPanTro5.2016-08-03/axtChain

netToAxt grcH38P11.panTro5.syn.net.gz grcH38P11.panTro5.all.chain.gz \
 /scratch/data/grcH38P11/grcH38P11.2bit /hive/data/genomes/panTro5/panTro5.2bit stdout \
  | axtSort stdin stdout \
    | axtToChain stdin /hive/data/genomes/grcH38P11/chrom.sizes \
        /hive/data/genomes/panTro5/chrom.sizes stdout \
            | gzip -c > grcH38P11.panTro5.syn.chain.gz
   # real    3m23.632s

hgLoadChain -tIndex grcH38P11 chainSynPanTro5 grcH38P11.panTro5.syn.chain.gz
netFilter -minGap=10 grcH38P11.panTro5.syn.net.gz \
| hgLoadNet -verbose=0 grcH38P11 netSynPanTro5 stdin
   # real    1m13.380s

cd /hive/data/genomes/grcH38P11/bed/lastzPanTro5.2016-08-03
featureBits grcH38P11 chainSynPanTro5Link >&fb.grcH38P11.chainSynPanTro5Link.txt
cat fb.grcH38P11.chainSynPanTro5Link.txt
    # 2878970238 bases of 3049335806 (94.413%) in intersection


    # running the swap
    mkdir /hive/data/genomes/panTro5/bed/blastz.grcH38P11.swap
    cd /hive/data/genomes/panTro5/bed/blastz.grcH38P11.swap
    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl -verbose=2 \
        -swap /hive/data/genomes/grcH38P11/bed/lastzPanTro5.2016-08-03/DEF \
        -chainMinScore=5000 -chainLinearGap=medium \
        -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
        -syntenicNet) > swap.log 2>&1
    # real    126m8.214s

    cat fb.panTro5.chainGrcH38P11Link.txt
    # 2935702060 bases of 3132620660 (93.714%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -workhorse=hgwdev -buildDir=`pwd` \
        panTro5 grcH38P11) > rbest.log 2>&1
    # real    240m25.264s

#########################################################################
# LASTZ human/grcH38P11 Gorilla/gorGor5 - (TODO - 2016-06-24 - Angie)
    mkdir /hive/data/genomes/grcH38P11/bed/lastzGorGor5.2016-06-24
    cd /hive/data/genomes/grcH38P11/bed/lastzGorGor5.2016-06-24

    printf '# human vs gorilla
BLASTZ=/cluster/bin/penn/lastz-distrib-1.03.66/bin/lastz
BLASTZ_T=2
BLASTZ_O=600
BLASTZ_E=150
BLASTZ_M=254
BLASTZ_K=4500
BLASTZ_Y=15000
BLASTZ_Q=/scratch/data/blastz/human_chimp.v2.q
#       A     C     G     T
# A    90  -330  -236  -356
# C  -330   100  -318  -236
# G  -236  -318   100  -330
# T  -356  -236  -330    90

# TARGET: human grcH38P11
SEQ1_DIR=/hive/data/genomes/grcH38P11/grcH38P11.2bit
SEQ1_LEN=/hive/data/genomes/grcH38P11/chrom.sizes
SEQ1_CHUNK=20000000
SEQ1_LAP=10000
SEQ1_IN_CONTIGS=0

# QUERY: gorilla gorGor5
SEQ2_DIR=/hive/data/genomes/gorGor5/gorGor5.2bit
SEQ2_LEN=/hive/data/genomes/gorGor5/chrom.sizes
SEQ2_CHUNK=20000000
SEQ2_LAP=0
SEQ2_LIMIT=50

BASE=/hive/data/genomes/grcH38P11/bed/lastzGorGor5.2016-06-24
TMPDIR=/dev/shm
' > DEF

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl `pwd`/DEF -verbose=2 \
        -chainMinScore=3000 -chainLinearGap=medium \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > do.log 2>&1
    # real    830m35.387s

    cat fb.grcH38P11.chainGorGor5Link.txt
    # 2887457436 bases of 3049335806 (94.691%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -workhorse=hgwdev -buildDir=`pwd` grcH38P11 gorGor5) \
        > rbest.log 2>&1 &
    # real    101m55.329s
    # load up the recip best chainNet tables
    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -load -continue=load -workhorse=hgwdev \
	-buildDir=`pwd` grcH38P11 gorGor5) > loadRBest.log 2>&1 &
    cat fb.grcH38P11.chainRBestGorGor5Link.txt
    # 2708011335 bases of 3049335806 (88.807%) in intersection

    # create and load up syntenic chainNet: 2017-10-27
cd /hive/data/genomes/grcH38P11/bed/lastzGorGor5.2016-06-24/axtChain
netToAxt grcH38P11.gorGor5.syn.net.gz grcH38P11.gorGor5.all.chain.gz \
/scratch/data/grcH38P11/grcH38P11.2bit /hive/data/genomes/gorGor5/gorGor5.2bit stdout \
  | axtSort stdin stdout \
     | axtToChain stdin /hive/data/genomes/grcH38P11/chrom.sizes \
        /hive/data/genomes/gorGor5/chrom.sizes stdout \
            | gzip -c > grcH38P11.gorGor5.syn.chain.gz
hgLoadChain -tIndex grcH38P11 chainSynGorGor5 grcH38P11.gorGor5.syn.chain.gz
netFilter -minGap=10 grcH38P11.gorGor5.syn.net.gz \
  | hgLoadNet -verbose=0 grcH38P11 netSynGorGor5 stdin
cd /hive/data/genomes/grcH38P11/bed/lastzGorGor5.2016-06-24
featureBits grcH38P11 chainSynGorGor5Link > fb.grcH38P11.chainSynGorGor5Link.txt 2>&1
cat fb.grcH38P11.chainSynGorGor5Link.txt
# 2868720234 bases of 3049335806 (94.077%) in intersection

    # and for the swap:
    mkdir /hive/data/genomes/gorGor5/bed/blastz.grcH38P11.swap
    cd /hive/data/genomes/gorGor5/bed/blastz.grcH38P11.swap

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl -verbose=2 \
      /hive/data/genomes/grcH38P11/bed/lastzGorGor5.2016-06-24/DEF \
        -swap -chainMinScore=3000 -chainLinearGap=medium \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > swap.log 2>&1
    #  real    101m50.285s

    cat fb.gorGor5.chainGrcH38P11Link.txt
    # 2766345777 bases of 3080431298 (89.804%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -workhorse=hgwdev -buildDir=`pwd` gorGor5 grcH38P11) \
       > rbest.log 2>&1
    # real    125m35.459s

#############################################################################
# LASTZ human/grcH38P11 vs. turkey/melGal5 - (TODO - 2017-01-20 - Angie)
    mkdir /hive/data/genomes/grcH38P11/bed/lastzMelGal5.2017-01-20
    cd /hive/data/genomes/grcH38P11/bed/lastzMelGal5.2017-01-20

    printf '# human vs turkey
BLASTZ=/cluster/bin/penn/lastz-distrib-1.03.66/bin/lastz
BLASTZ_O=400
BLASTZ_E=30
BLASTZ_Y=3400
BLASTZ_L=6000
BLASTZ_K=2200
BLASTZ_M=50
BLASTZ_Q=/scratch/data/blastz/HoxD55.q
#      A    C    G    T
#     91  -90  -25 -100
#    -90  100 -100  -25
#    -25 -100  100  -90
#   -100  -25  -90  91

# TARGET: human grcH38P11
SEQ1_DIR=/hive/data/genomes/grcH38P11/grcH38P11.2bit
SEQ1_LEN=/hive/data/genomes/grcH38P11/chrom.sizes
SEQ1_CHUNK=40000000
SEQ1_LIMIT=30
SEQ1_LAP=10000

# QUERY: turkey melGal5
SEQ2_DIR=/hive/data/genomes/melGal5/melGal5.2bit
SEQ2_LEN=/hive/data/genomes/melGal5/chrom.sizes
SEQ2_CHUNK=20000000
SEQ2_LIMIT=300
SEQ2_LAP=0

BASE=/hive/data/genomes/grcH38P11/bed/lastzMelGal5.2017-01-20
TMPDIR=/dev/shm
' > DEF

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl `pwd`/DEF -verbose=2 \
        -chainMinScore=5000 -chainLinearGap=loose \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > do.log 2>&1
    # real    190m58.492s

    cat fb.grcH38P11.chainMelGal5Link.txt
    # 135950364 bases of 3049335806 (4.458%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -workhorse=hgwdev -buildDir=`pwd` grcH38P11 melGal5) \
      > rbest.log 2>&1 &
    # real    492m55.893s

    # and for the swap:
    mkdir /hive/data/genomes/melGal5/bed/blastz.grcH38P11.swap
    cd /hive/data/genomes/melGal5/bed/blastz.grcH38P11.swap

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl -verbose=2 \
      /hive/data/genomes/grcH38P11/bed/lastzMelGal5.2017-01-20/DEF \
        -swap -chainMinScore=5000 -chainLinearGap=loose \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > swap.log 2>&1
    #  real    36m37.471s

    cat fb.melGal5.chainGrcH38P11Link.txt
    # 107549251 bases of 1093044709 (9.839%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -workhorse=hgwdev -buildDir=`pwd` melGal5 grcH38P11) \
        > rbest.log 2>&1
    # real    456m25.214s

#########################################################################
# LASTZ human/grcH38P11 vs. brown kiwi/aptMan1 - (TODO - 2017-02-21 - Angie)
    mkdir /hive/data/genomes/grcH38P11/bed/lastzAptMan1.2017-02-21
    cd /hive/data/genomes/grcH38P11/bed/lastzAptMan1.2017-02-21

    cat <<EOF > DEF
# human vs brown kiwi
BLASTZ=/cluster/bin/penn/lastz-distrib-1.03.66/bin/lastz
BLASTZ_O=400
BLASTZ_E=30
BLASTZ_Y=3400
BLASTZ_L=6000
BLASTZ_K=2200
BLASTZ_M=50
BLASTZ_Q=/scratch/data/blastz/HoxD55.q
#      A    C    G    T
#     91  -90  -25 -100
#    -90  100 -100  -25
#    -25 -100  100  -90
#   -100  -25  -90  91

# TARGET: human grcH38P11
SEQ1_DIR=/hive/data/genomes/grcH38P11/grcH38P11.2bit
SEQ1_LEN=/hive/data/genomes/grcH38P11/chrom.sizes
SEQ1_CHUNK=40000000
SEQ1_LIMIT=30
SEQ1_LAP=10000

# QUERY: brown kiwi aptMan1
SEQ2_DIR=/hive/data/genomes/aptMan1/aptMan1.2bit
SEQ2_LEN=/hive/data/genomes/aptMan1/chrom.sizes
SEQ2_CHUNK=20000000
SEQ2_LIMIT=40
SEQ2_LAP=0

BASE=/hive/data/genomes/grcH38P11/bed/lastzAptMan1.2017-02-21
TMPDIR=/dev/shm

EOF

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl `pwd`/DEF -verbose=2 \
        -chainMinScore=5000 -chainLinearGap=loose \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > do.log 2>&1
    # real    368m59.939s

    cat fb.grcH38P11.chainAptMan1Link.txt
    # 150901346 bases of 3049335806 (4.949%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -workhorse=hgwdev -buildDir=`pwd` grcH38P11 aptMan1) \
         > rbest.log 2>&1 &
    # real    300m28.333s

    # and for the swap:
    mkdir /hive/data/genomes/aptMan1/bed/blastz.grcH38P11.swap
    cd /hive/data/genomes/aptMan1/bed/blastz.grcH38P11.swap

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl -verbose=2 \
      /hive/data/genomes/grcH38P11/bed/lastzAptMan1.2017-02-21/DEF \
        -swap -chainMinScore=5000 -chainLinearGap=loose \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > swap.log 2>&1
    #  real    16m9.761s

    cat fb.aptMan1.chainGrcH38P11Link.txt
    # 125964464 bases of 1311306859 (9.606%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -workhorse=hgwdev -buildDir=`pwd` aptMan1 grcH38P11) \
          > rbest.log 2>&1
    # real    269m10.012s

#########################################################################
# LASTZ human/grcH38P11 vs. platypus/ornAna2 - (TODO - 2017-02-21 - Angie)
    mkdir /hive/data/genomes/grcH38P11/bed/lastzOrnAna2.2017-02-21
    cd /hive/data/genomes/grcH38P11/bed/lastzOrnAna2.2017-02-21

    printf '# human vs platypus
BLASTZ=/cluster/bin/penn/lastz-distrib-1.03.66/bin/lastz
BLASTZ_O=400
BLASTZ_E=30
BLASTZ_Y=3400
BLASTZ_L=6000
BLASTZ_K=2200
BLASTZ_M=50
BLASTZ_Q=/scratch/data/blastz/HoxD55.q
#      A    C    G    T
#     91  -90  -25 -100
#    -90  100 -100  -25
#    -25 -100  100  -90
#   -100  -25  -90  91

# TARGET: human grcH38P11
SEQ1_DIR=/hive/data/genomes/grcH38P11/grcH38P11.2bit
SEQ1_LEN=/hive/data/genomes/grcH38P11/chrom.sizes
SEQ1_CHUNK=40000000
SEQ1_LIMIT=30
SEQ1_LAP=10000

# QUERY: platypus ornAna2
SEQ2_DIR=/hive/data/genomes/ornAna2/ornAna2.2bit
SEQ2_LEN=/hive/data/genomes/ornAna2/chrom.sizes
SEQ2_CHUNK=20000000
SEQ2_LIMIT=300
SEQ2_LAP=0

BASE=/hive/data/genomes/grcH38P11/bed/lastzOrnAna2.2017-02-21
TMPDIR=/dev/shm
' > DEF

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl `pwd`/DEF -verbose=2 \
        -chainMinScore=5000 -chainLinearGap=loose \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > do.log 2>&1
    # real    445m13.234s

    cat fb.grcH38P11.chainOrnAna2Link.txt
    # 256721472 bases of 3049335806 (8.419%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -workhorse=hgwdev -buildDir=`pwd` grcH38P11 ornAna2) \
      > rbest.log 2>&1 &
    # real    788m25.199s

    # and for the swap:
    mkdir /hive/data/genomes/ornAna2/bed/blastz.grcH38P11.swap
    cd /hive/data/genomes/ornAna2/bed/blastz.grcH38P11.swap

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl -verbose=2 \
      /hive/data/genomes/grcH38P11/bed/lastzOrnAna2.2017-02-21/DEF \
        -swap -chainMinScore=5000 -chainLinearGap=loose \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > swap.log 2>&1
    #  real    130m42.942s

    cat fb.ornAna2.chainGrcH38P11Link.txt
    # 232286308 bases of 1842252119 (12.609%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -workhorse=hgwdev -buildDir=`pwd` ornAna2 grcH38P11) \
          > rbest.log 2>&1
    # real    821m10.828s

#############################################################################
# Colobus angolensis palliatus/Angolan colobus lastz run (TODO - 2017-02-27 - Angie)
    screen -S grcH38P11ColAng1      # use a screen to manage this longish running job
    mkdir /hive/data/genomes/grcH38P11/bed/lastzColAng1.2017-02-27
    cd /hive/data/genomes/grcH38P11/bed/lastzColAng1.2017-02-27

    # always set the BLASTZ program so we know what version was used
    printf "# human vs Angolan colobus
BLASTZ=/cluster/bin/penn/lastz-distrib-1.03.66/bin/lastz
# maximum M allowed with lastz is only 254
BLASTZ_M=254
BLASTZ_Q=/scratch/data/blastz/human_chimp.v2.q
BLASTZ_O=600
BLASTZ_E=150
# other parameters from panTro2 vs hg18 lastz on advice from Webb
BLASTZ_K=4500
BLASTZ_Y=15000
BLASTZ_T=2


# TARGET: Human grcH38P11
SEQ1_DIR=/hive/data/genomes/grcH38P11/grcH38P11.2bit
SEQ1_LEN=/hive/data/genomes/grcH38P11/chrom.sizes
SEQ1_CHUNK=20000000
SEQ1_LAP=10000

# QUERY Angolan colobus colAng1
SEQ2_DIR=/hive/data/genomes/colAng1/colAng1.2bit
SEQ2_LEN=/hive/data/genomes/colAng1/chrom.sizes
SEQ2_CHUNK=20000000
SEQ2_LAP=0
SEQ2_LIMIT=40
SEQ2_IN_CONTIGS=0

BASE=/hive/data/genomes/grcH38P11/bed/lastzColAng1.2017-02-27
TMPDIR=/dev/shm
" > DEF

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl `pwd`/DEF -verbose=2 \
        -chainMinScore=5000 -chainLinearGap=medium \
         -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
          -syntenicNet) > do.log 2>&1
    # real    123m41.958s

    cat fb.grcH38P11.chainColAng1Link.txt
    # 2489504237 bases of 3049335806 (81.641%) in intersection

    # filter with doRecipBest.pl
    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -workhorse=hgwdev -buildDir=`pwd` \
        grcH38P11 colAng1) > rbest.log 2>&1
    # real    240m0.041s
    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -load -continue=load -workhorse=hgwdev \
	-buildDir=`pwd` grcH38P11 colAng1) > loadRBest.log 2>&1 &
    cat fb.grcH38P11.chainRBestColAng1Link.txt
    # 2323958368 bases of 3049335806 (76.212%) in intersection

    # create and load up syntenic chainNet: 2017-10-27

cd /hive/data/genomes/grcH38P11/bed/lastzColAng1.2017-02-27/axtChain
netToAxt grcH38P11.colAng1.syn.net.gz grcH38P11.colAng1.all.chain.gz \
/scratch/data/grcH38P11/grcH38P11.2bit /hive/data/genomes/colAng1/colAng1.2bit stdout \
  | axtSort stdin stdout \
     | axtToChain stdin /hive/data/genomes/grcH38P11/chrom.sizes \
        /hive/data/genomes/colAng1/chrom.sizes stdout \
            | gzip -c > grcH38P11.colAng1.syn.chain.gz
hgLoadChain -tIndex grcH38P11 chainSynColAng1 grcH38P11.colAng1.syn.chain.gz
netFilter -minGap=10 grcH38P11.colAng1.syn.net.gz \
  | hgLoadNet -verbose=0 grcH38P11 netSynColAng1 stdin
cd /hive/data/genomes/grcH38P11/bed/lastzColAng1.2017-02-27
featureBits grcH38P11 chainSynColAng1Link > fb.grcH38P11.chainSynColAng1Link.txt 2>&1
cat fb.grcH38P11.chainSynColAng1Link.txt
# 2439773865 bases of 3049335806 (80.010%) in intersection

    # running the swap
    mkdir /hive/data/genomes/colAng1/bed/blastz.grcH38P11.swap
    cd /hive/data/genomes/colAng1/bed/blastz.grcH38P11.swap
    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl -verbose=2 \
        -swap /hive/data/genomes/grcH38P11/bed/lastzColAng1.2017-02-27/DEF \
        -chainMinScore=5000 -chainLinearGap=medium \
        -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
        -syntenicNet) > swap.log 2>&1
    # real    80m23.924s

    cat fb.colAng1.chainGrcH38P11Link.txt
    # 2355021477 bases of 2679973137 (87.875%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -workhorse=hgwdev -buildDir=`pwd` \
        colAng1 grcH38P11) > rbest.log 2>&1
    # real    224m29.002s

#############################################################################
# Macaca nemestrina/pig-tailed macaque lastz run (TODO - 2017-02-27 - Angie)
    screen -S grcH38P11MacNem1      # use a screen to manage this longish running job
    mkdir /hive/data/genomes/grcH38P11/bed/lastzMacNem1.2017-02-27
    cd /hive/data/genomes/grcH38P11/bed/lastzMacNem1.2017-02-27

    # always set the BLASTZ program so we know what version was used
    printf "# human vs pig-tailed macaque
BLASTZ=/cluster/bin/penn/lastz-distrib-1.03.66/bin/lastz
# maximum M allowed with lastz is only 254
BLASTZ_M=254
BLASTZ_Q=/scratch/data/blastz/human_chimp.v2.q
BLASTZ_O=600
BLASTZ_E=150
# other parameters from panTro2 vs hg18 lastz on advice from Webb
BLASTZ_K=4500
BLASTZ_Y=15000
BLASTZ_T=2


# TARGET: Human grcH38P11
SEQ1_DIR=/hive/data/genomes/grcH38P11/grcH38P11.2bit
SEQ1_LEN=/hive/data/genomes/grcH38P11/chrom.sizes
SEQ1_CHUNK=20000000
SEQ1_LAP=10000

# QUERY pig-tailed macaque macNem1
SEQ2_DIR=/hive/data/genomes/macNem1/macNem1.2bit
SEQ2_LEN=/hive/data/genomes/macNem1/chrom.sizes
SEQ2_CHUNK=20000000
SEQ2_LAP=0
SEQ2_LIMIT=40
SEQ2_IN_CONTIGS=0

BASE=/hive/data/genomes/grcH38P11/bed/lastzMacNem1.2017-02-27
TMPDIR=/dev/shm
" > DEF

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl `pwd`/DEF -verbose=2 \
        -chainMinScore=5000 -chainLinearGap=medium \
         -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
          -syntenicNet) > do.log 2>&1
    # real    122m14.198s

    cat fb.grcH38P11.chainMacNem1Link.txt
    # 2546912844 bases of 3049335806 (83.524%) in intersection

    # filter with doRecipBest.pl
    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -workhorse=hgwdev -buildDir=`pwd` \
        grcH38P11 macNem1) > rbest.log 2>&1
    # real    201m54.795s
    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -load -continue=load -workhorse=hgwdev \
	-buildDir=`pwd` grcH38P11 macNem1) > loadRBest.log 2>&1 &
    cat fb.grcH38P11.chainRBestMacNem1Link.txt
    # 2376010543 bases of 3049335806 (77.919%) in intersection

    # create and load up syntenic chainNet: 2017-10-27
cd /hive/data/genomes/grcH38P11/bed/lastzMacNem1.2017-02-27/axtChain
netToAxt grcH38P11.macNem1.syn.net.gz grcH38P11.macNem1.all.chain.gz \
/scratch/data/grcH38P11/grcH38P11.2bit /hive/data/genomes/macNem1/macNem1.2bit stdout \
  | axtSort stdin stdout \
     | axtToChain stdin /hive/data/genomes/grcH38P11/chrom.sizes \
        /hive/data/genomes/macNem1/chrom.sizes stdout \
            | gzip -c > grcH38P11.macNem1.syn.chain.gz
hgLoadChain -tIndex grcH38P11 chainSynMacNem1 grcH38P11.macNem1.syn.chain.gz
netFilter -minGap=10 grcH38P11.macNem1.syn.net.gz \
  | hgLoadNet -verbose=0 grcH38P11 netSynMacNem1 stdin
cd /hive/data/genomes/grcH38P11/bed/lastzMacNem1.2017-02-27
featureBits grcH38P11 chainSynMacNem1Link > fb.grcH38P11.chainSynMacNem1Link.txt 2>&1
cat fb.grcH38P11.chainSynMacNem1Link.txt
# 2505548649 bases of 3049335806 (82.167%) in intersection

    # running the swap
    mkdir /hive/data/genomes/macNem1/bed/blastz.grcH38P11.swap
    cd /hive/data/genomes/macNem1/bed/blastz.grcH38P11.swap
    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl -verbose=2 \
        -swap /hive/data/genomes/grcH38P11/bed/lastzMacNem1.2017-02-27/DEF \
        -chainMinScore=5000 -chainLinearGap=medium \
        -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
        -syntenicNet) > swap.log 2>&1
    # real    82m42.545s

    cat fb.macNem1.chainGrcH38P11Link.txt
    # 2424148087 bases of 2838503083 (85.402%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -workhorse=hgwdev -buildDir=`pwd` \
        macNem1 grcH38P11) > rbest.log 2>&1
    # real    239m15.997s

#############################################################################
# LASTZ human/grcH38P11 Mouse lemur/micMur3 - (TODO - 2017-03-03 - Angie)
    mkdir /hive/data/genomes/grcH38P11/bed/lastzMicMur3.2017-03-03
    cd /hive/data/genomes/grcH38P11/bed/lastzMicMur3.2017-03-03

    printf '# human vs Mouse lemur
BLASTZ=/cluster/bin/penn/lastz-distrib-1.03.66/bin/lastz
# maximum M allowed with lastz is only 254
BLASTZ_M=254
BLASTZ_Q=/scratch/data/blastz/human_chimp.v2.q
BLASTZ_O=600
BLASTZ_E=150
# other parameters from panTro2 vs hg18 lastz on advice from Webb
BLASTZ_K=4500
BLASTZ_Y=15000
BLASTZ_T=2

# TARGET: human grcH38P11
SEQ1_DIR=/hive/data/genomes/grcH38P11/grcH38P11.2bit
SEQ1_LEN=/hive/data/genomes/grcH38P11/chrom.sizes
SEQ1_CHUNK=40000000
SEQ1_LIMIT=10
SEQ1_LAP=10000

# QUERY: Mouse lemur micMur3
SEQ2_DIR=/hive/data/genomes/micMur3/micMur3.2bit
SEQ2_LEN=/hive/data/genomes/micMur3/chrom.sizes
SEQ2_CHUNK=20000000
SEQ2_LIMIT=20
SEQ2_LAP=0

BASE=/hive/data/genomes/grcH38P11/bed/lastzMicMur3.2017-03-03
TMPDIR=/dev/shm
' > DEF


    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl `pwd`/DEF -verbose=2 \
        -chainMinScore=3000 -chainLinearGap=medium \
          -workhorse=hgwdev -smallClusterHub=ku \
            -bigClusterHub=ku -syntenicNet) > do.log 2>&1
    # real    1149m34.034s

    cat fb.grcH38P11.chainMicMur3Link.txt
    # 906521007 bases of 3049335806 (29.728%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -workhorse=hgwdev -buildDir=`pwd` grcH38P11 micMur3) \
          > rbest.log 2>&1 &
    # real    265m38.806s
    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -load -continue=load -workhorse=hgwdev \
	-buildDir=`pwd` grcH38P11 micMur3) > rbest.log 2>&1 &
    cat fb.grcH38P11.chainRBestMicMur3Link.txt
    # 857684217 bases of 3049335806 (28.127%) in intersection

    # create and load up syntenic chainNet: 2017-10-27
cd /hive/data/genomes/grcH38P11/bed/lastzMicMur3.2017-03-03/axtChain
netToAxt grcH38P11.micMur3.syn.net.gz grcH38P11.micMur3.all.chain.gz \
/scratch/data/grcH38P11/grcH38P11.2bit /hive/data/genomes/micMur3/micMur3.2bit stdout \
  | axtSort stdin stdout \
     | axtToChain stdin /hive/data/genomes/grcH38P11/chrom.sizes \
        /hive/data/genomes/micMur3/chrom.sizes stdout \
            | gzip -c > grcH38P11.micMur3.syn.chain.gz
hgLoadChain -tIndex grcH38P11 chainSynMicMur3 grcH38P11.micMur3.syn.chain.gz
netFilter -minGap=10 grcH38P11.micMur3.syn.net.gz \
  | hgLoadNet -verbose=0 grcH38P11 netSynMicMur3 stdin
cd /hive/data/genomes/grcH38P11/bed/lastzMicMur3.2017-03-03
featureBits grcH38P11 chainSynMicMur3Link > fb.grcH38P11.chainSynMicMur3Link.txt 2>&1
cat fb.grcH38P11.chainSynMicMur3Link.txt
# 874918179 bases of 3049335806 (28.692%) in intersection

    # and for the swap:
    mkdir /hive/data/genomes/micMur3/bed/blastz.grcH38P11.swap
    cd /hive/data/genomes/micMur3/bed/blastz.grcH38P11.swap

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl -verbose=2 \
      /hive/data/genomes/grcH38P11/bed/lastzMicMur3.2017-03-03/DEF \
        -swap -chainMinScore=3000 -chainLinearGap=medium \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > swap.log 2>&1
    #  real    42m21.629s

    cat fb.micMur3.chainGrcH38P11Link.txt
    # 880636728 bases of 2386321975 (36.904%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -workhorse=hgwdev -buildDir=`pwd` micMur3 grcH38P11) \
      > rbest.log 2>&1
    # real    296m23.384s

#########################################################################
# LASTZ human/grcH38P11 Chinese pangolin/manPen1 - (TODO - 2017-03-15 - Angie)
    mkdir /hive/data/genomes/grcH38P11/bed/lastzManPen1.2017-03-15
    cd /hive/data/genomes/grcH38P11/bed/lastzManPen1.2017-03-15

    printf '# human vs Chinese pangolin
BLASTZ=/cluster/bin/penn/lastz-distrib-1.03.66/bin/lastz

# TARGET: human grcH38P11
SEQ1_DIR=/hive/data/genomes/grcH38P11/grcH38P11.2bit
SEQ1_LEN=/hive/data/genomes/grcH38P11/chrom.sizes
SEQ1_CHUNK=40000000
SEQ1_LIMIT=30
SEQ1_LAP=10000

# QUERY: Chinese pangolin manPen1
SEQ2_DIR=/hive/data/genomes/manPen1/manPen1.2bit
SEQ2_LEN=/hive/data/genomes/manPen1/chrom.sizes
SEQ2_CHUNK=20000000
SEQ2_LIMIT=120
SEQ2_LAP=0

BASE=/hive/data/genomes/grcH38P11/bed/lastzManPen1.2017-03-15
TMPDIR=/dev/shm
' > DEF

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl -verbose=2 `pwd`/DEF \
        -syntenicNet -fileServer=hgwdev \
        -chainMinScore=3000 -chainLinearGap=medium \
        -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku) > do.log 2>&1
    # real    495m29.451s

    cat fb.grcH38P11.chainManPen1Link.txt
    # 1373891126 bases of 3049335806 (45.055%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -workhorse=hgwdev -buildDir=`pwd` grcH38P11 manPen1) \
          > rbest.log 2>&1 &
    # real    672m29.761s

    # and for the swap:
    mkdir /hive/data/genomes/manPen1/bed/blastz.grcH38P11.swap
    cd /hive/data/genomes/manPen1/bed/blastz.grcH38P11.swap

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl -verbose=2 -swap \
        /hive/data/genomes/grcH38P11/bed/lastzManPen1.2017-03-15/DEF \
        -syntenicNet -fileServer=hgwdev \
        -chainMinScore=3000 -chainLinearGap=medium \
        -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku) > swap.log 2>&1
    #  real    122m34.841s

    cat fb.manPen1.chainGrcH38P11Link.txt
    # 1305035790 bases of 1999066070 (65.282%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -workhorse=hgwdev -buildDir=`pwd` manPen1 grcH38P11) \
      > rbest.log 2>&1
    # real    729m45.645s

#########################################################################
# LASTZ human/grcH38P11 vs. Golden eagle/aquChr2 - (TODO - 2017-03-16 - Angie)
    mkdir /hive/data/genomes/grcH38P11/bed/lastzAquChr2.2017-03-16
    cd /hive/data/genomes/grcH38P11/bed/lastzAquChr2.2017-03-16

    printf "# human vs Golden eagle
BLASTZ=/cluster/bin/penn/lastz-distrib-1.03.66/bin/lastz
BLASTZ_O=400
BLASTZ_E=30
BLASTZ_Y=3400
BLASTZ_L=6000
BLASTZ_K=2200
BLASTZ_M=50
BLASTZ_Q=/scratch/data/blastz/HoxD55.q
#      A    C    G    T
#     91  -90  -25 -100
#    -90  100 -100  -25
#    -25 -100  100  -90
#   -100  -25  -90  91

# TARGET: human grcH38P11
SEQ1_DIR=/hive/data/genomes/grcH38P11/grcH38P11.2bit
SEQ1_LEN=/hive/data/genomes/grcH38P11/chrom.sizes
SEQ1_CHUNK=40000000
SEQ1_LIMIT=30
SEQ1_LAP=10000

# QUERY: Golden eagle aquChr2
SEQ2_DIR=/hive/data/genomes/aquChr2/aquChr2.2bit
SEQ2_LEN=/hive/data/genomes/aquChr2/chrom.sizes
SEQ2_CHUNK=20000000
SEQ2_LIMIT=30
SEQ2_LAP=0

BASE=/hive/data/genomes/grcH38P11/bed/lastzAquChr2.2017-03-16
TMPDIR=/dev/shm
" > DEF
    # << happy emacs

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl `pwd`/DEF -verbose=2 \
        -chainMinScore=5000 -chainLinearGap=loose \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > do.log 2>&1
    # real    249m22.348s

    cat fb.grcH38P11.chainAquChr2Link.txt
    # 168168136 bases of 3049335806 (5.515%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -workhorse=hgwdev -buildDir=`pwd` grcH38P11 aquChr2) \
       > rbest.log 2>&1 &
    # real    288m36.217s

    # and for the swap:
    mkdir /hive/data/genomes/aquChr2/bed/blastz.grcH38P11.swap
    cd /hive/data/genomes/aquChr2/bed/blastz.grcH38P11.swap

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl -verbose=2 \
      /hive/data/genomes/grcH38P11/bed/lastzAquChr2.2017-03-16/DEF \
        -swap -chainMinScore=5000 -chainLinearGap=loose \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > swap.log 2>&1
    #  real    14m18.710s

    cat fb.aquChr2.chainGrcH38P11Link.txt
    # 127935996 bases of 1180019022 (10.842%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -workhorse=hgwdev -buildDir=`pwd` aquChr2 grcH38P11) \
         > rbest.log 2>&1
    # real    180m40.655s

#########################################################################
# LASTZ Cow bisBis1 (TODO - 2017-03-17 - Angie)
    mkdir /hive/data/genomes/grcH38P11/bed/lastzBisBis1.2017-03-17
    cd /hive/data/genomes/grcH38P11/bed/lastzBisBis1.2017-03-17

    printf '# human vs bison
BLASTZ=/cluster/bin/penn/lastz-distrib-1.03.66/bin/lastz
# maximum M allowed with lastz is only 254
BLASTZ_M=254

# TARGET: Human grcH38P11
SEQ1_DIR=/hive/data/genomes/grcH38P11/grcH38P11.2bit
SEQ1_LEN=/hive/data/genomes/grcH38P11/chrom.sizes
SEQ1_CHUNK=40000000
SEQ1_LIMIT=30
SEQ1_LAP=10000

# QUERY: Bison bisBis1
SEQ2_DIR=/hive/data/genomes/bisBis1/bisBis1.2bit
SEQ2_LEN=/hive/data/genomes/bisBis1/chrom.sizes
SEQ2_CHUNK=20000000
SEQ2_LAP=0
SEQ2_LIMIT=100


BASE=/hive/data/genomes/grcH38P11/bed/lastzBisBis1.2017-03-17
TMPDIR=/dev/shm
' > DEF

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl -verbose=2 \
        `pwd`/DEF \
        -syntenicNet -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
        -chainMinScore=3000 -chainLinearGap=medium) > do.log 2>&1
    # real    686m35.655s

    cat fb.grcH38P11.chainBisBis1Link.txt
    # 1392131211 bases of 3049335806 (45.654%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -workhorse=hgwdev -buildDir=`pwd` grcH38P11 bisBis1) \
         > rbest.log 2>&1 &
    # real    585m14.200s

    #   running the swap
    mkdir /hive/data/genomes/bisBis1/bed/blastz.grcH38P11.swap
    cd /hive/data/genomes/bisBis1/bed/blastz.grcH38P11.swap
    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl -verbose=2 \
        /hive/data/genomes/grcH38P11/bed/lastzBisBis1.2017-03-17/DEF \
        -swap  -syntenicNet \
        -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
        -chainMinScore=3000 -chainLinearGap=medium) > swap.log 2>&1
    #   real    374m22.343s

    cat fb.bisBis1.chainGrcH38P11Link.txt
    #   1344953854 bases of 2757854331 (48.768%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -workhorse=hgwdev -buildDir=`pwd` bisBis1 grcH38P11) \
         > rbest.log 2>&1
    # real    828m16.502s

############################################################################
# Rhinopithecus bieti/Black snub-nosed monkey lastz run
#                              (TODO - 2017-03-23 - Angie)
    screen -S grcH38P11RhiBie1      # use a screen to manage this longish running job
    mkdir /hive/data/genomes/grcH38P11/bed/lastzRhiBie1.2017-03-23
    cd /hive/data/genomes/grcH38P11/bed/lastzRhiBie1.2017-03-23

    # always set the BLASTZ program so we know what version was used
    printf "# human vs black snub-nosed monkey
BLASTZ=/cluster/bin/penn/lastz-distrib-1.03.66/bin/lastz
# maximum M allowed with lastz is only 254
BLASTZ_M=254
BLASTZ_Q=/scratch/data/blastz/human_chimp.v2.q
BLASTZ_O=600
BLASTZ_E=150
# other parameters from panTro2 vs hg18 lastz on advice from Webb
BLASTZ_K=4500
BLASTZ_Y=15000
BLASTZ_T=2

# TARGET: Human grcH38P11
SEQ1_DIR=/hive/data/genomes/grcH38P11/grcH38P11.2bit
SEQ1_LEN=/hive/data/genomes/grcH38P11/chrom.sizes
SEQ1_CHUNK=20000000
SEQ1_LAP=10000

# QUERY black snub-nosed monkey rhiBie1
SEQ2_DIR=/hive/data/genomes/rhiBie1/rhiBie1.2bit
SEQ2_LEN=/hive/data/genomes/rhiBie1/chrom.sizes
SEQ2_CHUNK=20000000
SEQ2_LAP=0
SEQ2_LIMIT=300
SEQ2_IN_CONTIGS=0

BASE=/hive/data/genomes/grcH38P11/bed/lastzRhiBie1.2017-03-23
TMPDIR=/dev/shm
" > DEF

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl `pwd`/DEF -verbose=2 \
        -chainMinScore=5000 -chainLinearGap=medium \
         -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
          -syntenicNet) > do.log 2>&1
    # real    156m11.384s

    cat fb.grcH38P11.chainRhiBie1Link.txt
    # 2532928717 bases of 3049335806 (83.065%) in intersection

    # filter with doRecipBest.pl
    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -workhorse=hgwdev -buildDir=`pwd` \
        grcH38P11 rhiBie1) > rbest.log 2>&1
    # real    457m19.209s
    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -load -continue=load -workhorse=hgwdev \
	-buildDir=`pwd` grcH38P11 rhiBie1) > loadRBest.log 2>&1 &
    cat fb.grcH38P11.chainRBestRhiBie1Link.txt
    # 2356179781 bases of 3049335806 (77.269%) in intersection

    # create and load up syntenic chainNet: 2017-10-27
cd /hive/data/genomes/grcH38P11/bed/lastzRhiBie1.2017-03-23/axtChain
netToAxt grcH38P11.rhiBie1.syn.net.gz grcH38P11.rhiBie1.all.chain.gz \
/scratch/data/grcH38P11/grcH38P11.2bit /hive/data/genomes/rhiBie1/rhiBie1.2bit stdout \
  | axtSort stdin stdout \
     | axtToChain stdin /hive/data/genomes/grcH38P11/chrom.sizes \
        /hive/data/genomes/rhiBie1/chrom.sizes stdout \
            | gzip -c > grcH38P11.rhiBie1.syn.chain.gz
hgLoadChain -tIndex grcH38P11 chainSynRhiBie1 grcH38P11.rhiBie1.syn.chain.gz
netFilter -minGap=10 grcH38P11.rhiBie1.syn.net.gz \
  | hgLoadNet -verbose=0 grcH38P11 netSynRhiBie1 stdin
cd /hive/data/genomes/grcH38P11/bed/lastzRhiBie1.2017-03-23
featureBits grcH38P11 chainSynRhiBie1Link > fb.grcH38P11.chainSynRhiBie1Link.txt 2>&1
cat fb.grcH38P11.chainSynRhiBie1Link.txt
# 2453690582 bases of 3049335806 (80.466%) in intersection

    # running the swap
    mkdir /hive/data/genomes/rhiBie1/bed/blastz.grcH38P11.swap
    cd /hive/data/genomes/rhiBie1/bed/blastz.grcH38P11.swap
    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl -verbose=2 \
        -swap /hive/data/genomes/grcH38P11/bed/lastzRhiBie1.2017-03-23/DEF \
        -chainMinScore=5000 -chainLinearGap=medium \
        -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
        -syntenicNet) > swap.log 2>&1
    # real    125m54.338s

    cat fb.rhiBie1.chainGrcH38P11Link.txt
    # 2420545520 bases of 2977074741 (81.306%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -workhorse=hgwdev -buildDir=`pwd` \
        rhiBie1 grcH38P11) > rbest.log 2>&1
    # real    595m32.110s

#############################################################################
# LASTZ human/grcH38P11 vs. X. tropicalis/xenTro9 - (TODO - 2017-03-29 - Angie)
    mkdir /hive/data/genomes/grcH38P11/bed/lastzXenTro9.2017-03-29
    cd /hive/data/genomes/grcH38P11/bed/lastzXenTro9.2017-03-29

    printf '# human vs X. tropicalis
BLASTZ=/cluster/bin/penn/lastz-distrib-1.03.66/bin/lastz
BLASTZ_O=400
BLASTZ_E=30
BLASTZ_Y=3400
BLASTZ_L=6000
BLASTZ_K=2200
BLASTZ_M=50
BLASTZ_Q=/scratch/data/blastz/HoxD55.q
#      A    C    G    T
#     91  -90  -25 -100
#    -90  100 -100  -25
#    -25 -100  100  -90
#   -100  -25  -90  91

# TARGET: human grcH38P11
SEQ1_DIR=/hive/data/genomes/grcH38P11/grcH38P11.2bit
SEQ1_LEN=/hive/data/genomes/grcH38P11/chrom.sizes
SEQ1_CHUNK=40000000
SEQ1_LIMIT=10
SEQ1_LAP=10000

# QUERY: X. tropicalis xenTro9
SEQ2_DIR=/hive/data/genomes/xenTro9/xenTro9.2bit
SEQ2_LEN=/hive/data/genomes/xenTro9/chrom.sizes
SEQ2_CHUNK=20000000
SEQ2_LIMIT=20
SEQ2_LAP=0

BASE=/hive/data/genomes/grcH38P11/bed/lastzXenTro9.2017-03-29
TMPDIR=/dev/shm
' > DEF

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl `pwd`/DEF -verbose=2 \
        -chainMinScore=5000 -chainLinearGap=loose \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > do.log 2>&1 &
    # real    911m54.869s

    # download failed due to hgwdev home directory problem
    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl `pwd`/DEF -verbose=2 \
        -chainMinScore=5000 -chainLinearGap=loose \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -continue=download -syntenicNet) > download.log 2>&1 &
    # real    3m53.808s

    cat fb.grcH38P11.chainXenTro9Link.txt
    # 117720401 bases of 3049335806 (3.861%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -workhorse=hgwdev -buildDir=`pwd` grcH38P11 xenTro9) \
       > rbest.log 2>&1 &
    # real    813m7.491s

    # and for the swap:
    mkdir /hive/data/genomes/xenTro9/bed/blastz.grcH38P11.swap
    cd /hive/data/genomes/xenTro9/bed/blastz.grcH38P11.swap

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl -verbose=2 \
      /hive/data/genomes/grcH38P11/bed/lastzXenTro9.2017-03-29/DEF \
        -swap -chainMinScore=5000 -chainLinearGap=loose \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > swap.log 2>&1
    #  real    61m0.707s

    cat fb.xenTro9.chainGrcH38P11Link.txt
    # 108900066 bases of 1369865365 (7.950%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -workhorse=hgwdev -buildDir=`pwd` xenTro9 grcH38P11) \
       > rbest.log 2>&1
    # real    749m24.229s

#############################################################################
# LASTZ human/grcH38P11 vs. X. laevis/xenLae2 - (TODO - 2017-03-29 - Angie)
    mkdir /hive/data/genomes/grcH38P11/bed/lastzXenLae2.2017-03-29
    cd /hive/data/genomes/grcH38P11/bed/lastzXenLae2.2017-03-29

    printf '# human vs X. laevis
BLASTZ=/cluster/bin/penn/lastz-distrib-1.03.66/bin/lastz
BLASTZ_O=400
BLASTZ_E=30
BLASTZ_Y=3400
BLASTZ_L=6000
BLASTZ_K=2200
BLASTZ_M=50
BLASTZ_Q=/scratch/data/blastz/HoxD55.q
#      A    C    G    T
#     91  -90  -25 -100
#    -90  100 -100  -25
#    -25 -100  100  -90
#   -100  -25  -90  91

# TARGET: human grcH38P11
SEQ1_DIR=/hive/data/genomes/grcH38P11/grcH38P11.2bit
SEQ1_LEN=/hive/data/genomes/grcH38P11/chrom.sizes
SEQ1_CHUNK=40000000
SEQ1_LIMIT=50
SEQ1_LAP=10000

# QUERY: X. laevis xenLae2
SEQ2_DIR=/hive/data/genomes/xenLae2/xenLae2.2bit
SEQ2_LEN=/hive/data/genomes/xenLae2/chrom.sizes
SEQ2_CHUNK=20000000
SEQ2_LIMIT=200
SEQ2_LAP=0

BASE=/hive/data/genomes/grcH38P11/bed/lastzXenLae2.2017-03-29
TMPDIR=/dev/shm
' > DEF

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl `pwd`/DEF -verbose=2 \
        -chainMinScore=5000 -chainLinearGap=loose \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > do.log 2>&1 &
    # real    952m1.703s

    cat fb.grcH38P11.chainXenLae2Link.txt
    # 97526523 bases of 3049335806 (3.198%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -workhorse=hgwdev -buildDir=`pwd` grcH38P11 xenLae2) \
       > rbest.log 2>&1 &
    # real    650m25.803s

    # and for the swap:
    mkdir /hive/data/genomes/xenLae2/bed/blastz.grcH38P11.swap
    cd /hive/data/genomes/xenLae2/bed/blastz.grcH38P11.swap

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl -verbose=2 \
      /hive/data/genomes/grcH38P11/bed/lastzXenLae2.2017-03-29/DEF \
        -swap -chainMinScore=5000 -chainLinearGap=loose \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > swap.log 2>&1
    #  real    28m54.570s

    cat fb.xenLae2.chainGrcH38P11Link.txt
    # 114726989 bases of 2408724787 (4.763%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -workhorse=hgwdev -buildDir=`pwd` xenLae2 grcH38P11) \
       > rbest.log 2>&1
    # real    712m34.326s

#########################################################################
# LASTZ human/grcH38P11 vs. Chinese hamster CHO-K1 cell line/criGriChoV1
#	(TODO - 2017-04-13 - Angie)

    mkdir /hive/data/genomes/grcH38P11/bed/lastzCriGriChoV1.2017-04-13
    cd /hive/data/genomes/grcH38P11/bed/lastzCriGriChoV1.2017-04-13

    printf '# human vs Chinese hamster ovary CHO-K1 cell line
BLASTZ=/cluster/bin/penn/lastz-distrib-1.03.66/bin/lastz
BLASTZ_M=254

# TARGET: human grcH38P11
SEQ1_DIR=/hive/data/genomes/grcH38P11/grcH38P11.2bit
SEQ1_LEN=/hive/data/genomes/grcH38P11/chrom.sizes
SEQ1_CHUNK=40000000
SEQ1_LIMIT=20
SEQ1_LAP=10000

# QUERY: Chinese hamster ovary CHO-K1 cell line criGriChoV1
SEQ2_DIR=/hive/data/genomes/criGriChoV1/criGriChoV1.2bit
SEQ2_LEN=/hive/data/genomes/criGriChoV1/chrom.sizes
SEQ2_CHUNK=20000000
SEQ2_LIMIT=200
SEQ2_LAP=0

BASE=/hive/data/genomes/grcH38P11/bed/lastzCriGriChoV1.2017-04-13
TMPDIR=/dev/shm
' > DEF

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl `pwd`/DEF -verbose=2 \
        -chainMinScore=3000 -chainLinearGap=medium \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -noDbNameCheck -syntenicNet) > do.log 2>&1
    # real    3327m39.074s

    cat fb.grcH38P11.chainCriGriChoV1Link.txt
    # 973293331 bases of 3049335806 (31.918%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -workhorse=hgwdev -buildDir=`pwd` grcH38P11 criGriChoV1) \
       > rbest.log 2>&1 &
    # real    408m18.202s

    # and for the swap:
    mkdir /hive/data/genomes/criGriChoV1/bed/blastz.grcH38P11.swap
    cd /hive/data/genomes/criGriChoV1/bed/blastz.grcH38P11.swap

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl -verbose=2 \
      /hive/data/genomes/grcH38P11/bed/lastzCriGriChoV1.2017-04-13/DEF \
        -swap -chainMinScore=3000 -chainLinearGap=medium \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -noDbNameCheck -syntenicNet) > swap.log 2>&1
    #  real    91m19.847s

    cat fb.criGriChoV1.chainGrcH38P11Link.txt
    # 935724011 bases of 2318132242 (40.365%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -workhorse=hgwdev -buildDir=`pwd` criGriChoV1 grcH38P11) \
       > rbest.log 2>&1 &
    # real    436m55.979s

#########################################################################
# LASTZ human/grcH38P11 Baboon/papAnu3 - (TODO - 2017-06-21 - Angie)
    mkdir /hive/data/genomes/grcH38P11/bed/lastzPapAnu3.2017-06-21
    cd /hive/data/genomes/grcH38P11/bed/lastzPapAnu3.2017-06-21

    printf '# human vs baboon
BLASTZ=/cluster/bin/penn/lastz-distrib-1.03.66/bin/lastz
BLASTZ_M=254

# TARGET: human grcH38P11
SEQ1_DIR=/hive/data/genomes/grcH38P11/grcH38P11.2bit
SEQ1_LEN=/hive/data/genomes/grcH38P11/chrom.sizes
SEQ1_CHUNK=40000000
SEQ1_LIMIT=10
SEQ1_LAP=10000

# QUERY: Baboon papAnu3
SEQ2_DIR=/hive/data/genomes/papAnu3/papAnu3.2bit
SEQ2_LEN=/hive/data/genomes/papAnu3/chrom.sizes
SEQ2_CHUNK=20000000
SEQ2_LIMIT=150
SEQ2_LAP=0

BASE=/hive/data/genomes/grcH38P11/bed/lastzPapAnu3.2017-06-21
TMPDIR=/dev/shm
' > DEF

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl `pwd`/DEF -verbose=2 \
        -chainMinScore=3000 -chainLinearGap=medium \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > do.log 2>&1 &
    # real    1034m57.244s

    cat fb.grcH38P11.chainPapAnu3Link.txt
    # 2632683317 bases of 3049335806 (86.336%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -workhorse=hgwdev -buildDir=`pwd` grcH38P11 papAnu3) \
        > rbest.log 2>&1 &
    # real    488m59.447s
    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -load -continue=load -workhorse=hgwdev \
	-buildDir=`pwd` grcH38P11 papAnu3) > loadRBest.log 2>&1 &
    cat fb.grcH38P11.chainRBestPapAnu3Link.txt
    # 2430072678 bases of 3049335806 (79.692%) in intersection

    # create and load up syntenic chainNet: 2017-10-27
cd /hive/data/genomes/grcH38P11/bed/lastzPapAnu3.2017-06-21/axtChain
netToAxt grcH38P11.papAnu3.syn.net.gz grcH38P11.papAnu3.all.chain.gz \
/scratch/data/grcH38P11/grcH38P11.2bit /hive/data/genomes/papAnu3/papAnu3.2bit stdout \
  | axtSort stdin stdout \
     | axtToChain stdin /hive/data/genomes/grcH38P11/chrom.sizes \
        /hive/data/genomes/papAnu3/chrom.sizes stdout \
            | gzip -c > grcH38P11.papAnu3.syn.chain.gz
hgLoadChain -tIndex grcH38P11 chainSynPapAnu3 grcH38P11.papAnu3.syn.chain.gz
netFilter -minGap=10 grcH38P11.papAnu3.syn.net.gz \
  | hgLoadNet -verbose=0 grcH38P11 netSynPapAnu3 stdin
cd /hive/data/genomes/grcH38P11/bed/lastzPapAnu3.2017-06-21
featureBits grcH38P11 chainSynPapAnu3Link > fb.grcH38P11.chainSynPapAnu3Link.txt 2>&1
cat fb.grcH38P11.chainSynPapAnu3Link.txt
# 2570312354 bases of 3049335806 (84.291%) in intersection

    # and for the swap:
    mkdir /hive/data/genomes/papAnu3/bed/blastz.grcH38P11.swap
    cd /hive/data/genomes/papAnu3/bed/blastz.grcH38P11.swap

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl -verbose=2 \
      /hive/data/genomes/grcH38P11/bed/lastzPapAnu3.2017-06-21/DEF \
        -swap -chainMinScore=3000 -chainLinearGap=medium \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > swap.log 2>&1
    #  real    232m5.391s

    cat fb.papAnu3.chainGrcH38P11Link.txt
    # 2501550280 bases of 2893270787 (86.461%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -workhorse=hgwdev -buildDir=`pwd` papAnu3 grcH38P11) \
      > rbest.log 2>&1
    # real    446m1.402s

#########################################################################
# LASTZ human/grcH38P11 vs. pig/susScr11 - (TODO - 2017-07-31 - Angie)
    mkdir /hive/data/genomes/grcH38P11/bed/lastzSusScr11.2017-07-31
    cd /hive/data/genomes/grcH38P11/bed/lastzSusScr11.2017-07-31

    printf '# human vs pig
BLASTZ=/cluster/bin/penn/lastz-distrib-1.03.66/bin/lastz
BLASTZ_O=400
BLASTZ_E=30
BLASTZ_M=254
# default BLASTZ_Q score matrix:
#       A     C     G     T
# A    91  -114   -31  -123
# C  -114   100  -125   -31
# G   -31  -125   100  -114
# T  -123   -31  -114    91

# TARGET: human grcH38P11
SEQ1_DIR=/hive/data/genomes/grcH38P11/grcH38P11.2bit
SEQ1_LEN=/hive/data/genomes/grcH38P11/chrom.sizes
SEQ1_CHUNK=40000000
SEQ1_LIMIT=5
SEQ1_LAP=10000

# QUERY: pig susScr11
SEQ2_DIR=/hive/data/genomes/susScr11/susScr11.2bit
SEQ2_LEN=/hive/data/genomes/susScr11/chrom.sizes
SEQ2_CHUNK=20000000
SEQ2_LIMIT=5
SEQ2_LAP=0

BASE=/hive/data/genomes/grcH38P11/bed/lastzSusScr11.2017-07-31
TMPDIR=/dev/shm
'> DEF

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl `pwd`/DEF -verbose=2 \
        -chainMinScore=3000 -chainLinearGap=medium \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > do.log 2>&1
    # real    638m46.019s

    cat fb.grcH38P11.chainSusScr11Link.txt
    # 1463754915 bases of 3049335806 (48.002%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -workhorse=hgwdev -buildDir=`pwd` grcH38P11 susScr11) \
	> rbest.log 2>&1 &
    # real    664m31.094s

    # and for the swap:
    mkdir /hive/data/genomes/susScr11/bed/blastz.grcH38P11.swap
    cd /hive/data/genomes/susScr11/bed/blastz.grcH38P11.swap

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl -verbose=2 \
      /hive/data/genomes/grcH38P11/bed/lastzSusScr11.2017-07-31/DEF \
        -swap -chainMinScore=3000 -chainLinearGap=medium \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > swap.log 2>&1
    #  real    107m7.364s

    cat fb.susScr11.chainGrcH38P11Link.txt
    # 1387973267 bases of 2472073034 (56.146%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -workhorse=hgwdev -buildDir=`pwd` susScr11 grcH38P11) \
        > rbest.log 2>&1
    # real    598m8.675s

#########################################################################
# LASTZ human/grcH38P11 vs. Nile tilapia/oreNil3 - (TODO - 2017-07-31 - Angie)
    mkdir /hive/data/genomes/grcH38P11/bed/lastzOreNil3.2017-07-31
    cd /hive/data/genomes/grcH38P11/bed/lastzOreNil3.2017-07-31

    printf '# human vs Nile tilapia
BLASTZ=/cluster/bin/penn/lastz-distrib-1.03.66/bin/lastz
BLASTZ_O=400
BLASTZ_E=30
BLASTZ_Y=3400
BLASTZ_L=6000
BLASTZ_K=2200
BLASTZ_M=50
BLASTZ_Q=/scratch/data/blastz/HoxD55.q
#      A    C    G    T
#     91  -90  -25 -100
#    -90  100 -100  -25
#    -25 -100  100  -90
#   -100  -25  -90  91

# TARGET: human grcH38P11
SEQ1_DIR=/hive/data/genomes/grcH38P11/grcH38P11.2bit
SEQ1_LEN=/hive/data/genomes/grcH38P11/chrom.sizes
SEQ1_CHUNK=40000000
SEQ1_LIMIT=5
SEQ1_LAP=10000

# QUERY: Nile tilapia oreNil3
SEQ2_DIR=/hive/data/genomes/oreNil3/oreNil3.2bit
SEQ2_LEN=/hive/data/genomes/oreNil3/chrom.sizes
SEQ2_CHUNK=20000000
SEQ2_LIMIT=10
SEQ2_LAP=0

BASE=/hive/data/genomes/grcH38P11/bed/lastzOreNil3.2017-07-31
TMPDIR=/dev/shm
' > DEF

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl `pwd`/DEF -verbose=2 \
        -chainMinScore=5000 -chainLinearGap=loose \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > do.log 2>&1 &
    # real    318m42.840s

    cat fb.grcH38P11.chainOreNil3Link.txt
    # 59963651 bases of 3049335806 (1.966%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -workhorse=hgwdev -buildDir=`pwd` grcH38P11 oreNil3) \
       > rbest.log 2>&1 &
    # real    275m9.491s

    # and for the swap:
    mkdir /hive/data/genomes/oreNil3/bed/blastz.grcH38P11.swap
    cd /hive/data/genomes/oreNil3/bed/blastz.grcH38P11.swap

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl -verbose=2 \
      /hive/data/genomes/grcH38P11/bed/lastzOreNil3.2017-07-31/DEF \
        -swap -chainMinScore=5000 -chainLinearGap=loose \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > swap.log 2>&1
    #  real    8m59.810s

    cat fb.oreNil3.chainGrcH38P11Link.txt
    # 56298016 bases of 1009856516 (5.575%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -workhorse=hgwdev -buildDir=`pwd` oreNil3 grcH38P11) \
       > rbest.log 2>&1
    # real    263m17.904s

#########################################################################
# LASTZ human/grcH38P11 drill/manLeu1 - (TODO - 2017-09-25 - Angie)
    mkdir /hive/data/genomes/grcH38P11/bed/lastzManLeu1.2017-09-25
    cd /hive/data/genomes/grcH38P11/bed/lastzManLeu1.2017-09-25

    printf '# human vs drill
BLASTZ=/cluster/bin/penn/lastz-distrib-1.03.66/bin/lastz
# maximum M allowed with lastz is only 254
BLASTZ_M=254
BLASTZ_Q=/scratch/data/blastz/human_chimp.v2.q
BLASTZ_O=600
BLASTZ_E=150
# other parameters from panTro2 vs hg18 lastz on advice from Webb
BLASTZ_K=4500
BLASTZ_Y=15000
BLASTZ_T=2

# TARGET: Human grcH38P11
SEQ1_DIR=/hive/data/genomes/grcH38P11/grcH38P11.2bit
SEQ1_LEN=/hive/data/genomes/grcH38P11/chrom.sizes
SEQ1_CHUNK=20000000
SEQ1_LAP=10000

# QUERY: Drill/Mandrillus leucophaeus manLeu1
SEQ2_DIR=/hive/data/genomes/manLeu1/manLeu1.2bit
SEQ2_LEN=/hive/data/genomes/manLeu1/chrom.sizes
SEQ2_CHUNK=20000000
SEQ2_LIMIT=40
SEQ2_LAP=0
SEQ2_IN_CONTIGS=0

BASE=/hive/data/genomes/grcH38P11/bed/lastzManLeu1.2017-09-25
TMPDIR=/dev/shm
' > DEF
    # << happy emacs

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl -verbose=2 `pwd`/DEF \
        -syntenicNet -fileServer=hgwdev \
        -chainMinScore=5000 -chainLinearGap=medium \
        -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku) > do.log 2>&1
    # real    121m0.485s

    cat fb.grcH38P11.chainManLeu1Link.txt
    # 2515634714 bases of 3049335806 (82.498%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -workhorse=hgwdev -buildDir=`pwd` grcH38P11 manLeu1) \
	> rbest.log 2>&1 &
    # real    287m28.553s
    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -load -continue=load -workhorse=hgwdev \
	-buildDir=`pwd` grcH38P11 manLeu1) > loadRBest.log 2>&1 &
    cat fb.grcH38P11.chainRBestManLeu1Link.txt
    # 2346062769 bases of 3049335806 (76.937%) in intersection

    # create and load up syntenic chainNet: 2017-10-27
cd /hive/data/genomes/grcH38P11/bed/lastzManLeu1.2017-09-25/axtChain
netToAxt grcH38P11.manLeu1.syn.net.gz grcH38P11.manLeu1.all.chain.gz \
/scratch/data/grcH38P11/grcH38P11.2bit /hive/data/genomes/manLeu1/manLeu1.2bit stdout \
  | axtSort stdin stdout \
     | axtToChain stdin /hive/data/genomes/grcH38P11/chrom.sizes \
        /hive/data/genomes/manLeu1/chrom.sizes stdout \
            | gzip -c > grcH38P11.manLeu1.syn.chain.gz
hgLoadChain -tIndex grcH38P11 chainSynManLeu1 grcH38P11.manLeu1.syn.chain.gz
netFilter -minGap=10 grcH38P11.manLeu1.syn.net.gz \
  | hgLoadNet -verbose=0 grcH38P11 netSynManLeu1 stdin
cd /hive/data/genomes/grcH38P11/bed/lastzManLeu1.2017-09-25
featureBits grcH38P11 chainSynManLeu1Link > fb.grcH38P11.chainSynManLeu1Link.txt 2>&1
cat fb.grcH38P11.chainSynManLeu1Link.txt
# 2472880015 bases of 3049335806 (81.096%) in intersection

    # and for the swap:
    mkdir /hive/data/genomes/manLeu1/bed/blastz.grcH38P11.swap
    cd /hive/data/genomes/manLeu1/bed/blastz.grcH38P11.swap

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl -verbose=2 \
      /hive/data/genomes/grcH38P11/bed/lastzManLeu1.2017-09-25/DEF \
        -swap -chainMinScore=5000 -chainLinearGap=medium \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > swap.log 2>&1
    #  real    79m34.951s

    cat fb.manLeu1.chainGrcH38P11Link.txt
    # 2409820927 bases of 2721424086 (88.550%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -workhorse=hgwdev -buildDir=`pwd` manLeu1 grcH38P11) \
	> rbest.log 2>&1
    # real    388m23.086s

#########################################################################
# LASTZ human/grcH38P11 vs. Ma's night monkey/aotNan1 - (TODO - 2017-09-25 - Angie)
    mkdir /hive/data/genomes/grcH38P11/bed/lastzAotNan1.2017-09-25
    cd /hive/data/genomes/grcH38P11/bed/lastzAotNan1.2017-09-25

    printf '# human vs Ma_s night monkey
BLASTZ=/cluster/bin/penn/lastz-distrib-1.03.66/bin/lastz
# maximum M allowed with lastz is only 254
BLASTZ_M=254
BLASTZ_Q=/scratch/data/blastz/human_chimp.v2.q
BLASTZ_O=600
BLASTZ_E=150
# other parameters from panTro2 vs hg18 lastz on advice from Webb
BLASTZ_K=4500
BLASTZ_Y=15000
BLASTZ_T=2

# TARGET: Human grcH38P11
SEQ1_DIR=/hive/data/genomes/grcH38P11/grcH38P11.2bit
SEQ1_LEN=/hive/data/genomes/grcH38P11/chrom.sizes
SEQ1_CHUNK=20000000
SEQ1_LAP=10000

# QUERY: aotNan1 - Ma_s night monkey - Aotus nancymaae
SEQ2_DIR=/hive/data/genomes/aotNan1/aotNan1.2bit
SEQ2_LEN=/hive/data/genomes/aotNan1/chrom.sizes
SEQ2_CHUNK=20000000
SEQ2_LIMIT=100
SEQ2_LAP=0
SEQ2_IN_CONTIGS=0

BASE=/hive/data/genomes/grcH38P11/bed/lastzAotNan1.2017-09-25
TMPDIR=/dev/shm
' > DEF
    # << happy emacs

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl -verbose=2 `pwd`/DEF \
        -syntenicNet -fileServer=hgwdev \
        -chainMinScore=5000 -chainLinearGap=medium \
        -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku) > do.log 2>&1
    # real    205m4.426s

    cat fb.grcH38P11.chainAotNan1Link.txt
    # 2153726630 bases of 3049335806 (70.629%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -workhorse=hgwdev -buildDir=`pwd` grcH38P11 aotNan1) \
	> rbest.log 2>&1 &
    # real    269m4.216s
    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -load -continue=load -workhorse=hgwdev \
	-buildDir=`pwd` grcH38P11 aotNan1) > loadRBest.log 2>&1 &
    cat fb.grcH38P11.chainRBestAotNan1Link.txt
    # 2013684675 bases of 3049335806 (66.037%) in intersection

    # create and load up syntenic chainNet: 2017-10-27
cd /hive/data/genomes/grcH38P11/bed/lastzAotNan1.2017-09-25/axtChain
netToAxt grcH38P11.aotNan1.syn.net.gz grcH38P11.aotNan1.all.chain.gz \
/scratch/data/grcH38P11/grcH38P11.2bit /hive/data/genomes/aotNan1/aotNan1.2bit stdout \
  | axtSort stdin stdout \
     | axtToChain stdin /hive/data/genomes/grcH38P11/chrom.sizes \
        /hive/data/genomes/aotNan1/chrom.sizes stdout \
            | gzip -c > grcH38P11.aotNan1.syn.chain.gz
hgLoadChain -tIndex grcH38P11 chainSynAotNan1 grcH38P11.aotNan1.syn.chain.gz
netFilter -minGap=10 grcH38P11.aotNan1.syn.net.gz \
  | hgLoadNet -verbose=0 grcH38P11 netSynAotNan1 stdin
cd /hive/data/genomes/grcH38P11/bed/lastzAotNan1.2017-09-25
featureBits grcH38P11 chainSynAotNan1Link > fb.grcH38P11.chainSynAotNan1Link.txt 2>&1
cat fb.grcH38P11.chainSynAotNan1Link.txt
# 2098197465 bases of 3049335806 (68.808%) in intersection

    # and for the swap:
    mkdir /hive/data/genomes/aotNan1/bed/blastz.grcH38P11.swap
    cd /hive/data/genomes/aotNan1/bed/blastz.grcH38P11.swap

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl -verbose=2 \
      /hive/data/genomes/grcH38P11/bed/lastzAotNan1.2017-09-25/DEF \
        -swap -chainMinScore=5000 -chainLinearGap=medium \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > swap.log 2>&1
    #  real    84m8.440s

    cat fb.aotNan1.chainGrcH38P11Link.txt
    # 2111600029 bases of 2714439490 (77.791%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -workhorse=hgwdev -buildDir=`pwd` aotNan1 grcH38P11) \
	> rbest.log 2>&1
    # real    427m26.453s

#########################################################################
# LASTZ human/grcH38P11 vs. Hawaiian monk seal/neoSch1 - (TODO - 2017-09-25 - Angie)
    mkdir /hive/data/genomes/grcH38P11/bed/lastzNeoSch1.2017-09-25
    cd /hive/data/genomes/grcH38P11/bed/lastzNeoSch1.2017-09-25

    printf '# human vs Hawaiian monk seal
BLASTZ=/cluster/bin/penn/lastz-distrib-1.03.66/bin/lastz
BLASTZ_O=400
BLASTZ_E=30
BLASTZ_M=254
# default BLASTZ_Q score matrix:
#       A     C     G     T
# A    91  -114   -31  -123
# C  -114   100  -125   -31
# G   -31  -125   100  -114
# T  -123   -31  -114    91

# TARGET: human grcH38P11
SEQ1_DIR=/hive/data/genomes/grcH38P11/grcH38P11.2bit
SEQ1_LEN=/hive/data/genomes/grcH38P11/chrom.sizes
SEQ1_CHUNK=40000000
SEQ1_LIMIT=5
SEQ1_LAP=10000

# QUERY: Hawaiian monk seal - neoSch1
SEQ2_DIR=/hive/data/genomes/neoSch1/neoSch1.2bit
SEQ2_LEN=/hive/data/genomes/neoSch1/chrom.sizes
SEQ2_CHUNK=20000000
SEQ2_LIMIT=50
SEQ2_LAP=0

BASE=/hive/data/genomes/grcH38P11/bed/lastzNeoSch1.2017-09-25
TMPDIR=/dev/shm
'> DEF

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl `pwd`/DEF -verbose=2 \
        -chainMinScore=3000 -chainLinearGap=medium \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > do.log 2>&1
    # real    512m6.939s

    cat fb.grcH38P11.chainNeoSch1Link.txt
    # 1586260720 bases of 3049335806 (52.020%) in intersection
    cat fb.grcH38P11.chainSynNeoSch1Link.txt
    # 1515015853 bases of 3049335806 (49.683%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -load -workhorse=hgwdev -buildDir=`pwd` grcH38P11 neoSch1) \
	> rbest.log 2>&1 &
    # real    475m3.278s

    cat fb.grcH38P11.chainRBestNeoSch1Link.txt
    # 1455520429 bases of 3049335806 (47.732%) in intersection

    # and for the swap:
    mkdir /hive/data/genomes/neoSch1/bed/blastz.grcH38P11.swap
    cd /hive/data/genomes/neoSch1/bed/blastz.grcH38P11.swap

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl -verbose=2 \
      /hive/data/genomes/grcH38P11/bed/lastzNeoSch1.2017-09-25/DEF \
        -swap -chainMinScore=3000 -chainLinearGap=medium \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > swap.log 2>&1
    #  real    108m21.523s

    cat fb.neoSch1.chainGrcH38P11Link.txt
    # 1483929997 bases of 2400839308 (61.809%) in intersection
    cat fb.neoSch1.chainSynGrcH38P11Link.txt
    # 1446564285 bases of 2400839308 (60.252%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -load -workhorse=hgwdev -buildDir=`pwd` neoSch1 grcH38P11) \
        > rbest.log 2>&1
    # real    404m14.530s

    cat fb.neoSch1.chainRBestGrcH38P11Link.txt
    # 1455431042 bases of 2400839308 (60.622%) in intersection

#########################################################################
# LASTZ human/grcH38P11 vs. Sooty mangabey/cerAty1 - (TODO - 2017-09-27 - Angie)
    mkdir /hive/data/genomes/grcH38P11/bed/lastzCerAty1.2017-09-27
    cd /hive/data/genomes/grcH38P11/bed/lastzCerAty1.2017-09-27

    printf '# human vs Sooty mangabey
BLASTZ=/cluster/bin/penn/lastz-distrib-1.03.66/bin/lastz
# maximum M allowed with lastz is only 254
BLASTZ_M=254
BLASTZ_Q=/scratch/data/blastz/human_chimp.v2.q
BLASTZ_O=600
BLASTZ_E=150
# other parameters from panTro2 vs hg18 lastz on advice from Webb
BLASTZ_K=4500
BLASTZ_Y=15000
BLASTZ_T=2

# TARGET: Human grcH38P11
SEQ1_DIR=/hive/data/genomes/grcH38P11/grcH38P11.2bit
SEQ1_LEN=/hive/data/genomes/grcH38P11/chrom.sizes
SEQ1_CHUNK=20000000
SEQ1_LAP=10000

# QUERY: cerAty1 - Sooty mangabey - Cercocebus atys
SEQ2_DIR=/hive/data/genomes/cerAty1/cerAty1.2bit
SEQ2_LEN=/hive/data/genomes/cerAty1/chrom.sizes
SEQ2_CHUNK=20000000
SEQ2_LIMIT=50
SEQ2_LAP=0
SEQ2_IN_CONTIGS=0

BASE=/hive/data/genomes/grcH38P11/bed/lastzCerAty1.2017-09-27
TMPDIR=/dev/shm
' > DEF

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl -verbose=2 `pwd`/DEF \
        -syntenicNet -fileServer=hgwdev \
        -chainMinScore=5000 -chainLinearGap=medium \
        -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku) > do.log 2>&1
    # real    202m34.990s

    cat fb.grcH38P11.chainCerAty1Link.txt
    # 2556764791 bases of 3049335806 (83.847%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -workhorse=hgwdev -buildDir=`pwd` grcH38P11 cerAty1) \
	> rbest.log 2>&1 &
    # real    188m38.348s
    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -load -continue=load -workhorse=hgwdev \
	-buildDir=`pwd` grcH38P11 cerAty1) > loadRBest.log 2>&1 &
    cat fb.grcH38P11.chainRBestCerAty1Link.txt
    # 2383692825 bases of 3049335806 (78.171%) in intersection

    # create and load up syntenic chainNet: 2017-10-27
cd /hive/data/genomes/grcH38P11/bed/lastzCerAty1.2017-09-27/axtChain
netToAxt grcH38P11.cerAty1.syn.net.gz grcH38P11.cerAty1.all.chain.gz \
/scratch/data/grcH38P11/grcH38P11.2bit /hive/data/genomes/cerAty1/cerAty1.2bit stdout \
  | axtSort stdin stdout \
     | axtToChain stdin /hive/data/genomes/grcH38P11/chrom.sizes \
        /hive/data/genomes/cerAty1/chrom.sizes stdout \
            | gzip -c > grcH38P11.cerAty1.syn.chain.gz
hgLoadChain -tIndex grcH38P11 chainSynCerAty1 grcH38P11.cerAty1.syn.chain.gz
netFilter -minGap=10 grcH38P11.cerAty1.syn.net.gz \
  | hgLoadNet -verbose=0 grcH38P11 netSynCerAty1 stdin
cd /hive/data/genomes/grcH38P11/bed/lastzCerAty1.2017-09-27
featureBits grcH38P11 chainSynCerAty1Link > fb.grcH38P11.chainSynCerAty1Link.txt 2>&1
cat fb.grcH38P11.chainSynCerAty1Link.txt
# 2516680168 bases of 3049335806 (82.532%) in intersection

    # and for the swap:
    mkdir /hive/data/genomes/cerAty1/bed/blastz.grcH38P11.swap
    cd /hive/data/genomes/cerAty1/bed/blastz.grcH38P11.swap

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl -verbose=2 \
      /hive/data/genomes/grcH38P11/bed/lastzCerAty1.2017-09-27/DEF \
        -swap -chainMinScore=5000 -chainLinearGap=medium \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > swap.log 2>&1
    #  real    84m53.559s

    cat fb.cerAty1.chainGrcH38P11Link.txt
    # 2424226994 bases of 2787289397 (86.974%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -workhorse=hgwdev -buildDir=`pwd` cerAty1 grcH38P11) \
	> rbest.log 2>&1
    # real    226m2.420s

#########################################################################
# LASTZ human/grcH38P11 vs. Sooty mangabey/proCoq1 - (TODO - 2017-09-28 - Angie)
    mkdir /hive/data/genomes/grcH38P11/bed/lastzProCoq1.2017-09-28
    cd /hive/data/genomes/grcH38P11/bed/lastzProCoq1.2017-09-28

    printf '# human vs Coquerel_s sifaka
BLASTZ=/cluster/bin/penn/lastz-distrib-1.03.66/bin/lastz
# maximum M allowed with lastz is only 254
BLASTZ_M=254
BLASTZ_Q=/scratch/data/blastz/human_chimp.v2.q
BLASTZ_O=600
BLASTZ_E=150
# other parameters from panTro2 vs hg18 lastz on advice from Webb
BLASTZ_K=4500
BLASTZ_Y=15000
BLASTZ_T=2

# TARGET: Human grcH38P11
SEQ1_DIR=/hive/data/genomes/grcH38P11/grcH38P11.2bit
SEQ1_LEN=/hive/data/genomes/grcH38P11/chrom.sizes
SEQ1_CHUNK=20000000
SEQ1_LAP=10000

# QUERY: proCoq1 - Coquerel_s sifaka - Propithecus coquereli
SEQ2_DIR=/hive/data/genomes/proCoq1/proCoq1.2bit
SEQ2_LEN=/hive/data/genomes/proCoq1/chrom.sizes
SEQ2_CHUNK=20000000
SEQ2_LIMIT=70
SEQ2_LAP=0
SEQ2_IN_CONTIGS=0

BASE=/hive/data/genomes/grcH38P11/bed/lastzProCoq1.2017-09-28
TMPDIR=/dev/shm
' > DEF

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl -verbose=2 `pwd`/DEF \
        -syntenicNet -fileServer=hgwdev \
        -chainMinScore=5000 -chainLinearGap=medium \
        -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku) > do.log 2>&1
    # real    110m38.813s

    cat fb.grcH38P11.chainProCoq1Link.txt
    # 990017370 bases of 3049335806 (32.467%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -workhorse=hgwdev -buildDir=`pwd` grcH38P11 proCoq1) \
	> rbest.log 2>&1 &
    # real    330m51.520s
    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -load -continue=load -workhorse=hgwdev \
	-buildDir=`pwd` grcH38P11 proCoq1) > rbest.log 2>&1 &
    cat fb.grcH38P11.chainRBestProCoq1Link.txt
    # 935801596 bases of 3049335806 (30.689%) in intersection

    # create and load up syntenic chainNet: 2017-10-27
cd /hive/data/genomes/grcH38P11/bed/lastzProCoq1.2017-09-28/axtChain
netToAxt grcH38P11.proCoq1.syn.net.gz grcH38P11.proCoq1.all.chain.gz \
/scratch/data/grcH38P11/grcH38P11.2bit /hive/data/genomes/proCoq1/proCoq1.2bit stdout \
  | axtSort stdin stdout \
     | axtToChain stdin /hive/data/genomes/grcH38P11/chrom.sizes \
        /hive/data/genomes/proCoq1/chrom.sizes stdout \
            | gzip -c > grcH38P11.proCoq1.syn.chain.gz
hgLoadChain -tIndex grcH38P11 chainSynProCoq1 grcH38P11.proCoq1.syn.chain.gz
netFilter -minGap=10 grcH38P11.proCoq1.syn.net.gz \
  | hgLoadNet -verbose=0 grcH38P11 netSynProCoq1 stdin
cd /hive/data/genomes/grcH38P11/bed/lastzProCoq1.2017-09-28
featureBits grcH38P11 chainSynProCoq1Link > fb.grcH38P11.chainSynProCoq1Link.txt 2>&1
cat fb.grcH38P11.chainSynProCoq1Link.txt
# 943897639 bases of 3049335806 (30.954%) in intersection

    # and for the swap:
    mkdir /hive/data/genomes/proCoq1/bed/blastz.grcH38P11.swap
    cd /hive/data/genomes/proCoq1/bed/blastz.grcH38P11.swap

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl -verbose=2 \
      /hive/data/genomes/grcH38P11/bed/lastzProCoq1.2017-09-28/DEF \
        -swap -chainMinScore=5000 -chainLinearGap=medium \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > swap.log 2>&1
    #  real    44m29.295s

    cat fb.proCoq1.chainGrcH38P11Link.txt
    # 953092997 bases of 2083764538 (45.739%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -workhorse=hgwdev -buildDir=`pwd` proCoq1 grcH38P11) \
	> rbest.log 2>&1
    # real    334m45.550s

#########################################################################
# LASTZ human/grcH38P11 vs. White-faced sapajou/cebCap1 - (TODO - 2017-09-28 - Angie)
    mkdir /hive/data/genomes/grcH38P11/bed/lastzCebCap1.2017-09-28
    cd /hive/data/genomes/grcH38P11/bed/lastzCebCap1.2017-09-28

    printf '# human vs White-faced sapajou
BLASTZ=/cluster/bin/penn/lastz-distrib-1.03.66/bin/lastz
# maximum M allowed with lastz is only 254
BLASTZ_M=254
BLASTZ_Q=/scratch/data/blastz/human_chimp.v2.q
BLASTZ_O=600
BLASTZ_E=150
# other parameters from panTro2 vs hg18 lastz on advice from Webb
BLASTZ_K=4500
BLASTZ_Y=15000
BLASTZ_T=2

# TARGET: Human grcH38P11
SEQ1_DIR=/hive/data/genomes/grcH38P11/grcH38P11.2bit
SEQ1_LEN=/hive/data/genomes/grcH38P11/chrom.sizes
SEQ1_CHUNK=20000000
SEQ1_LAP=10000

# QUERY: cebCap1 - White-faced sapajou -  Cebus capucinus imitator
SEQ2_DIR=/hive/data/genomes/cebCap1/cebCap1.2bit
SEQ2_LEN=/hive/data/genomes/cebCap1/chrom.sizes
SEQ2_CHUNK=20000000
SEQ2_LIMIT=30
SEQ2_LAP=0
SEQ2_IN_CONTIGS=0

BASE=/hive/data/genomes/grcH38P11/bed/lastzCebCap1.2017-09-28
TMPDIR=/dev/shm
' > DEF

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl -verbose=2 `pwd`/DEF \
        -syntenicNet -fileServer=hgwdev \
        -chainMinScore=5000 -chainLinearGap=medium \
        -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku) > do.log 2>&1
    # real    169m20.421s

    cat fb.grcH38P11.chainCebCap1Link.txt
    # 2155370668 bases of 3049335806 (70.683%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -workhorse=hgwdev -buildDir=`pwd` grcH38P11 cebCap1) \
	> rbest.log 2>&1 &
    # real    210m50.610s
    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -load -continue=load -workhorse=hgwdev \
	-buildDir=`pwd` grcH38P11 cebCap1) > loadRBest.log 2>&1 &
    cat fb.grcH38P11.chainRBestCebCap1Link.txt
    # 2011508311 bases of 3049335806 (65.965%) in intersection

    # create and load up syntenic chainNet: 2017-10-27
cd /hive/data/genomes/grcH38P11/bed/lastzCebCap1.2017-09-28/axtChain
netToAxt grcH38P11.cebCap1.syn.net.gz grcH38P11.cebCap1.all.chain.gz \
/scratch/data/grcH38P11/grcH38P11.2bit /hive/data/genomes/cebCap1/cebCap1.2bit stdout \
  | axtSort stdin stdout \
     | axtToChain stdin /hive/data/genomes/grcH38P11/chrom.sizes \
        /hive/data/genomes/cebCap1/chrom.sizes stdout \
            | gzip -c > grcH38P11.cebCap1.syn.chain.gz
hgLoadChain -tIndex grcH38P11 chainSynCebCap1 grcH38P11.cebCap1.syn.chain.gz
netFilter -minGap=10 grcH38P11.cebCap1.syn.net.gz \
  | hgLoadNet -verbose=0 grcH38P11 netSynCebCap1 stdin
cd /hive/data/genomes/grcH38P11/bed/lastzCebCap1.2017-09-28
featureBits grcH38P11 chainSynCebCap1Link > fb.grcH38P11.chainSynCebCap1Link.txt 2>&1
cat fb.grcH38P11.chainSynCebCap1Link.txt
# 2113665551 bases of 3049335806 (69.316%) in intersection

    # and for the swap:
    mkdir /hive/data/genomes/cebCap1/bed/blastz.grcH38P11.swap
    cd /hive/data/genomes/cebCap1/bed/blastz.grcH38P11.swap

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl -verbose=2 \
      /hive/data/genomes/grcH38P11/bed/lastzCebCap1.2017-09-28/DEF \
        -swap -chainMinScore=5000 -chainLinearGap=medium \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > swap.log 2>&1
    #  real    76m58.704s

    cat fb.cebCap1.chainGrcH38P11Link.txt
    # 2053319068 bases of 2610518382 (78.656%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -workhorse=hgwdev -buildDir=`pwd` cebCap1 grcH38P11) \
	> rbest.log 2>&1
    # real    227m7.064s

#########################################################################
# LASTZ human/grcH38P11 vs. Sclater's lemur/eulFla1 - (TODO - 2017-10-03 - Angie)
    mkdir /hive/data/genomes/grcH38P11/bed/lastzEulFla1.2017-10-03
    cd /hive/data/genomes/grcH38P11/bed/lastzEulFla1.2017-10-03

    printf '# human vs Sclater_s lemur
BLASTZ=/cluster/bin/penn/lastz-distrib-1.03.66/bin/lastz
# maximum M allowed with lastz is only 254
BLASTZ_M=254
BLASTZ_Q=/scratch/data/blastz/human_chimp.v2.q
BLASTZ_O=600
BLASTZ_E=150
# other parameters from panTro2 vs hg18 lastz on advice from Webb
BLASTZ_K=4500
BLASTZ_Y=15000
BLASTZ_T=2

# TARGET: Human grcH38P11
SEQ1_DIR=/hive/data/genomes/grcH38P11/grcH38P11.2bit
SEQ1_LEN=/hive/data/genomes/grcH38P11/chrom.sizes
SEQ1_CHUNK=20000000
SEQ1_LAP=10000

# QUERY: eulFla1 - Sclater_s lemur - Eulemur flavifrons
SEQ2_DIR=/hive/data/genomes/eulFla1/eulFla1.2bit
SEQ2_LEN=/hive/data/genomes/eulFla1/chrom.sizes
SEQ2_CHUNK=20000000
SEQ2_LIMIT=100
SEQ2_LAP=0
SEQ2_IN_CONTIGS=0

BASE=/hive/data/genomes/grcH38P11/bed/lastzEulFla1.2017-10-03
TMPDIR=/dev/shm
' > DEF

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl -verbose=2 `pwd`/DEF \
        -syntenicNet -fileServer=hgwdev \
        -chainMinScore=5000 -chainLinearGap=medium \
        -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku) > do.log 2>&1
    # real    130m37.028s

    cat fb.grcH38P11.chainEulFla1Link.txt
    # 1016209837 bases of 3049335806 (33.326%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -workhorse=hgwdev -buildDir=`pwd` grcH38P11 eulFla1) \
	> rbest.log 2>&1 &
    # real    214m11.636s
    # loading the recip best results
    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -load -continue=load -workhorse=hgwdev -buildDir=`pwd` grcH38P11 eulFla1) \
	> loadRBest.log 2>&1 &
    # real    5m38.039s
    cat fb.grcH38P11.chainRBestEulFla1Link.txt
    # 961423111 bases of 3049335806 (31.529%) in intersection

    # create and load up syntenic chainNet: 2017-10-27
cd /hive/data/genomes/grcH38P11/bed/lastzEulFla1.2017-10-03/axtChain
netToAxt grcH38P11.eulFla1.syn.net.gz grcH38P11.eulFla1.all.chain.gz \
/scratch/data/grcH38P11/grcH38P11.2bit /hive/data/genomes/eulFla1/eulFla1.2bit stdout \
  | axtSort stdin stdout \
     | axtToChain stdin /hive/data/genomes/grcH38P11/chrom.sizes \
        /hive/data/genomes/eulFla1/chrom.sizes stdout \
            | gzip -c > grcH38P11.eulFla1.syn.chain.gz
hgLoadChain -tIndex grcH38P11 chainSynEulFla1 grcH38P11.eulFla1.syn.chain.gz
netFilter -minGap=10 grcH38P11.eulFla1.syn.net.gz \
  | hgLoadNet -verbose=0 grcH38P11 netSynEulFla1 stdin
cd /hive/data/genomes/grcH38P11/bed/lastzEulFla1.2017-10-03
featureBits grcH38P11 chainSynEulFla1Link > fb.grcH38P11.chainSynEulFla1Link.txt 2>&1
    # real    7m20.440s

cat fb.grcH38P11.chainSynEulFla1Link.txt
    # 973484798 bases of 3049335806 (31.924%) in intersection

    # and for the swap:
    mkdir /hive/data/genomes/eulFla1/bed/blastz.grcH38P11.swap
    cd /hive/data/genomes/eulFla1/bed/blastz.grcH38P11.swap

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl -verbose=2 \
      /hive/data/genomes/grcH38P11/bed/lastzEulFla1.2017-10-03/DEF \
        -swap -chainMinScore=5000 -chainLinearGap=medium \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > swap.log 2>&1
    #  real    48m20.179s

    cat fb.eulFla1.chainGrcH38P11Link.txt
    # 969761746 bases of 2094103399 (46.309%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -workhorse=hgwdev -buildDir=`pwd` eulFla1 grcH38P11) \
	> rbest.log 2>&1
    # real    199m39.734s
    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -load -continue=load -workhorse=hgwdev -buildDir=`pwd` eulFla1 grcH38P11) \
	> loadRBest.log 2>&1
    # real    6m23.578s
    cat fb.eulFla1.chainRBestGrcH38P11Link.txt
    # 961226273 bases of 2094103399 (45.902%) in intersection

#########################################################################
# LASTZ human/grcH38P11 vs. Black lemur/eulMac1 - (TODO - 2017-10-04 - Angie)
    mkdir /hive/data/genomes/grcH38P11/bed/lastzEulMac1.2017-10-04
    cd /hive/data/genomes/grcH38P11/bed/lastzEulMac1.2017-10-04

    printf '# human vs Black lemur
BLASTZ=/cluster/bin/penn/lastz-distrib-1.03.66/bin/lastz
# maximum M allowed with lastz is only 254
BLASTZ_M=254
BLASTZ_Q=/scratch/data/blastz/human_chimp.v2.q
BLASTZ_O=600
BLASTZ_E=150
# other parameters from panTro2 vs hg18 lastz on advice from Webb
BLASTZ_K=4500
BLASTZ_Y=15000
BLASTZ_T=2

# TARGET: Human grcH38P11
SEQ1_DIR=/hive/data/genomes/grcH38P11/grcH38P11.2bit
SEQ1_LEN=/hive/data/genomes/grcH38P11/chrom.sizes
SEQ1_CHUNK=20000000
SEQ1_LAP=10000

# QUERY: eulMac1 - Black lemur - Eulemur macaco
SEQ2_DIR=/hive/data/genomes/eulMac1/eulMac1.2bit
SEQ2_LEN=/hive/data/genomes/eulMac1/chrom.sizes
SEQ2_CHUNK=20000000
SEQ2_LIMIT=100
SEQ2_LAP=0
SEQ2_IN_CONTIGS=0

BASE=/hive/data/genomes/grcH38P11/bed/lastzEulMac1.2017-10-04
TMPDIR=/dev/shm
' > DEF

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl -verbose=2 `pwd`/DEF \
        -syntenicNet -fileServer=hgwdev \
        -chainMinScore=5000 -chainLinearGap=medium \
        -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku) > do.log 2>&1
    # real    66m41.057s

    cat fb.grcH38P11.chainEulMac1Link.txt
    # 1027856175 bases of 3049335806 (33.708%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -workhorse=hgwdev -buildDir=`pwd` grcH38P11 eulMac1) \
	> rbest.log 2>&1 &
    # real    220m20.185s
    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -load -continue=load -workhorse=hgwdev \
	-buildDir=`pwd` grcH38P11 eulMac1) > rbest.log 2>&1 &
    # real    6m20.657s

    cat fb.grcH38P11.chainRBestEulMac1Link.txt
    972709793 bases of 3049335806 (31.899%) in intersection

    # create and load up syntenic chainNet: 2017-10-27
cd /hive/data/genomes/grcH38P11/bed/lastzEulMac1.2017-10-04/axtChain
netToAxt grcH38P11.eulMac1.syn.net.gz grcH38P11.eulMac1.all.chain.gz \
/scratch/data/grcH38P11/grcH38P11.2bit /hive/data/genomes/eulMac1/eulMac1.2bit stdout \
  | axtSort stdin stdout \
     | axtToChain stdin /hive/data/genomes/grcH38P11/chrom.sizes \
        /hive/data/genomes/eulMac1/chrom.sizes stdout \
            | gzip -c > grcH38P11.eulMac1.syn.chain.gz
hgLoadChain -tIndex grcH38P11 chainSynEulMac1 grcH38P11.eulMac1.syn.chain.gz
netFilter -minGap=10 grcH38P11.eulMac1.syn.net.gz \
  | hgLoadNet -verbose=0 grcH38P11 netSynEulMac1 stdin
cd /hive/data/genomes/grcH38P11/bed/lastzEulMac1.2017-10-04
featureBits grcH38P11 chainSynEulMac1Link > fb.grcH38P11.chainSynEulMac1Link.txt 2>&1
cat fb.grcH38P11.chainSynEulMac1Link.txt
# 983839076 bases of 3049335806 (32.264%) in intersection

    # and for the swap:
    mkdir /hive/data/genomes/eulMac1/bed/blastz.grcH38P11.swap
    cd /hive/data/genomes/eulMac1/bed/blastz.grcH38P11.swap

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl -verbose=2 \
      /hive/data/genomes/grcH38P11/bed/lastzEulMac1.2017-10-04/DEF \
        -swap -chainMinScore=5000 -chainLinearGap=medium \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > swap.log 2>&1
    #  real    47m2.650s

    cat fb.eulMac1.chainGrcH38P11Link.txt
    # 979925982 bases of 2101039320 (46.640%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -workhorse=hgwdev -buildDir=`pwd` eulMac1 grcH38P11) \
	> rbest.log 2>&1
    # real    200m34.710s

#########################################################################
# LASTZ Human/grcH38P11 - Tarsier TarSyr2 (TODO - 2018-06-12 - Angie)
    mkdir /hive/data/genomes/grcH38P11/bed/lastzTarSyr2.2018-06-12
    cd /hive/data/genomes/grcH38P11/bed/lastzTarSyr2.2018-06-12

    cat << '_EOF_' > DEF
# human vs tarsier
# parameters obtained from a tuning run of lastz_D
# /hive/users/hiram/multiz/100way/hg38.tarSyr2/hg38.tarSyr2.tuning.top400.txt

BLASTZ=/cluster/bin/penn/lastz-distrib-1.03.54/bin/lastz

BLASTZ_T=2
BLASTZ_O=400
BLASTZ_E=30
BLASTZ_M=50
BLASTZ_X=1000
BLASTZ_Y=3400
BLASTZ_Q=/hive/data/genomes/grcH38P11/bed/lastzTarSyr2.2018-06-12/hg38.tarSyr2.tuning.Q.txt
#       A     C     G     T
# A   100  -172   -29  -118
# C  -172    98  -170   -29
# G   -29  -170    98  -172
# T  -118   -29  -172   100

# TARGET: Human grcH38P11
SEQ1_DIR=/hive/data/genomes/grcH38P11/grcH38P11.2bit
SEQ1_LEN=/hive/data/genomes/grcH38P11/chrom.sizes
SEQ1_CHUNK=20000000
SEQ1_LIMIT=80
SEQ1_LAP=10000

# QUERY: Tarsier tarSyr2
SEQ2_DIR=/hive/data/genomes/tarSyr2/tarSyr2.2bit
SEQ2_LEN=/hive/data/genomes/tarSyr2/chrom.sizes
SEQ2_CHUNK=20000000
SEQ2_LIMIT=500
SEQ2_LAP=0

BASE=/hive/data/genomes/grcH38P11/bed/lastzTarSyr2.2018-06-12
TMPDIR=/dev/shm
_EOF_
    # << happy emacs

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl `pwd`/DEF -verbose=2 \
        -chainMinScore=3000 -chainLinearGap=medium \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > do.log 2>&1
    # real    1223m11.846s

    cat fb.grcH38P11.chainTarSyr2Link.txt
    # 1708294423 bases of 3049335806 (56.022%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -buildDir=`pwd` grcH38P11 tarSyr2) > rbest.log 2>&1 &
    # real    46m29.975s
    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -load -continue=load -workhorse=hgwdev \
	-buildDir=`pwd` grcH38P11 tarSyr2) > loadRBest.log 2>&1 &
    # real    12m28.565s

    cat fb.grcH38P11.chainRBestTarSyr2Link.txt
    # 1563421915 bases of 3049335806 (51.271%) in intersection

    # create and load up syntenic chainNet: 2017-10-27
cd /hive/data/genomes/grcH38P11/bed/lastzTarSyr2.2018-06-12/axtChain
netToAxt grcH38P11.tarSyr2.syn.net.gz grcH38P11.tarSyr2.all.chain.gz \
/scratch/data/grcH38P11/grcH38P11.2bit /hive/data/genomes/tarSyr2/tarSyr2.2bit stdout \
  | axtSort stdin stdout \
     | axtToChain stdin /hive/data/genomes/grcH38P11/chrom.sizes \
        /hive/data/genomes/tarSyr2/chrom.sizes stdout \
            | gzip -c > grcH38P11.tarSyr2.syn.chain.gz
hgLoadChain -tIndex grcH38P11 chainSynTarSyr2 grcH38P11.tarSyr2.syn.chain.gz
netFilter -minGap=10 grcH38P11.tarSyr2.syn.net.gz \
  | hgLoadNet -verbose=0 grcH38P11 netSynTarSyr2 stdin
cd /hive/data/genomes/grcH38P11/bed/lastzTarSyr2.2018-06-12
featureBits grcH38P11 chainSynTarSyr2Link > fb.grcH38P11.chainSynTarSyr2Link.txt 2>&1
cat fb.grcH38P11.chainSynTarSyr2Link.txt
# 1622913627 bases of 3049335806 (53.222%) in intersection

    # and for the swap:
    mkdir /hive/data/genomes/tarSyr2/bed/blastz.grcH38P11.swap
    cd /hive/data/genomes/tarSyr2/bed/blastz.grcH38P11.swap

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl -verbose=2 \
      /hive/data/genomes/grcH38P11/bed/lastzTarSyr2.2018-06-12/DEF \
        -swap -chainMinScore=3000 -chainLinearGap=medium \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > swap.log 2>&1
    #  real    452m27.264s

    cat fb.tarSyr2.chainGrcH38P11Link.txt
    # 1781378574 bases of 3405755564 (52.305%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -buildDir=`pwd` tarSyr2 grcH38P11) > rbest.log 2>&1
    # real    115m47.619s

##############################################################################
# LASTZ Kangaroo Rat DipOrd2 (TODO - 2018-01-01 - Angie)
    mkdir /hive/data/genomes/grcH38P11/bed/lastzDipOrd2.2018-01-01
    cd /hive/data/genomes/grcH38P11/bed/lastzDipOrd2.2018-01-01

    printf '# Human vs. Kangaroo Rat
BLASTZ=/cluster/bin/penn/lastz-distrib-1.03.66/bin/lastz
BLASTZ_O=400
BLASTZ_E=30
BLASTZ_M=254
# default BLASTZ_Q score matrix:
#       A     C     G     T
# A    91  -114   -31  -123
# C  -114   100  -125   -31
# G   -31  -125   100  -114
# T  -123   -31  -114    91

# TARGET: Human grcH38P11
SEQ1_DIR=/hive/data/genomes/grcH38P11/grcH38P11.2bit
SEQ1_LEN=/hive/data/genomes/grcH38P11/chrom.sizes
SEQ1_CHUNK=20000000
SEQ1_LAP=10000

# QUERY: Kangaroo Rat
SEQ2_DIR=/hive/data/genomes/dipOrd2/dipOrd2.2bit
SEQ2_LEN=/hive/data/genomes/dipOrd2/chrom.sizes
SEQ2_CHUNK=20000000
SEQ2_LIMIT=180
SEQ2_LAP=0

BASE=/hive/data/genomes/grcH38P11/bed/lastzDipOrd2.2018-01-01
TMPDIR=/dev/shm
' > DEF

    #	establish a screen to control this job
    screen
    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl `pwd`/DEF -verbose=2 \
        -chainMinScore=3000 -chainLinearGap=medium \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > do.log 2>&1 &
    #	real    435m37.638s

    cat fb.grcH38P11.chainDipOrd2Link.txt
    # 1001007354 bases of 3049335806 (32.827%) in intersection
    cat fb.grcH38P11.chainSynDipOrd2Link.txt
    # 934602735 bases of 3049335806 (30.649%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -load -workhorse=hgwdev \
	-buildDir=`pwd` grcH38P11 dipOrd2) > rbest.log 2>&1 &
    #	real    424m7.155s

    cat fb.grcH38P11.chainRBestDipOrd2Link.txt
    # 921538020 bases of 3049335806 (30.221%) in intersection

    # and for the swap:
    mkdir /hive/data/genomes/dipOrd2/bed/blastz.grcH38P11.swap
    cd /hive/data/genomes/dipOrd2/bed/blastz.grcH38P11.swap
    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl -verbose=2 \
        /hive/data/genomes/grcH38P11/bed/lastzDipOrd2.2018-01-01/DEF \
        -chainMinScore=3000 -chainLinearGap=medium \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -swap -syntenicNet) > swap.log 2>&1 &
    # real    97m8.750s

    cat fb.dipOrd2.chainGrcH38P11Link.txt
    # 957281496 bases of 2065314047 (46.350%) in intersection
    cat fb.dipOrd2.chainSynGrcH38P11Link.txt
    # 905805640 bases of 2065314047 (43.858%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -load -workhorse=hgwdev \
	-buildDir=`pwd` dipOrd2 grcH38P11) > rbest.log 2>&1 &
    # real    431m28.226s

    cat fb.dipOrd2.chainRBestGrcH38P11Link.txt
    # 923041001 bases of 2065314047 (44.693%) in intersection

##############################################################################
# LASTZ Damara mole rat - Fukomys damarensis (TODO - 2018-01-01 - Angie)
    mkdir /hive/data/genomes/grcH38P11/bed/lastzFukDam1.2018-01-01
    cd /hive/data/genomes/grcH38P11/bed/lastzFukDam1.2018-01-01

    printf '# Human vs. Damara mole rat
BLASTZ=/cluster/bin/penn/lastz-distrib-1.03.66/bin/lastz
BLASTZ_O=400
BLASTZ_E=30
BLASTZ_M=254
# default BLASTZ_Q score matrix:
#       A     C     G     T
# A    91  -114   -31  -123
# C  -114   100  -125   -31
# G   -31  -125   100  -114
# T  -123   -31  -114    91

# TARGET: Human grcH38P11
SEQ1_DIR=/hive/data/genomes/grcH38P11/grcH38P11.2bit
SEQ1_LEN=/hive/data/genomes/grcH38P11/chrom.sizes
SEQ1_CHUNK=20000000
SEQ1_LAP=10000

# QUERY: Damara mole rat
SEQ2_DIR=/hive/data/genomes/fukDam1/fukDam1.2bit
SEQ2_LEN=/hive/data/genomes/fukDam1/chrom.sizes
SEQ2_CHUNK=20000000
SEQ2_LIMIT=200
SEQ2_LAP=0

BASE=/hive/data/genomes/grcH38P11/bed/lastzFukDam1.2018-01-01
TMPDIR=/dev/shm
' > DEF

    #	establish a screen to control this job
    screen
    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl `pwd`/DEF -verbose=2 \
        -chainMinScore=3000 -chainLinearGap=medium \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > do.log 2>&1 &
    #	real    504m13.875s

    cat fb.grcH38P11.chainFukDam1Link.txt
    # 1340852960 bases of 3049335806 (43.972%) in intersection
    cat fb.grcH38P11.chainSynFukDam1Link.txt
    # 1276966958 bases of 3049335806 (41.877%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -load -workhorse=hgwdev \
	-buildDir=`pwd` grcH38P11 fukDam1) > rbest.log 2>&1 &
    #	real    391m20.373s
    cat fb.grcH38P11.chainRBestFukDam1Link.txt
    # 1236966410 bases of 3049335806 (40.565%) in intersection

    # and for the swap:
    mkdir /hive/data/genomes/fukDam1/bed/blastz.grcH38P11.swap
    cd /hive/data/genomes/fukDam1/bed/blastz.grcH38P11.swap
    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl -verbose=2 \
        /hive/data/genomes/grcH38P11/bed/lastzFukDam1.2018-01-01/DEF \
        -chainMinScore=3000 -chainLinearGap=medium \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -swap -syntenicNet) > swap.log 2>&1 &
    # real    122m19.689s

    cat fb.fukDam1.chainGrcH38P11Link.txt
    # 1290829351 bases of 2285984782 (56.467%) in intersection
    cat fb.fukDam1.chainSynGrcH38P11Link.txt
    # 1233187886 bases of 2285984782 (53.946%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -load -workhorse=hgwdev \
	-buildDir=`pwd` fukDam1 grcH38P11) > rbest.log 2>&1 &
    # real    456m33.399s

    cat fb.fukDam1.chainRBestGrcH38P11Link.txt
    # 1238697651 bases of 2285984782 (54.187%) in intersection

##############################################################################
# Chimp Lastz run (TODO - 2018-01-03 - Angie)
    screen -S grcH38P11PanTro3      # use a screen to manage this longish running job
    mkdir /hive/data/genomes/grcH38P11/bed/lastzPanTro3.2018-01-03
    cd /hive/data/genomes/grcH38P11/bed/lastzPanTro3.2018-01-03

    # always set the BLASTZ program so we know what version was used
    printf "# human vs chimp
BLASTZ=/cluster/bin/penn/lastz-distrib-1.03.66/bin/lastz
BLASTZ_T=2
BLASTZ_O=600
BLASTZ_E=150
BLASTZ_M=254
BLASTZ_K=4500
BLASTZ_L=4500
BLASTZ_Y=15000
BLASTZ_Q=/scratch/data/blastz/human_chimp.v2.q
#    A    C    G    T
#    90 -330 -236 -356
#  -330  100 -318 -236
#  -236 -318  100 -330
#  -356 -236 -330   90

# TARGET: Human grcH38P11
SEQ1_DIR=/scratch/data/grcH38P11/grcH38P11.2bit
SEQ1_LEN=/scratch/data/grcH38P11/chrom.sizes
SEQ1_CHUNK=40000000
SEQ1_LAP=10000
SEQ1_IN_CONTIGS=0

# QUERY: Chimp PanTro3
SEQ2_DIR=/hive/data/genomes/panTro3/panTro3.2bit
SEQ2_LEN=/hive/data/genomes/panTro3/chrom.sizes
SEQ2_CHUNK=20000000
SEQ2_LAP=0
SEQ2_LIMIT=100
SEQ2_IN_CONTIGS=0

BASE=/hive/data/genomes/grcH38P11/bed/lastzPanTro3.2018-01-03
TMPDIR=/dev/shm
" > DEF

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl `pwd`/DEF -verbose=2 \
        -chainMinScore=5000 -chainLinearGap=medium \
        -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
        -syntenicNet) > do.log 2>&1
    # real    170m54.660s

    cat fb.grcH38P11.chainPanTro3Link.txt
    # 2839373050 bases of 3049335806 (93.114%) in intersection
    cat fb.grcH38P11.chainSynPanTro3Link.txt
    # 2805471052 bases of 3049335806 (92.003%) in intersection

    # filter with doRecipBest.pl
    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -load -workhorse=hgwdev -buildDir=`pwd` \
        grcH38P11 panTro3) > rbest.log 2>&1
    # real    122m48.608s

    cat fb.grcH38P11.chainRBestPanTro3Link.txt
    # 2677897807 bases of 3049335806 (87.819%) in intersection

    # running the swap
    mkdir /hive/data/genomes/panTro3/bed/blastz.grcH38P11.swap
    cd /hive/data/genomes/panTro3/bed/blastz.grcH38P11.swap
    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl -verbose=2 \
        -swap /hive/data/genomes/grcH38P11/bed/lastzPanTro3.2018-01-03/DEF \
        -chainMinScore=5000 -chainLinearGap=medium \
        -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
        -syntenicNet) > swap.log 2>&1
    # real    92m7.154s

    cat fb.panTro3.chainGrcH38P11Link.txt
    # 2775323749 bases of 2900529764 (95.683%) in intersection

    cat fb.panTro3.chainSynGrcH38P11Link.txt
    # 2733818111 bases of 2900529764 (94.252%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -load -workhorse=hgwdev -buildDir=`pwd` \
        panTro3 grcH38P11) > rbest.log 2>&1
    # real    173m38.562s

    cat fb.panTro3.chainRBestGrcH38P11Link.txt
    # 2685706565 bases of 2900529764 (92.594%) in intersection

#############################################################################
# LASTZ human/grcH38P11 vs. Chinese hamster CHO-K1 cell line/criGriChoV2
#	(TODO - 2018-01-05 - Angie)

    mkdir /hive/data/genomes/grcH38P11/bed/lastzCriGriChoV2.2018-01-05
    cd /hive/data/genomes/grcH38P11/bed/lastzCriGriChoV2.2018-01-05

    printf '# human vs Chinese hamster ovary CHO-K1 cell line
BLASTZ=/cluster/bin/penn/lastz-distrib-1.03.66/bin/lastz
BLASTZ_M=254

# TARGET: human grcH38P11
SEQ1_DIR=/hive/data/genomes/grcH38P11/grcH38P11.2bit
SEQ1_LEN=/hive/data/genomes/grcH38P11/chrom.sizes
SEQ1_CHUNK=40000000
SEQ1_LIMIT=20
SEQ1_LAP=10000

# QUERY: Chinese hamster ovary CHO-K1 cell line criGriChoV2
SEQ2_DIR=/hive/data/genomes/criGriChoV2/criGriChoV2.2bit
SEQ2_LEN=/hive/data/genomes/criGriChoV2/chrom.sizes
SEQ2_CHUNK=20000000
SEQ2_LIMIT=20
SEQ2_LAP=0

BASE=/hive/data/genomes/grcH38P11/bed/lastzCriGriChoV2.2018-01-05
TMPDIR=/dev/shm
' > DEF

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl `pwd`/DEF -verbose=2 \
        -chainMinScore=3000 -chainLinearGap=medium \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -noDbNameCheck -syntenicNet) > do.log 2>&1
    # real    527m7.679s

    cat fb.grcH38P11.chainCriGriChoV2Link.txt
    # 1016328250 bases of 3049335806 (33.329%) in intersection
    cat fb.grcH38P11.chainSynCriGriChoV2Link.txt
    # 961641546 bases of 3049335806 (31.536%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -load -workhorse=hgwdev -buildDir=`pwd` \
        grcH38P11 criGriChoV2) > rbest.log 2>&1 &
    # real    443m50.337s

    cat fb.grcH38P11.chainRBestCriGriChoV2Link.txt
    # 936450028 bases of 3049335806 (30.710%) in intersection

    # and for the swap:
    mkdir /hive/data/genomes/criGriChoV2/bed/blastz.grcH38P11.swap
    cd /hive/data/genomes/criGriChoV2/bed/blastz.grcH38P11.swap

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl -verbose=2 \
      /hive/data/genomes/grcH38P11/bed/lastzCriGriChoV2.2018-01-05/DEF \
        -swap -chainMinScore=3000 -chainLinearGap=medium \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -noDbNameCheck -syntenicNet) > swap.log 2>&1
    #  real    123m38.716s

    cat fb.criGriChoV2.chainGrcH38P11Link.txt
    # 983638905 bases of 2323924942 (42.327%) in intersection
    cat fb.criGriChoV2.chainSynGrcH38P11Link.txt
    # 932774807 bases of 2323924942 (40.138%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -load -workhorse=hgwdev -buildDir=`pwd` \
	criGriChoV2 grcH38P11) > rbest.log 2>&1 &
    # real    489m43.438s

    cat fb.criGriChoV2.chainRBestGrcH38P11Link.txt
    # 938325634 bases of 2323924942 (40.377%) in intersection

#########################################################################
# LASTZ human/grcH38P11 Baboon/papAnu4 - (TODO - 2018-01-08 - Angie)
    mkdir /hive/data/genomes/grcH38P11/bed/lastzPapAnu4.2018-01-08
    cd /hive/data/genomes/grcH38P11/bed/lastzPapAnu4.2018-01-08

    printf '# human vs baboon
BLASTZ=/cluster/bin/penn/lastz-distrib-1.03.66/bin/lastz
BLASTZ_M=254

# TARGET: human grcH38P11
SEQ1_DIR=/hive/data/genomes/grcH38P11/grcH38P11.2bit
SEQ1_LEN=/hive/data/genomes/grcH38P11/chrom.sizes
SEQ1_CHUNK=40000000
SEQ1_LIMIT=10
SEQ1_LAP=10000

# QUERY: Baboon papAnu4
SEQ2_DIR=/hive/data/genomes/papAnu4/papAnu4.2bit
SEQ2_LEN=/hive/data/genomes/papAnu4/chrom.sizes
SEQ2_CHUNK=20000000
SEQ2_LIMIT=150
SEQ2_LAP=0

BASE=/hive/data/genomes/grcH38P11/bed/lastzPapAnu4.2018-01-08
TMPDIR=/dev/shm
' > DEF

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl `pwd`/DEF -verbose=2 \
        -chainMinScore=3000 -chainLinearGap=medium \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > do.log 2>&1 &
    # real    1300m59.182s

    cat fb.grcH38P11.chainPapAnu4Link.txt
    # 2665048631 bases of 3049335806 (87.398%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -load -workhorse=hgwdev -buildDir=`pwd` grcH38P11 papAnu4) \
        > rbest.log 2>&1 &
    # real    394m33.277s

    cat fb.grcH38P11.chainRBestPapAnu4Link.txt
    # 2462004619 bases of 3049335806 (80.739%) in intersection

    # and for the swap:
    mkdir /hive/data/genomes/papAnu4/bed/blastz.grcH38P11.swap
    cd /hive/data/genomes/papAnu4/bed/blastz.grcH38P11.swap

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl -verbose=2 \
      /hive/data/genomes/grcH38P11/bed/lastzPapAnu4.2018-01-08/DEF \
        -swap -chainMinScore=3000 -chainLinearGap=medium \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
          -syntenicNet) > swap.log 2>&1
    #  real    166m16.865s

    cat fb.papAnu4.chainGrcH38P11Link.txt
    # 2539481835 bases of 2937004939 (86.465%) in intersection
    cat fb.papAnu4.chainSynGrcH38P11Link.txt
    # 2485777123 bases of 2937004939 (84.636%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -load -workhorse=hgwdev -buildDir=`pwd` papAnu4 grcH38P11) \
      > rbest.log 2>&1 &
    # real    483m48.216s

    cat fb.papAnu4.chainRBestGrcH38P11Link.txt
    # 2465241931 bases of 2937004939 (83.937%) in intersection

#########################################################################
# LASTZ human/grcH38P11 vs. guinea pig/cavApe1 - (TODO - 2018-01-08 - Angie)
    mkdir /hive/data/genomes/grcH38P11/bed/lastzCavApe1.2018-01-08
    cd /hive/data/genomes/grcH38P11/bed/lastzCavApe1.2018-01-08

    printf '# human vs guinea pig
BLASTZ=/cluster/bin/penn/lastz-distrib-1.03.66/bin/lastz
BLASTZ_O=400
BLASTZ_E=30
BLASTZ_M=254
# default BLASTZ_Q score matrix:
#       A     C     G     T
# A    91  -114   -31  -123
# C  -114   100  -125   -31
# G   -31  -125   100  -114
# T  -123   -31  -114    91

# TARGET: human grcH38P11
SEQ1_DIR=/hive/data/genomes/grcH38P11/grcH38P11.2bit
SEQ1_LEN=/hive/data/genomes/grcH38P11/chrom.sizes
SEQ1_CHUNK=40000000
SEQ1_LIMIT=30
SEQ1_LAP=10000

# QUERY: guinea pig cavApe1
SEQ2_DIR=/hive/data/genomes/cavApe1/cavApe1.2bit
SEQ2_LEN=/hive/data/genomes/cavApe1/chrom.sizes
SEQ2_CHUNK=20000000
SEQ2_LIMIT=20
SEQ2_LAP=0

BASE=/hive/data/genomes/grcH38P11/bed/lastzCavApe1.2018-01-08
TMPDIR=/dev/shm
' > DEF

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl `pwd`/DEF -verbose=2 \
        -chainMinScore=3000 -chainLinearGap=medium \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > do.log 2>&1 &
    # real    502m28.460s

    cat fb.grcH38P11.chainCavApe1Link.txt
    # 804449430 bases of 3049335806 (26.381%) in intersection
    cat fb.grcH38P11.chainSynCavApe1Link.txt
    # 746370799 bases of 3049335806 (24.477%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -load -workhorse=hgwdev -buildDir=`pwd` \
        grcH38P11 cavApe1) > rbest.log 2>&1 &
    # real    386m40.434s

    cat fb.grcH38P11.chainRBestCavApe1Link.txt
    # 735739254 bases of 3049335806 (24.128%) in intersection

    # and for the swap:
    mkdir /hive/data/genomes/cavApe1/bed/blastz.grcH38P11.swap
    cd /hive/data/genomes/cavApe1/bed/blastz.grcH38P11.swap

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl -verbose=2 \
      /hive/data/genomes/grcH38P11/bed/lastzCavApe1.2018-01-08/DEF \
        -swap -chainMinScore=3000 -chainLinearGap=medium \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > swap.log 2>&1
    #  real    61m35.236s

    cat fb.cavApe1.chainGrcH38P11Link.txt
    # 767670846 bases of 1749140834 (43.888%) in intersection
    cat fb.cavApe1.chainSynGrcH38P11Link.txt
    # 734822213 bases of 1749140834 (42.010%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -load -workhorse=hgwdev -buildDir=`pwd` \
	cavApe1 grcH38P11) > rbest.log 2>&1
    # real    327m9.529s

    cat fb.cavApe1.chainRBestGrcH38P11Link.txt
    # 737288411 bases of 1749140834 (42.151%) in intersection

#########################################################################
# LASTZ human/grcH38P11 vs. Collard flycatcher/ficAlb1 - (TODO - 2018-01-08 - Angie)
    mkdir /hive/data/genomes/grcH38P11/bed/lastzFicAlb1.2018-01-08
    cd /hive/data/genomes/grcH38P11/bed/lastzFicAlb1.2018-01-08

    cat << '_EOF_' > DEF
    printf '# human vs Collard flycatcher
BLASTZ=/cluster/bin/penn/lastz-distrib-1.03.66/bin/lastz
BLASTZ_O=400
BLASTZ_E=30
BLASTZ_Y=3400
BLASTZ_L=6000
BLASTZ_K=2200
BLASTZ_M=50
BLASTZ_Q=/scratch/data/blastz/HoxD55.q
#      A    C    G    T
#     91  -90  -25 -100
#    -90  100 -100  -25
#    -25 -100  100  -90
#   -100  -25  -90  91

# TARGET: human grcH38P11
SEQ1_DIR=/hive/data/genomes/grcH38P11/grcH38P11.2bit
SEQ1_LEN=/hive/data/genomes/grcH38P11/chrom.sizes
SEQ1_CHUNK=40000000
SEQ1_LIMIT=30
SEQ1_LAP=10000

# QUERY: Collard flycatcher ficAlb1
SEQ2_DIR=/hive/data/genomes/ficAlb1/ficAlb1.2bit
SEQ2_LEN=/hive/data/genomes/ficAlb1/chrom.sizes
SEQ2_CHUNK=20000000
SEQ2_LIMIT=30
SEQ2_LAP=0

BASE=/hive/data/genomes/grcH38P11/bed/lastzFicAlb1.2018-01-08
TMPDIR=/dev/shm
_EOF_

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl `pwd`/DEF -verbose=2 \
        -chainMinScore=5000 -chainLinearGap=loose \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > do.log 2>&1 &
    # real    605m22.594s

    cat fb.grcH38P11.chainFicAlb1Link.txt
    # 147048785 bases of 3049335806 (4.822%) in intersection
    cat fb.grcH38P11.chainSynFicAlb1Link.txt
    # 88694039 bases of 3049335806 (2.909%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -load -workhorse=hgwdev -buildDir=`pwd` \
        grcH38P11 ficAlb1) > rbest.log 2>&1 &
    # real    324m34.953s

    cat fb.grcH38P11.chainRBestFicAlb1Link.txt
    # 103439671 bases of 3049335806 (3.392%) in intersection

    # and for the swap:
    mkdir /hive/data/genomes/ficAlb1/bed/blastz.grcH38P11.swap
    cd /hive/data/genomes/ficAlb1/bed/blastz.grcH38P11.swap

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl -verbose=2 \
      /hive/data/genomes/grcH38P11/bed/lastzFicAlb1.2018-01-08/DEF \
        -swap -chainMinScore=5000 -chainLinearGap=loose \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > swap.log 2>&1
    #  real    14m32.727s

    cat fb.ficAlb1.chainGrcH38P11Link.txt
    # 118476285 bases of 1102325870 (10.748%) in intersection
    cat fb.ficAlb1.chainSynGrcH38P11Link.txt
    # 86852014 bases of 1102325870 (7.879%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -load  -workhorse=hgwdev -buildDir=`pwd` \
	ficAlb1 grcH38P11) > rbest.log 2>&1
    # real    265m12.990s

    cat fb.ficAlb1.chainRBestGrcH38P11Link.txt
    # 103174487 bases of 1102325870 (9.360%) in intersection

#########################################################################
# LASTZ human/grcH38P11 vs. lamprey/petMar3 - (TODO - 2018-01-25 - Angie)
    mkdir /hive/data/genomes/grcH38P11/bed/lastzPetMar3.2018-01-25
    cd /hive/data/genomes/grcH38P11/bed/lastzPetMar3.2018-01-25

    printf '# human vs lamprey
BLASTZ=/cluster/bin/penn/lastz-distrib-1.03.66/bin/lastz
BLASTZ_Y=3400
BLASTZ_L=6000
BLASTZ_K=2200
BLASTZ_M=50
BLASTZ_Q=/scratch/data/blastz/HoxD55.q
#      A    C    G    T
#     91  -90  -25 -100
#    -90  100 -100  -25
#    -25 -100  100  -90
#   -100  -25  -90  91

# TARGET: human grcH38P11
SEQ1_DIR=/hive/data/genomes/grcH38P11/grcH38P11.2bit
SEQ1_LEN=/hive/data/genomes/grcH38P11/chrom.sizes
SEQ1_CHUNK=40000000
SEQ1_LIMIT=3
SEQ1_LAP=10000

# QUERY: lamprey petMar3
SEQ2_DIR=/hive/data/genomes/petMar3/petMar3.2bit
SEQ2_LEN=/hive/data/genomes/petMar3/chrom.sizes
SEQ2_CHUNK=20000000
SEQ2_LIMIT=100
SEQ2_LAP=0

BASE=/hive/data/genomes/grcH38P11/bed/lastzPetMar3.2018-01-25
TMPDIR=/dev/shm
' > DEF

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl `pwd`/DEF -verbose=2 \
        -chainMinScore=5000 -chainLinearGap=loose \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > do.log 2>&1
    # real    117m35.788s

    cat fb.grcH38P11.chainPetMar3Link.txt
    # 52661859 bases of 3049335806 (1.727%) in intersection

    cat fb.grcH38P11.chainSynPetMar3Link.txt
    # 1508338 bases of 3049335806 (0.049%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -workhorse=hgwdev -load -buildDir=`pwd` grcH38P11 petMar3) \
	> rbest.log 2>&1 &
    # real    259m50.083s

    cat fb.grcH38P11.chainRBestPetMar3Link.txt
    # 25411380 bases of 3049335806 (0.833%) in intersection

    # and for the swap:
    mkdir /hive/data/genomes/petMar3/bed/blastz.grcH38P11.swap
    cd /hive/data/genomes/petMar3/bed/blastz.grcH38P11.swap

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl -verbose=2 \
      /hive/data/genomes/grcH38P11/bed/lastzPetMar3.2018-01-25/DEF \
        -swap -chainMinScore=5000 -chainLinearGap=loose \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > swap.log 2>&1
    #  real    12m51.092s

    cat fb.petMar3.chainGrcH38P11Link.txt
    # 51300303 bases of 1043181598 (4.918%) in intersection

    cat fb.petMar3.chainSynGrcH38P11Link.txt
    # 1425757 bases of 1043181598 (0.137%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -workhorse=hgwdev -load -buildDir=`pwd` petMar3 grcH38P11) \
	> rbest.log 2>&1 &
    # real    264m26.880s

    cat fb.petMar3.chainRBestGrcH38P11Link.txt
    # 25154743 bases of 1043181598 (2.411%) in intersection

#########################################################################
# LASTZ human/grcH38P11 vs. garter snake/thaSir1 - (TODO - 2018-02-13 - Angie)
    mkdir /hive/data/genomes/grcH38P11/bed/lastzThaSir1.2018-02-13
    cd /hive/data/genomes/grcH38P11/bed/lastzThaSir1.2018-02-13

    # note: first time with this new 1.04.00 version of lastz

    printf '# human vs garter snake
BLASTZ=/cluster/bin/penn/lastz-distrib-1.04.00/bin/lastz
BLASTZ_Y=3400
BLASTZ_L=6000
BLASTZ_K=2200
BLASTZ_M=50
BLASTZ_Q=/scratch/data/blastz/HoxD55.q
#      A    C    G    T
#     91  -90  -25 -100
#    -90  100 -100  -25
#    -25 -100  100  -90
#   -100  -25  -90  91

# TARGET: human grcH38P11
SEQ1_DIR=/hive/data/genomes/grcH38P11/grcH38P11.2bit
SEQ1_LEN=/hive/data/genomes/grcH38P11/chrom.sizes
SEQ1_CHUNK=40000000
SEQ1_LIMIT=3
SEQ1_LAP=10000

# QUERY: garter snake thaSir1
SEQ2_DIR=/hive/data/genomes/thaSir1/thaSir1.2bit
SEQ2_LEN=/hive/data/genomes/thaSir1/chrom.sizes
SEQ2_CHUNK=20000000
SEQ2_LIMIT=28
SEQ2_LAP=0

BASE=/hive/data/genomes/grcH38P11/bed/lastzThaSir1.2018-02-13
TMPDIR=/dev/shm
' > DEF

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl `pwd`/DEF -verbose=2 \
        -chainMinScore=5000 -chainLinearGap=loose \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > do.log 2>&1
    # real    124m58.650s

    cat fb.grcH38P11.chainThaSir1Link.txt
    # 99838535 bases of 3049335806 (3.274%) in intersection

    cat fb.grcH38P11.chainSynThaSir1Link.txt
    # 29432396 bases of 3049335806 (0.965%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -workhorse=hgwdev -load -buildDir=`pwd` grcH38P11 thaSir1)\
	> rbest.log 2>&1 &
    # real    315m43.227s

    cat fb.grcH38P11.chainRBestThaSir1Link.txt
    # 66452884 bases of 3049335806 (2.179%) in intersection

    # and for the swap:
    mkdir /hive/data/genomes/thaSir1/bed/blastz.grcH38P11.swap
    cd /hive/data/genomes/thaSir1/bed/blastz.grcH38P11.swap

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl -verbose=2 \
      /hive/data/genomes/grcH38P11/bed/lastzThaSir1.2018-02-13/DEF \
        -swap -chainMinScore=5000 -chainLinearGap=loose \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > swap.log 2>&1 &
    #  real    16m52.956s

    cat fb.thaSir1.chainGrcH38P11Link.txt
    # 75915958 bases of 1122701795 (6.762%) in intersection

    cat fb.thaSir1.chainSynGrcH38P11Link.txt
    # 28865261 bases of 1122701795 (2.571%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -workhorse=hgwdev -load -buildDir=`pwd` thaSir1 grcH38P11)\
	 > rbest.log 2>&1
    # real    269m56.160s

    cat fb.thaSir1.chainRBestGrcH38P11Link.txt
    # 66545073 bases of 1122701795 (5.927%) in intersection

#########################################################################
# LASTZ human/grcH38P11 vs. cat/felCat9 - (TODO - 2018-03-14 - Angie)
    mkdir /hive/data/genomes/grcH38P11/bed/lastzFelCat9.2018-03-14
    cd /hive/data/genomes/grcH38P11/bed/lastzFelCat9.2018-03-14

    # note: first time with this new 1.04.00 version of lastz

    printf '# human vs cat
BLASTZ=/cluster/bin/penn/lastz-distrib-1.04.00/bin/lastz
BLASTZ_O=400
BLASTZ_E=30
BLASTZ_M=254
# default BLASTZ_Q score matrix:
#       A     C     G     T
# A    91  -114   -31  -123
# C  -114   100  -125   -31
# G   -31  -125   100  -114
# T  -123   -31  -114    91

# TARGET: human grcH38P11
SEQ1_DIR=/hive/data/genomes/grcH38P11/grcH38P11.2bit
SEQ1_LEN=/hive/data/genomes/grcH38P11/chrom.sizes
SEQ1_CHUNK=40000000
SEQ1_LIMIT=30
SEQ1_LAP=10000

# QUERY: cat felCat9
SEQ2_DIR=/hive/data/genomes/felCat9/felCat9.2bit
SEQ2_LEN=/hive/data/genomes/felCat9/chrom.sizes
SEQ2_CHUNK=20000000
SEQ2_LIMIT=100
SEQ2_LAP=0

BASE=/hive/data/genomes/grcH38P11/bed/lastzFelCat9.2018-03-14
TMPDIR=/dev/shm
' > DEF

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl `pwd`/DEF -verbose=2 \
        -chainMinScore=3000 -chainLinearGap=medium \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > do.log 2>&1
    # real    1256m48.240s

    cat fb.grcH38P11.chainFelCat9Link.txt
    # 1579231929 bases of 3049335806 (51.789%) in intersection
    cat fb.grcH38P11.chainSynFelCat9Link.txt
    # 1516804589 bases of 3049335806 (49.742%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -load -workhorse=hgwdev -buildDir=`pwd` grcH38P11 \
	felCat9) > rbest.log 2>&1 &
    # real    704m43.342s

    cat fb.grcH38P11.chainRBestFelCat9Link.txt
    # 1449222744 bases of 3049335806 (47.526%) in intersection

    # and for the swap:
    mkdir /hive/data/genomes/felCat9/bed/blastz.grcH38P11.swap
    cd /hive/data/genomes/felCat9/bed/blastz.grcH38P11.swap

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl -verbose=2 \
      /hive/data/genomes/grcH38P11/bed/lastzFelCat9.2018-03-14/DEF \
        -swap -chainMinScore=3000 -chainLinearGap=medium \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > swap.log 2>&1
    #  real    142m37.100s

    cat fb.felCat9.chainGrcH38P11Link.txt
    # 1486134443 bases of 2476453204 (60.011%) in intersection
    cat fb.felCat9.chainSynGrcH38P11Link.txt
    # 1452577988 bases of 2476453204 (58.656%) in intersection


    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -load -workhorse=hgwdev -buildDir=`pwd` \
	felCat9 grcH38P11) > rbest.log 2>&1 &
    # real    623m28.676s

    cat fb.felCat9.chainRBestGrcH38P11Link.txt
    # 1449521349 bases of 2476453204 (58.532%) in intersection

##############################################################################
# LASTZ Beaver casCan1 (TODO - 2018-03-19 - Angie)
    mkdir /hive/data/genomes/grcH38P11/bed/lastzCasCan1.2018-03-19
    cd /hive/data/genomes/grcH38P11/bed/lastzCasCan1.2018-03-19

    # note: first time with this new 1.04.00 version of lastz

    printf '# Human vs. Beaver
BLASTZ=/cluster/bin/penn/lastz-distrib-1.04.00/bin/lastz
BLASTZ_O=400
BLASTZ_E=30
BLASTZ_M=254
# default BLASTZ_Q score matrix:
#       A     C     G     T
# A    91  -114   -31  -123
# C  -114   100  -125   -31
# G   -31  -125   100  -114
# T  -123   -31  -114    91

# TARGET: Human grcH38P11
SEQ1_DIR=/hive/data/genomes/grcH38P11/grcH38P11.2bit
SEQ1_LEN=/hive/data/genomes/grcH38P11/chrom.sizes
SEQ1_CHUNK=20000000
SEQ1_LIMIT=80
SEQ1_LAP=10000

# QUERY: Beaver
SEQ2_DIR=/hive/data/genomes/casCan1/casCan1.2bit
SEQ2_LEN=/hive/data/genomes/casCan1/chrom.sizes
SEQ2_CHUNK=20000000
SEQ2_LIMIT=80
SEQ2_LAP=0

BASE=/hive/data/genomes/grcH38P11/bed/lastzCasCan1.2018-03-19
TMPDIR=/dev/shm
' > DEF

    #	establish a screen to control this job
    screen
    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl `pwd`/DEF -verbose=2 \
        -chainMinScore=3000 -chainLinearGap=medium \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > do.log 2>&1 &
    #	real    568m56.951s

    cat fb.grcH38P11.chainCasCan1Link.txt
    # 1440538496 bases of 3049335806 (47.241%) in intersection
    cat fb.grcH38P11.chainSynCasCan1Link.txt
    # 1348638697 bases of 3049335806 (44.227%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -load -workhorse=hgwdev \
	-buildDir=`pwd` grcH38P11 casCan1) > rbest.log 2>&1 &
    #	real    903m29.785s

    cat fb.grcH38P11.chainRBestCasCan1Link.txt
    # 1318039475 bases of 3049335806 (43.224%) in intersection

    # and for the swap:
    mkdir /hive/data/genomes/casCan1/bed/blastz.grcH38P11.swap
    cd /hive/data/genomes/casCan1/bed/blastz.grcH38P11.swap
    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl -verbose=2 \
        /hive/data/genomes/grcH38P11/bed/lastzCasCan1.2018-03-19/DEF \
        -chainMinScore=3000 -chainLinearGap=medium \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -swap -syntenicNet) > swap.log 2>&1 &
    # real    141m44.555s

    cat fb.casCan1.chainGrcH38P11Link.txt
    # 1440839903 bases of 2517974654 (57.222%) in intersection
    cat fb.casCan1.chainSynGrcH38P11Link.txt
    # 1348477433 bases of 2517974654 (53.554%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -load -workhorse=hgwdev \
	-buildDir=`pwd` casCan1 grcH38P11) > rbest.log 2>&1 &
    # real    1199m30.336s

    cat fb.casCan1.chainRBestGrcH38P11Link.txt
    # 1321240715 bases of 2517974654 (52.472%) in intersection

##############################################################################
# Chimp Lastz run (TODO - 2018-03-24 - Angie)
    screen -S grcH38P11PanTro6      # use a screen to manage this longish running job
    mkdir /hive/data/genomes/grcH38P11/bed/lastzPanTro6.2018-03-24
    cd /hive/data/genomes/grcH38P11/bed/lastzPanTro6.2018-03-24

    # always set the BLASTZ program so we know what version was used
    printf "# human vs chimp
BLASTZ=/cluster/bin/penn/lastz-distrib-1.04.00/bin/lastz
BLASTZ_T=2
BLASTZ_O=600
BLASTZ_E=150
BLASTZ_M=254
BLASTZ_K=4500
BLASTZ_L=4500
BLASTZ_Y=15000
BLASTZ_Q=/scratch/data/blastz/human_chimp.v2.q
#    A    C    G    T
#    90 -330 -236 -356
#  -330  100 -318 -236
#  -236 -318  100 -330
#  -356 -236 -330   90

# TARGET: Human grcH38P11
SEQ1_DIR=/hive/data/genomes/grcH38P11/grcH38P11.2bit
SEQ1_LEN=/hive/data/genomes/grcH38P11/chrom.sizes
SEQ1_CHUNK=20000000
SEQ1_LIMIT=50
SEQ1_LAP=10000

# QUERY: Chimp PanTro6
SEQ2_DIR=/hive/data/genomes/panTro6/panTro6.2bit
SEQ2_LEN=/hive/data/genomes/panTro6/chrom.sizes
SEQ2_CHUNK=20000000
SEQ2_LAP=0
SEQ2_LIMIT=50
SEQ2_IN_CONTIGS=0

BASE=/hive/data/genomes/grcH38P11/bed/lastzPanTro6.2018-03-24
TMPDIR=/dev/shm
" > DEF

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl `pwd`/DEF -verbose=2 \
        -chainMinScore=5000 -chainLinearGap=medium \
        -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
        -syntenicNet) > do.log 2>&1 &
    # real    239m0.367s

    cat fb.grcH38P11.chainPanTro6Link.txt
    # 2910625246 bases of 3049335806 (95.451%) in intersection
    cat fb.grcH38P11.chainSynPanTro6Link.txt
    # 2890994068 bases of 3049335806 (94.807%) in intersection

    # filter with doRecipBest.pl
    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -load -workhorse=hgwdev -buildDir=`pwd` \
        grcH38P11 panTro6) > rbest.log 2>&1
    # real    103m42.148s

    cat fb.grcH38P11.chainRBestPanTro6Link.txt
    # 2743876160 bases of 3049335806 (89.983%) in intersection

    # running the swap
    mkdir /hive/data/genomes/panTro6/bed/blastz.grcH38P11.swap
    cd /hive/data/genomes/panTro6/bed/blastz.grcH38P11.swap
    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl -verbose=2 \
        -swap /hive/data/genomes/grcH38P11/bed/lastzPanTro6.2018-03-24/DEF \
        -chainMinScore=5000 -chainLinearGap=medium \
        -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
        -syntenicNet) > swap.log 2>&1
    # real    101m29.782s

    cat fb.panTro6.chainGrcH38P11Link.txt
    # 2814507414 bases of 3018592990 (93.239%) in intersection
    cat fb.panTro6.chainSynGrcH38P11Link.txt
    # 2800642800 bases of 3018592990 (92.780%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -load -workhorse=hgwdev -buildDir=`pwd` \
        panTro6 grcH38P11) > rbest.log 2>&1 &
    # real    102m47.533s

    cat fb.panTro6.chainRBestGrcH38P11Link.txt
    # 2748571185 bases of 3018592990 (91.055%) in intersection

##############################################################################
# Orangutan Lastz run (TODO - 2018-03-26 - Angie)
    screen -S grcH38P11PonAbe3      # use a screen to manage this longish running job
    mkdir /hive/data/genomes/grcH38P11/bed/lastzPonAbe3.2018-03-26
    cd /hive/data/genomes/grcH38P11/bed/lastzPonAbe3.2018-03-26

    # always set the BLASTZ program so we know what version was used
    printf "# human vs orangutan
BLASTZ=/cluster/bin/penn/lastz-distrib-1.04.00/bin/lastz
BLASTZ_T=2
BLASTZ_O=600
BLASTZ_E=150
BLASTZ_M=254
BLASTZ_K=4500
BLASTZ_L=4500
BLASTZ_Y=15000
BLASTZ_Q=/scratch/data/blastz/human_chimp.v2.q
#    A    C    G    T
#    90 -330 -236 -356
#  -330  100 -318 -236
#  -236 -318  100 -330
#  -356 -236 -330   90

# TARGET: Human grcH38P11
SEQ1_DIR=/hive/data/genomes/grcH38P11/grcH38P11.2bit
SEQ1_LEN=/hive/data/genomes/grcH38P11/chrom.sizes
SEQ1_CHUNK=20000000
SEQ1_LIMIT=20
SEQ1_LAP=10000

# QUERY: Orangutan PonAbe3
SEQ2_DIR=/hive/data/genomes/ponAbe3/ponAbe3.2bit
SEQ2_LEN=/hive/data/genomes/ponAbe3/chrom.sizes
SEQ2_CHUNK=20000000
SEQ2_LAP=0
SEQ2_LIMIT=20
SEQ2_IN_CONTIGS=0

BASE=/hive/data/genomes/grcH38P11/bed/lastzPonAbe3.2018-03-26
TMPDIR=/dev/shm
" > DEF

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl `pwd`/DEF -verbose=2 \
        -chainMinScore=5000 -chainLinearGap=medium \
        -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
        -syntenicNet) > do.log 2>&1 &
    # real    282m16.272s

    cat fb.grcH38P11.chainPonAbe3Link.txt
    # 2823472924 bases of 3049335806 (92.593%) in intersection
    cat fb.grcH38P11.chainSynPonAbe3Link.txt
    # 2800840721 bases of 3049335806 (91.851%) in intersection

    # filter with doRecipBest.pl
    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -load -workhorse=hgwdev -buildDir=`pwd` \
        grcH38P11 ponAbe3) > rbest.log 2>&1 &
    # real    129m13.848s

    cat fb.grcH38P11.chainRBestPonAbe3Link.txt
    # 2640015618 bases of 3049335806 (86.577%) in intersection

    # running the swap
    mkdir /hive/data/genomes/ponAbe3/bed/blastz.grcH38P11.swap
    cd /hive/data/genomes/ponAbe3/bed/blastz.grcH38P11.swap
    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl -verbose=2 \
        -swap /hive/data/genomes/grcH38P11/bed/lastzPonAbe3.2018-03-26/DEF \
        -chainMinScore=5000 -chainLinearGap=medium \
        -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
        -syntenicNet) > swap.log 2>&1
    # real    92m31.689s

    cat fb.ponAbe3.chainGrcH38P11Link.txt
    # 2693373164 bases of 3043444524 (88.498%) in intersection
    cat fb.ponAbe3.chainSynGrcH38P11Link.txt
    # 2679121264 bases of 3043444524 (88.029%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -load -workhorse=hgwdev -buildDir=`pwd` \
        ponAbe3 grcH38P11) > rbest.log 2>&1 &
    # real    141m23.715s

    cat fb.ponAbe3.chainRBestGrcH38P11Link.txt
    # 2641871600 bases of 3043444524 (86.805%) in intersection

#############################################################################
# LASTZ human/grcH38P11 vs. sheep/oviAri4 - (TODO - 2018-04-25 - Angie)
    mkdir /hive/data/genomes/grcH38P11/bed/lastzOviAri4.2018-04-25
    cd /hive/data/genomes/grcH38P11/bed/lastzOviAri4.2018-04-25

    printf '# human vs sheep
BLASTZ=/cluster/bin/penn/lastz-distrib-1.04.00/bin/lastz
BLASTZ_T=2
BLASTZ_O=400
BLASTZ_E=30
BLASTZ_M=254
# default BLASTZ_Q score matrix:
#       A     C     G     T
# A    91  -114   -31  -123
# C  -114   100  -125   -31
# G   -31  -125   100  -114
# T  -123   -31  -114    91

# TARGET: human grcH38P11
SEQ1_DIR=/hive/data/genomes/grcH38P11/grcH38P11.2bit
SEQ1_LEN=/hive/data/genomes/grcH38P11/chrom.sizes
SEQ1_CHUNK=40000000
SEQ1_LIMIT=5
SEQ1_LAP=10000

# QUERY: Sheep oviAri4
SEQ2_DIR=/hive/data/genomes/oviAri4/oviAri4.2bit
SEQ2_LEN=/hive/data/genomes/oviAri4/chrom.sizes
SEQ2_CHUNK=20000000
SEQ2_LIMIT=40
SEQ2_LAP=0

BASE=/hive/data/genomes/grcH38P11/bed/lastzOviAri4.2018-04-25
TMPDIR=/dev/shm
' > DEF
    # << happy emacs

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl `pwd`/DEF -verbose=2 \
        -chainMinScore=3000 -chainLinearGap=medium \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > do.log 2>&1

    # lineCount: Undefined variable.
    # Command failed:
    # ssh -x -o 'StrictHostKeyChecking = no' -o 'BatchMode = yes' hgwdev \
    #   nice /hive/data/genomes/grcH38P11/bed/lastzOviAri4.2018-04-25/axtChain/netSynteny.csh
    #
    # real  1423m22.844s

    # this took forever because the final job was stuck all night
    # and the syntenic net step failed, so remove the files and run
    # again, just like what happened for mm10:

    rm grcH38P11.oviAri4.syn.chain.gz
    rm grcH38P11.oviAri4.syn.net.gz

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl `pwd`/DEF -verbose=2 \
        -continue=syntenicNet \
        -chainMinScore=3000 -chainLinearGap=medium \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > syntenicNet.log 2>&1 &
    # real    34m23.191s

    cat fb.grcH38P11.chainOviAri4Link.txt
    # 1388649593 bases of 3049335806 (45.539%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -load -workhorse=hgwdev -buildDir=`pwd` grcH38P11 oviAri4) > rbest.log 2>&1 &
    # real    612m50.394s

    # and for the swap:
    mkdir /hive/data/genomes/oviAri4/bed/blastz.grcH38P11.swap
    cd /hive/data/genomes/oviAri4/bed/blastz.grcH38P11.swap

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl -verbose=2 \
      /hive/data/genomes/grcH38P11/bed/lastzOviAri4.2018-04-25/DEF \
        -swap -chainMinScore=3000 -chainLinearGap=medium \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > swap.log 2>&1 &
    #  real    104m31.748s

    cat fb.oviAri4.chainGrcH38P11Link.txt
    # 1319553403 bases of 2587515673 (50.997%) in intersection
    # replacing the previous tuned version:
    # 1193048482 bases of 2534335866 (47.075%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -load -workhorse=hgwdev -buildDir=`pwd` oviAri4 grcH38P11) > rbest.log 2>&1 &
    # real    638m15.603s

#############################################################################
# LASTZ human/grcH38P11 vs. horse/equCab3 - (TODO - 2018-05-25 - Angie)
    mkdir /hive/data/genomes/grcH38P11/bed/lastzEquCab3.2018-05-25
    cd /hive/data/genomes/grcH38P11/bed/lastzEquCab3.2018-05-25

    printf '# human vs horse
BLASTZ=/cluster/bin/penn/lastz-distrib-1.04.00/bin/lastz
BLASTZ_T=2
BLASTZ_O=400
BLASTZ_E=30
BLASTZ_M=254
# default BLASTZ_Q score matrix:
#       A     C     G     T
# A    91  -114   -31  -123
# C  -114   100  -125   -31
# G   -31  -125   100  -114
# T  -123   -31  -114    91

# TARGET: human grcH38P11
SEQ1_DIR=/hive/data/genomes/grcH38P11/grcH38P11.2bit
SEQ1_LEN=/hive/data/genomes/grcH38P11/chrom.sizes
SEQ1_CHUNK=40000000
SEQ1_LIMIT=5
SEQ1_LAP=10000

# QUERY: horse equCab3
SEQ2_DIR=/hive/data/genomes/equCab3/equCab3.2bit
SEQ2_LEN=/hive/data/genomes/equCab3/chrom.sizes
SEQ2_CHUNK=20000000
SEQ2_LIMIT=20
SEQ2_LAP=0

BASE=/hive/data/genomes/grcH38P11/bed/lastzEquCab3.2018-05-25
TMPDIR=/dev/shm
' > DEF
    # << happy emacs

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl `pwd`/DEF -verbose=2 \
        -chainMinScore=3000 -chainLinearGap=medium \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > do.log 2>&1
    # real    519m22.432s

    cat fb.grcH38P11.chainEquCab3Link.txt
    # 1705190736 bases of 3049335806 (55.920%) in intersection

    cat fb.grcH38P11.chainSynEquCab3Link.txt
    # 1642798373 bases of 3049335806 (53.874%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -load -workhorse=hgwdev -buildDir=`pwd` grcH38P11 equCab3) > rbest.log 2>&1 &
XXX - running - Wed Jun  6 09:21:51 PDT 2018
    # real    612m50.394s

    # and for the swap:
    mkdir /hive/data/genomes/equCab3/bed/blastz.grcH38P11.swap
    cd /hive/data/genomes/equCab3/bed/blastz.grcH38P11.swap

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl -verbose=2 \
      /hive/data/genomes/grcH38P11/bed/lastzEquCab3.2018-05-25/DEF \
        -swap -chainMinScore=3000 -chainLinearGap=medium \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > swap.log 2>&1 &
XXX - running - Wed Jun  6 09:21:51 PDT 2018
    #  real    104m31.748s

    cat fb.equCab3.chainGrcH38P11Link.txt
    # 1319553403 bases of 2587515673 (50.997%) in intersection
    # replacing the previous tuned version:
    # 1193048482 bases of 2534335866 (47.075%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -load -workhorse=hgwdev -buildDir=`pwd` equCab3 grcH38P11) > rbest.log 2>&1 &
    # real    638m15.603s


#########################################################################
# LASTZ human/grcH38P11 Proboscis monkey/nasLar1 - (TODO - 2014-12-15 - Angie)
    mkdir /hive/data/genomes/grcH38P11/bed/lastzNasLar1.2014-12-15
    cd /hive/data/genomes/grcH38P11/bed/lastzNasLar1.2014-12-15

    cp -p \
/hive/users/hiram/multiz/100way/hg38.nasLar1/hg38.nasLar1.tuning.top300.txt \
     ./hg38.nasLar1.tuning.Q.txt

    cat << '_EOF_' > DEF
# human vs Proboscis monkey
# parameters obtained from a tuning run of lastz_D
# /hive/users/hiram/multiz/100way/hg38.nasLar1/hg38.nasLar1.tuning.top300.txt

BLASTZ=/cluster/bin/penn/lastz-distrib-1.03.54/bin/lastz
BLASTZ_T=2
BLASTZ_O=400
BLASTZ_E=30
BLASTZ_M=254
BLASTZ_X=1000
BLASTZ_Y=3400
BLASTZ_Q=/hive/data/genomes/grcH38P11/bed/lastzNasLar1.2014-12-15/hg38.nasLar1.tuning.Q.txt
#       A     C     G     T
# A   100  -177   -41  -145
# C  -177    94  -181   -41
# G   -41  -181    94  -177
# T  -145   -41  -177   100

# TARGET: human grcH38P11
SEQ1_DIR=/hive/data/genomes/grcH38P11/grcH38P11.2bit
SEQ1_LEN=/hive/data/genomes/grcH38P11/chrom.sizes
SEQ1_CHUNK=40000000
SEQ1_LIMIT=10
SEQ1_LAP=10000

# QUERY: Proboscis monkey nasLar1
SEQ2_DIR=/hive/data/genomes/nasLar1/nasLar1.2bit
SEQ2_LEN=/hive/data/genomes/nasLar1/chrom.sizes
SEQ2_CHUNK=20000000
SEQ2_LIMIT=700
SEQ2_LAP=0

BASE=/hive/data/genomes/grcH38P11/bed/lastzNasLar1.2014-12-15
TMPDIR=/dev/shm
_EOF_
    # << happy emacs

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl `pwd`/DEF -verbose=2 \
        -chainMinScore=3000 -chainLinearGap=medium \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > do.log 2>&1
    # real    485m32.959s

    cat fb.grcH38P11.chainNasLar1Link.txt
    # 2272993702 bases of 3049335806 (74.541%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -buildDir=`pwd` grcH38P11 nasLar1) > rbest.log 2>&1 &
    # real    55m14.954s
    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -load -continue=load -workhorse=hgwdev \
	-buildDir=`pwd` grcH38P11 nasLar1) > loadRBest.log 2>&1 &
    cat fb.grcH38P11.chainRBestNasLar1Link.txt
    # 2091196276 bases of 3049335806 (68.579%) in intersection

    # create and load up syntenic chainNet: 2017-10-27
cd /hive/data/genomes/grcH38P11/bed/lastzNasLar1.2014-12-15/axtChain
netToAxt grcH38P11.nasLar1.syn.net.gz grcH38P11.nasLar1.all.chain.gz \
/scratch/data/grcH38P11/grcH38P11.2bit /hive/data/genomes/nasLar1/nasLar1.2bit stdout \
  | axtSort stdin stdout \
     | axtToChain stdin /hive/data/genomes/grcH38P11/chrom.sizes \
        /hive/data/genomes/nasLar1/chrom.sizes stdout \
            | gzip -c > grcH38P11.nasLar1.syn.chain.gz
hgLoadChain -tIndex grcH38P11 chainSynNasLar1 grcH38P11.nasLar1.syn.chain.gz
netFilter -minGap=10 grcH38P11.nasLar1.syn.net.gz \
  | hgLoadNet -verbose=0 grcH38P11 netSynNasLar1 stdin
cd /hive/data/genomes/grcH38P11/bed/lastzNasLar1.2014-12-15
featureBits grcH38P11 chainSynNasLar1Link > fb.grcH38P11.chainSynNasLar1Link.txt 2>&1
cat fb.grcH38P11.chainSynNasLar1Link.txt
# 1911545258 bases of 3049335806 (62.687%) in intersection

    # and for the swap:
    mkdir /hive/data/genomes/nasLar1/bed/blastz.grcH38P11.swap
    cd /hive/data/genomes/nasLar1/bed/blastz.grcH38P11.swap

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl -verbose=2 \
      /hive/data/genomes/grcH38P11/bed/lastzNasLar1.2014-12-15/DEF \
        -swap -chainMinScore=3000 -chainLinearGap=medium \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > swap.log 2>&1
    #  real    616m45.774s

    cat fb.nasLar1.chainGrcH38P11Link.txt
    # 2157676376 bases of 2398172200 (89.972%) in intersection

    # did this in two parts when discovered this was running on ku,
    # stopped it there, then finished it off on hgwdev.
    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -buildDir=`pwd` nasLar1 grcH38P11) > rbest.log 2>&1
    # real    119m16.828s
    # real    536m38.397s

#########################################################################
# LASTZ human/grcH38P11 Tree shrew/tupBel1 - (TODO - 2014-12-15 - Angie)
    mkdir /hive/data/genomes/grcH38P11/bed/lastzTupBel1.2014-12-15
    cd /hive/data/genomes/grcH38P11/bed/lastzTupBel1.2014-12-15

    cp -p \
/hive/users/hiram/multiz/100way/hg38.tupBel1/hg38.tupBel1.tuning.top400.txt \
     ./hg38.tupBel1.tuning.Q.txt

    cat << '_EOF_' > DEF
# human vs Tree shrew
# parameters obtained from a tuning run of lastz_D
# /hive/users/hiram/multiz/100way/hg38.tupBel1/hg38.tupBel1.tuning.top400.txt

BLASTZ=/cluster/bin/penn/lastz-distrib-1.03.54/bin/lastz
BLASTZ_T=2
BLASTZ_O=400
BLASTZ_E=30
BLASTZ_M=254
BLASTZ_X=840
BLASTZ_Y=3400
BLASTZ_Q=/hive/data/genomes/grcH38P11/bed/lastzTupBel1.2014-12-15/hg38.tupBel1.tuning.Q.txt
#       A     C     G     T
# A    84  -203   -96  -292
# C  -203   100  -204   -96
# G   -96  -204   100  -203
# T  -292   -96  -203    84

# TARGET: human grcH38P11
SEQ1_DIR=/hive/data/genomes/grcH38P11/grcH38P11.2bit
SEQ1_LEN=/hive/data/genomes/grcH38P11/chrom.sizes
SEQ1_CHUNK=40000000
SEQ1_LIMIT=10
SEQ1_LAP=10000

# QUERY: Tree shrew tupBel1
SEQ2_DIR=/hive/data/genomes/tupBel1/tupBel1.2bit
SEQ2_LEN=/hive/data/genomes/tupBel1/chrom.sizes
SEQ2_CHUNK=20000000
SEQ2_LIMIT=400
SEQ2_LAP=0

BASE=/hive/data/genomes/grcH38P11/bed/lastzTupBel1.2014-12-15
TMPDIR=/dev/shm
_EOF_
    # << happy emacs

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl `pwd`/DEF -verbose=2 \
        -chainMinScore=3000 -chainLinearGap=medium \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > do.log 2>&1
    # real    266m34.212s

    cat fb.grcH38P11.chainTupBel1Link.txt
    # 753229970 bases of 3049335806 (24.701%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -buildDir=`pwd` grcH38P11 tupBel1) > rbest.log 2>&1 &
    # real    29m25.353s

    # and for the swap:
    mkdir /hive/data/genomes/tupBel1/bed/blastz.grcH38P11.swap
    cd /hive/data/genomes/tupBel1/bed/blastz.grcH38P11.swap

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl -verbose=2 \
      /hive/data/genomes/grcH38P11/bed/lastzTupBel1.2014-12-15/DEF \
        -swap -chainMinScore=3000 -chainLinearGap=medium \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > swap.log 2>&1
    #  real    192m16.970s

    cat fb.tupBel1.chainGrcH38P11Link.txt
    # 749930137 bases of 2137225476 (35.089%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -buildDir=`pwd` tupBel1 grcH38P11) > rbest.log 2>&1
    # real    142m10.914s

#########################################################################
# LASTZ human/grcH38P11 Mouse lemur/micMur1 - (TODO - 2014-12-19 - Angie)
    # for some odd reason, these results were lost
    # the same procedure was re-run March 2015 in: lastzMicMur1.2015-03-17
    mkdir /hive/data/genomes/grcH38P11/bed/lastzMicMur1.2014-12-19
    cd /hive/data/genomes/grcH38P11/bed/lastzMicMur1.2014-12-19

    cp -p \
/hive/users/hiram/multiz/100way/hg38.micMur1/hg38.micMur1.tuning.top400.txt \
     ./hg38.micMur1.tuning.Q.txt

    cat << '_EOF_' > DEF
# human vs Mouse lemur
# parameters obtained from a tuning run of lastz_D
# /hive/users/hiram/multiz/100way/hg38.micMur1/hg38.micMur1.tuning.top400.txt

BLASTZ=/cluster/bin/penn/lastz-distrib-1.03.54/bin/lastz
BLASTZ_T=2
BLASTZ_O=400
BLASTZ_E=30
BLASTZ_M=254
BLASTZ_X=1000
BLASTZ_Y=3400
BLASTZ_Q=/hive/data/genomes/grcH38P11/bed/lastzMicMur1.2014-12-19/hg38.micMur1.tuning.Q.txt
#       A     C     G     T
# A   100  -159   -37  -128
# C  -159    93  -186   -37
# G   -37  -186    93  -159
# T  -128   -37  -159   100

# TARGET: human grcH38P11
SEQ1_DIR=/hive/data/genomes/grcH38P11/grcH38P11.2bit
SEQ1_LEN=/hive/data/genomes/grcH38P11/chrom.sizes
SEQ1_CHUNK=40000000
SEQ1_LIMIT=10
SEQ1_LAP=10000

# QUERY: Mouse lemur micMur1
SEQ2_DIR=/hive/data/genomes/micMur1/micMur1.2bit
SEQ2_LEN=/hive/data/genomes/micMur1/chrom.sizes
SEQ2_CHUNK=20000000
SEQ2_LIMIT=400
SEQ2_LAP=0

BASE=/hive/data/genomes/grcH38P11/bed/lastzMicMur1.2014-12-19
TMPDIR=/dev/shm
_EOF_
    # << happy emacs

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl `pwd`/DEF -verbose=2 \
        -chainMinScore=3000 -chainLinearGap=medium \
          -stop=net -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > net.log 2>&1
    # real    116m3.143s

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl `pwd`/DEF -verbose=2 \
        -chainMinScore=3000 -chainLinearGap=medium \
       -continue=load -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > load.log 2>&1
    # real    50m58.488s

    cat fb.grcH38P11.chainMicMur1Link.txt
    # 1300627579 bases of 3049335806 (42.653%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -buildDir=`pwd` grcH38P11 micMur1) > rbest.log 2>&1 &
    # real    39m44.440s
    # the re-run:
    # real    35m41.014s

    # and for the swap:
    mkdir /hive/data/genomes/micMur1/bed/blastz.grcH38P11.swap
    cd /hive/data/genomes/micMur1/bed/blastz.grcH38P11.swap

    time ($HOME/kent/src/hg/utils/automation/doBlastzChainNet.pl -verbose=2 \
      /hive/data/genomes/grcH38P11/bed/lastzMicMur1.2014-12-19/DEF \
        -swap -chainMinScore=3000 -chainLinearGap=medium \
          -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > swap.log 2>&1
    #  real    223m37.152s

    cat fb.micMur1.chainGrcH38P11Link.txt
    # 1253236864 bases of 1852394361 (67.655%) in intersection

    time ($HOME/kent/src/hg/utils/automation/doRecipBest.pl -buildDir=`pwd` micMur1 grcH38P11) > rbest.log 2>&1
    # real    182m5.563s
#########################################################################
