########################################################################
# LASTZ Trichinella spiralis/Trichinella - triSpi1 vs.
#       Trichuris suis/Whipworm - triSui1
# (DONE - 2015-08-17 - Hiram)
    mkdir /hive/data/genomes/triSpi1/bed/lastzTriSui1.2015-08-17
    cd /hive/data/genomes/triSpi1/bed/lastzTriSui1.2015-08-17

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

# TARGET:Trichinella spiralis/Trichinella - triSpi1
SEQ1_DIR=/hive/data/genomes/triSpi1/triSpi1.2bit
SEQ1_LEN=/hive/data/genomes/triSpi1/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/triSpi1/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 3m53.251s
    cat fb.triSpi1.chainTriSui1Link.txt
    # 10012508 bases of 58558192 (17.098%) in intersection

    time (doRecipBest.pl -buildDir=`pwd` triSpi1 triSui1) > rbest.log 2>&1 &
    # real 0m32.861s

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

    time (doBlastzChainNet.pl -verbose=2 \
      /hive/data/genomes/triSpi1/bed/lastzTriSui1.2015-08-17/DEF \
        -swap -workhorse=hgwdev -smallClusterHub=ku -bigClusterHub=ku \
            -syntenicNet) > swap.log 2>&1
    # real 1m10.959s
    cat fb.triSui1.chainTriSpi1Link.txt
    # 10614316 bases of 71825323 (14.778%) in intersection

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

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