########################################################################
# LASTZ Bursaphelenchus xylophilus/Pine wood nematode - burXyl1 vs.
#       Brugia malayi/Filarial worm - bruMal2
# (DONE - 2015-08-17 - Hiram)
    mkdir /hive/data/genomes/burXyl1/bed/lastzBruMal2.2015-08-17
    cd /hive/data/genomes/burXyl1/bed/lastzBruMal2.2015-08-17

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

# TARGET:Bursaphelenchus xylophilus/Pine wood nematode - burXyl1
SEQ1_DIR=/hive/data/genomes/burXyl1/burXyl1.2bit
SEQ1_LEN=/hive/data/genomes/burXyl1/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/burXyl1/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 3m38.873s
    cat fb.burXyl1.chainBruMal2Link.txt
    # 4276207 bases of 73100506 (5.850%) in intersection

    time (doRecipBest.pl -buildDir=`pwd` burXyl1 bruMal2) > rbest.log 2>&1 &
    # real 10m27.476s

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

    time (doBlastzChainNet.pl -verbose=2 \
      /hive/data/genomes/burXyl1/bed/lastzBruMal2.2015-08-17/DEF \
        -swap -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > swap.log 2>&1
    # real 1m29.297s
    cat fb.bruMal2.chainBurXyl1Link.txt
    # 4352556 bases of 87424120 (4.979%) in intersection

    time (doRecipBest.pl -workhorse=hgwdev -buildDir=`pwd` bruMal2 burXyl1) \
      > rbest.log 2>&1
    # real 0m32.805s

########################################################################
########################################################################
# LASTZ Bursaphelenchus xylophilus/Pine wood nematode - burXyl1 vs.
#       Dirofilaria immitis/Dog heartworm - dirImm1
# (DONE - 2015-08-17 - Hiram)
    mkdir /hive/data/genomes/burXyl1/bed/lastzDirImm1.2015-08-17
    cd /hive/data/genomes/burXyl1/bed/lastzDirImm1.2015-08-17

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

# TARGET:Bursaphelenchus xylophilus/Pine wood nematode - burXyl1
SEQ1_DIR=/hive/data/genomes/burXyl1/burXyl1.2bit
SEQ1_LEN=/hive/data/genomes/burXyl1/chrom.sizes
SEQ1_CHUNK=4000000
SEQ1_LAP=10000
SEQ1_LIMIT=100

# QUERY: Dirofilaria immitis/Dog heartworm - dirImm1
SEQ2_DIR=/hive/data/genomes/dirImm1/dirImm1.2bit
SEQ2_LEN=/hive/data/genomes/dirImm1/chrom.sizes
SEQ2_CHUNK=4000000
SEQ2_LIMIT=400
SEQ2_LAP=0

BASE=/hive/data/genomes/burXyl1/bed/lastzDirImm1.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 3m47.024s
    cat fb.burXyl1.chainDirImm1Link.txt
    # 4172810 bases of 73100506 (5.708%) in intersection

    time (doRecipBest.pl -buildDir=`pwd` burXyl1 dirImm1) > rbest.log 2>&1 &
    # real 4m24.670s

    # and for the swap:
    mkdir /hive/data/genomes/dirImm1/bed/blastz.burXyl1.swap
    cd /hive/data/genomes/dirImm1/bed/blastz.burXyl1.swap

    time (doBlastzChainNet.pl -verbose=2 \
      /hive/data/genomes/burXyl1/bed/lastzDirImm1.2015-08-17/DEF \
        -swap -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > swap.log 2>&1
    # real 1m2.076s
    cat fb.dirImm1.chainBurXyl1Link.txt
    # 4086607 bases of 84923352 (4.812%) in intersection

    time (doRecipBest.pl -workhorse=hgwdev -buildDir=`pwd` dirImm1 burXyl1) \
      > rbest.log 2>&1
    # real 0m36.222s

########################################################################
########################################################################
# LASTZ Bursaphelenchus xylophilus/Pine wood nematode - burXyl1 vs.
#       Loa loa/Eye worm - loaLoa1
# (DONE - 2015-08-17 - Hiram)
    mkdir /hive/data/genomes/burXyl1/bed/lastzLoaLoa1.2015-08-17
    cd /hive/data/genomes/burXyl1/bed/lastzLoaLoa1.2015-08-17

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

# TARGET:Bursaphelenchus xylophilus/Pine wood nematode - burXyl1
SEQ1_DIR=/hive/data/genomes/burXyl1/burXyl1.2bit
SEQ1_LEN=/hive/data/genomes/burXyl1/chrom.sizes
SEQ1_CHUNK=4000000
SEQ1_LAP=10000
SEQ1_LIMIT=100

# QUERY: Loa loa/Eye worm - loaLoa1
SEQ2_DIR=/hive/data/genomes/loaLoa1/loaLoa1.2bit
SEQ2_LEN=/hive/data/genomes/loaLoa1/chrom.sizes
SEQ2_CHUNK=4000000
SEQ2_LIMIT=400
SEQ2_LAP=0

BASE=/hive/data/genomes/burXyl1/bed/lastzLoaLoa1.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 3m31.468s
    cat fb.burXyl1.chainLoaLoa1Link.txt
    # 4309744 bases of 73100506 (5.896%) in intersection

    time (doRecipBest.pl -buildDir=`pwd` burXyl1 loaLoa1) > rbest.log 2>&1 &
    # real 20m32.806s

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

    time (doBlastzChainNet.pl -verbose=2 \
      /hive/data/genomes/burXyl1/bed/lastzLoaLoa1.2015-08-17/DEF \
        -swap -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > swap.log 2>&1
    # real 0m50.405s
    cat fb.loaLoa1.chainBurXyl1Link.txt
    # 4145414 bases of 87533141 (4.736%) in intersection

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

########################################################################
########################################################################
# LASTZ Bursaphelenchus xylophilus/Pine wood nematode - burXyl1 vs.
#       Onchocerca volvulus/O. volvulus - oncVol1
# (DONE - 2015-08-17 - Hiram)
    mkdir /hive/data/genomes/burXyl1/bed/lastzOncVol1.2015-08-17
    cd /hive/data/genomes/burXyl1/bed/lastzOncVol1.2015-08-17

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

# TARGET:Bursaphelenchus xylophilus/Pine wood nematode - burXyl1
SEQ1_DIR=/hive/data/genomes/burXyl1/burXyl1.2bit
SEQ1_LEN=/hive/data/genomes/burXyl1/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/burXyl1/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 3m0.033s
    cat fb.burXyl1.chainOncVol1Link.txt
    # 4362593 bases of 73100506 (5.968%) in intersection

    time (doRecipBest.pl -buildDir=`pwd` burXyl1 oncVol1) > rbest.log 2>&1 &
    # real 2m39.468s

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

    time (doBlastzChainNet.pl -verbose=2 \
      /hive/data/genomes/burXyl1/bed/lastzOncVol1.2015-08-17/DEF \
        -swap -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > swap.log 2>&1
    # real 0m46.084s
    cat fb.oncVol1.chainBurXyl1Link.txt
    # 4315151 bases of 94327777 (4.575%) in intersection

    time (doRecipBest.pl -workhorse=hgwdev -buildDir=`pwd` oncVol1 burXyl1) \
      > rbest.log 2>&1
    # real 0m40.794s

########################################################################
########################################################################
# LASTZ Bursaphelenchus xylophilus/Pine wood nematode - burXyl1 vs.
#       Trichinella spiralis/Trichinella - triSpi1
# (DONE - 2015-08-17 - Hiram)
    mkdir /hive/data/genomes/burXyl1/bed/lastzTriSpi1.2015-08-17
    cd /hive/data/genomes/burXyl1/bed/lastzTriSpi1.2015-08-17

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

# TARGET:Bursaphelenchus xylophilus/Pine wood nematode - burXyl1
SEQ1_DIR=/hive/data/genomes/burXyl1/burXyl1.2bit
SEQ1_LEN=/hive/data/genomes/burXyl1/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/burXyl1/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 3m25.400s
    cat fb.burXyl1.chainTriSpi1Link.txt
    # 2610218 bases of 73100506 (3.571%) in intersection

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

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

    time (doBlastzChainNet.pl -verbose=2 \
      /hive/data/genomes/burXyl1/bed/lastzTriSpi1.2015-08-17/DEF \
        -swap -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > swap.log 2>&1
    # real 0m45.807s
    cat fb.triSpi1.chainBurXyl1Link.txt
    # 2789875 bases of 58558192 (4.764%) in intersection

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

########################################################################
########################################################################
# LASTZ Bursaphelenchus xylophilus/Pine wood nematode - burXyl1 vs.
#       Trichuris suis/Whipworm - triSui1
# (DONE - 2015-08-17 - Hiram)
    mkdir /hive/data/genomes/burXyl1/bed/lastzTriSui1.2015-08-17
    cd /hive/data/genomes/burXyl1/bed/lastzTriSui1.2015-08-17

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

# TARGET:Bursaphelenchus xylophilus/Pine wood nematode - burXyl1
SEQ1_DIR=/hive/data/genomes/burXyl1/burXyl1.2bit
SEQ1_LEN=/hive/data/genomes/burXyl1/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/burXyl1/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 3m22.253s
    cat fb.burXyl1.chainTriSui1Link.txt
    # 2802111 bases of 73100506 (3.833%) in intersection

    time (doRecipBest.pl -buildDir=`pwd` burXyl1 triSui1) > rbest.log 2>&1 &
    # real 4m21.610s

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

    time (doBlastzChainNet.pl -verbose=2 \
      /hive/data/genomes/burXyl1/bed/lastzTriSui1.2015-08-17/DEF \
        -swap -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > swap.log 2>&1
    # real 0m43.922s
    cat fb.triSui1.chainBurXyl1Link.txt
    # 2888717 bases of 71825323 (4.022%) in intersection

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

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