########################################################################
# LASTZ Loa loa/Eye worm - loaLoa1 vs.
#       Brugia malayi/Filarial worm - bruMal2
# (DONE - 2015-08-17 - Hiram)
    mkdir /hive/data/genomes/loaLoa1/bed/lastzBruMal2.2015-08-17
    cd /hive/data/genomes/loaLoa1/bed/lastzBruMal2.2015-08-17

    cat << '_EOF_' > DEF
# loaLoa1 vs bruMal2
BLASTZ=/cluster/bin/penn/lastz-distrib-1.03.66/bin/lastz
BLASTZ_H=2000
BLASTZ_M=50

# TARGET:Loa loa/Eye worm - loaLoa1
SEQ1_DIR=/hive/data/genomes/loaLoa1/loaLoa1.2bit
SEQ1_LEN=/hive/data/genomes/loaLoa1/chrom.sizes
SEQ1_CHUNK=4000000
SEQ1_LAP=10000
SEQ1_LIMIT=100

# QUERY: Brugia malayi/Filarial worm - bruMal2
SEQ2_DIR=/hive/data/genomes/bruMal2/bruMal2.2bit
SEQ2_LEN=/hive/data/genomes/bruMal2/chrom.sizes
SEQ2_CHUNK=4000000
SEQ2_LIMIT=400
SEQ2_LAP=0

BASE=/hive/data/genomes/loaLoa1/bed/lastzBruMal2.2015-08-17
TMPDIR=/dev/shm
'_EOF_'
    # << happy emacs

    time (doBlastzChainNet.pl `pwd`/DEF -verbose=2 -workhorse=hgwdev \
      -bigClusterHub=ku -smallClusterHub=ku -syntenicNet) > do.log 2>&1
    # real 6m40.441s
    cat fb.loaLoa1.chainBruMal2Link.txt
    # 59506732 bases of 87533141 (67.982%) in intersection

    time (doRecipBest.pl -buildDir=`pwd` loaLoa1 bruMal2) > rbest.log 2>&1 &
    # real 1m50.587s

    # and for the swap:
    mkdir /hive/data/genomes/bruMal2/bed/blastz.loaLoa1.swap
    cd /hive/data/genomes/bruMal2/bed/blastz.loaLoa1.swap

    time (doBlastzChainNet.pl -verbose=2 \
      /hive/data/genomes/loaLoa1/bed/lastzBruMal2.2015-08-17/DEF \
        -swap -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > swap.log 2>&1
    # real 6m36.727s
    cat fb.bruMal2.chainLoaLoa1Link.txt
    # 62933229 bases of 87424120 (71.986%) in intersection

    time (doRecipBest.pl -workhorse=hgwdev -buildDir=`pwd` bruMal2 loaLoa1) \
      > rbest.log 2>&1
    # real 2m34.739s

########################################################################
########################################################################
# LASTZ Loa loa/Eye worm - loaLoa1 vs.
#       Onchocerca volvulus/O. volvulus - oncVol1
# (DONE - 2015-08-17 - Hiram)
    mkdir /hive/data/genomes/loaLoa1/bed/lastzOncVol1.2015-08-17
    cd /hive/data/genomes/loaLoa1/bed/lastzOncVol1.2015-08-17

    cat << '_EOF_' > DEF
# loaLoa1 vs oncVol1
BLASTZ=/cluster/bin/penn/lastz-distrib-1.03.66/bin/lastz
BLASTZ_H=2000
BLASTZ_M=50

# TARGET:Loa loa/Eye worm - loaLoa1
SEQ1_DIR=/hive/data/genomes/loaLoa1/loaLoa1.2bit
SEQ1_LEN=/hive/data/genomes/loaLoa1/chrom.sizes
SEQ1_CHUNK=4000000
SEQ1_LAP=10000
SEQ1_LIMIT=100

# QUERY: Onchocerca volvulus/O. volvulus - oncVol1
SEQ2_DIR=/hive/data/genomes/oncVol1/oncVol1.2bit
SEQ2_LEN=/hive/data/genomes/oncVol1/chrom.sizes
SEQ2_CHUNK=4000000
SEQ2_LIMIT=400
SEQ2_LAP=0

BASE=/hive/data/genomes/loaLoa1/bed/lastzOncVol1.2015-08-17
TMPDIR=/dev/shm
'_EOF_'
    # << happy emacs

    time (doBlastzChainNet.pl `pwd`/DEF -verbose=2 -workhorse=hgwdev \
      -bigClusterHub=ku -smallClusterHub=ku -syntenicNet) > do.log 2>&1
    # real 8m48.504s
    cat fb.loaLoa1.chainOncVol1Link.txt
    # 65628794 bases of 87533141 (74.976%) in intersection

    time (doRecipBest.pl -buildDir=`pwd` loaLoa1 oncVol1) > rbest.log 2>&1 &
    # real 2m16.159s

    # and for the swap:
    mkdir /hive/data/genomes/oncVol1/bed/blastz.loaLoa1.swap
    cd /hive/data/genomes/oncVol1/bed/blastz.loaLoa1.swap

    time (doBlastzChainNet.pl -verbose=2 \
      /hive/data/genomes/loaLoa1/bed/lastzOncVol1.2015-08-17/DEF \
        -swap -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > swap.log 2>&1
    # real 4m35.385s
    cat fb.oncVol1.chainLoaLoa1Link.txt
    # 67832327 bases of 94327777 (71.911%) in intersection

    time (doRecipBest.pl -workhorse=hgwdev -buildDir=`pwd` oncVol1 loaLoa1) \
      > rbest.log 2>&1
    # real 2m37.822s

########################################################################
########################################################################
# LASTZ Loa loa/Eye worm - loaLoa1 vs.
#       Trichinella spiralis/Trichinella - triSpi1
# (DONE - 2015-08-17 - Hiram)
    mkdir /hive/data/genomes/loaLoa1/bed/lastzTriSpi1.2015-08-17
    cd /hive/data/genomes/loaLoa1/bed/lastzTriSpi1.2015-08-17

    cat << '_EOF_' > DEF
# loaLoa1 vs triSpi1
BLASTZ=/cluster/bin/penn/lastz-distrib-1.03.66/bin/lastz
BLASTZ_H=2000
BLASTZ_M=50

# TARGET:Loa loa/Eye worm - loaLoa1
SEQ1_DIR=/hive/data/genomes/loaLoa1/loaLoa1.2bit
SEQ1_LEN=/hive/data/genomes/loaLoa1/chrom.sizes
SEQ1_CHUNK=4000000
SEQ1_LAP=10000
SEQ1_LIMIT=100

# QUERY: Trichinella spiralis/Trichinella - triSpi1
SEQ2_DIR=/hive/data/genomes/triSpi1/triSpi1.2bit
SEQ2_LEN=/hive/data/genomes/triSpi1/chrom.sizes
SEQ2_CHUNK=4000000
SEQ2_LIMIT=400
SEQ2_LAP=0

BASE=/hive/data/genomes/loaLoa1/bed/lastzTriSpi1.2015-08-17
TMPDIR=/dev/shm
'_EOF_'
    # << happy emacs

    time (doBlastzChainNet.pl `pwd`/DEF -verbose=2 -workhorse=hgwdev \
      -bigClusterHub=ku -smallClusterHub=ku -syntenicNet) > do.log 2>&1
    # real 3m29.226s
    cat fb.loaLoa1.chainTriSpi1Link.txt
    # 2584348 bases of 87533141 (2.952%) in intersection

    time (doRecipBest.pl -buildDir=`pwd` loaLoa1 triSpi1) > rbest.log 2>&1 &
    # real 0m22.703s

    # and for the swap:
    mkdir /hive/data/genomes/triSpi1/bed/blastz.loaLoa1.swap
    cd /hive/data/genomes/triSpi1/bed/blastz.loaLoa1.swap

    time (doBlastzChainNet.pl -verbose=2 \
      /hive/data/genomes/loaLoa1/bed/lastzTriSpi1.2015-08-17/DEF \
        -swap -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > swap.log 2>&1
    # real 0m46.744s
    cat fb.triSpi1.chainLoaLoa1Link.txt
    # 2903026 bases of 58558192 (4.958%) in intersection

    time (doRecipBest.pl -workhorse=hgwdev -buildDir=`pwd` triSpi1 loaLoa1) \
      > rbest.log 2>&1
    # real 0m24.590s

########################################################################
########################################################################
# LASTZ Loa loa/Eye worm - loaLoa1 vs.
#       Trichuris suis/Whipworm - triSui1
# (DONE - 2015-08-17 - Hiram)
    mkdir /hive/data/genomes/loaLoa1/bed/lastzTriSui1.2015-08-17
    cd /hive/data/genomes/loaLoa1/bed/lastzTriSui1.2015-08-17

    cat << '_EOF_' > DEF
# loaLoa1 vs triSui1
BLASTZ=/cluster/bin/penn/lastz-distrib-1.03.66/bin/lastz
BLASTZ_H=2000
BLASTZ_M=50

# TARGET:Loa loa/Eye worm - loaLoa1
SEQ1_DIR=/hive/data/genomes/loaLoa1/loaLoa1.2bit
SEQ1_LEN=/hive/data/genomes/loaLoa1/chrom.sizes
SEQ1_CHUNK=4000000
SEQ1_LAP=10000
SEQ1_LIMIT=100

# QUERY: Trichuris suis/Whipworm - triSui1
SEQ2_DIR=/hive/data/genomes/triSui1/triSui1.2bit
SEQ2_LEN=/hive/data/genomes/triSui1/chrom.sizes
SEQ2_CHUNK=4000000
SEQ2_LIMIT=400
SEQ2_LAP=0

BASE=/hive/data/genomes/loaLoa1/bed/lastzTriSui1.2015-08-17
TMPDIR=/dev/shm
'_EOF_'
    # << happy emacs

    time (doBlastzChainNet.pl `pwd`/DEF -verbose=2 -workhorse=hgwdev \
      -bigClusterHub=ku -smallClusterHub=ku -syntenicNet) > do.log 2>&1
    # real 2m55.624s
    cat fb.loaLoa1.chainTriSui1Link.txt
    # 2251188 bases of 87533141 (2.572%) in intersection

    time (doRecipBest.pl -buildDir=`pwd` loaLoa1 triSui1) > rbest.log 2>&1 &
    # real 0m19.460s

    # and for the swap:
    mkdir /hive/data/genomes/triSui1/bed/blastz.loaLoa1.swap
    cd /hive/data/genomes/triSui1/bed/blastz.loaLoa1.swap

    time (doBlastzChainNet.pl -verbose=2 \
      /hive/data/genomes/loaLoa1/bed/lastzTriSui1.2015-08-17/DEF \
        -swap -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > swap.log 2>&1
    # real 0m41.503s
    cat fb.triSui1.chainLoaLoa1Link.txt
    # 2351505 bases of 71825323 (3.274%) in intersection

    time (doRecipBest.pl -workhorse=hgwdev -buildDir=`pwd` triSui1 loaLoa1) \
      > rbest.log 2>&1
    # real 0m20.812s

########################################################################
