#!/bin/bash

# (1) Subset Seeds

for R in 10
#for R in 100000
#for R in 10000000
do
    for LN in 16 32
    do
        for N in 1 2 3 4 5 6
        do
	  for W in "1.95,2.05" "2.05,2.15" "2.15,2.25" "2.25,2.35" "2.35,2.45" "2.45,2.55" "2.55,2.65" "2.65,2.75"  "2.75,2.85" "2.85,2.95" "2.95,3.05"
          #for W in "1.90,2.00" "2.00,2.10" "2.10,2.20" "2.20,2.30" "2.30,2.40" "2.40,2.50" "2.50,2.60" "2.60,2.70"  "2.70,2.80" "2.80,2.90" "2.90,3.00" "3.00,3.10" "3.10,3.20"
	  #for W in "1.8,3.4"
	  do
	     for J in "0.95"
	     #for J in "0.95" "0.96" "0.97" "0.98" "0.99"
	     do
	     echo "LN:${LN} N:${N} W:${W} J:${J}"
            # non-transitive
	    nice -n +19 ./iedera -k -w ${W} -j ${J} -n ${N} -r ${R} -l ${LN} -s 1,7 -A 33 -B 33 -b 0.0503351,0.095519,0.084947,0.08256,0.078046,0.025194,0.064433,0.061868,0.048632,0.038649,0.061506,0.02028,0.051294,0.038112,0.005429,0.011006,0.011176,0.007451,0.003644,0.020742,0.0012357,0.0035366,0.0118892,0.0087731,0.0058249,0.0192602,0.0054138,0.0049435,0.0060033,0.0008413,0.00990492,0.00306148,0.0584889 -f 0.014251,0.031834,0.031929,0.035693,0.037188,0.013482,0.037155,0.038473,0.032783,0.028364,0.04757,0.017632,0.047488,0.037003,0.005441,0.011632,0.012928,0.009154,0.004624,0.027222,0.001698,0.004972,0.017521,0.013634,0.0094014,0.0325966,0.0101199,0.0098587,0.0124678,0.0017749,0.0239453,0.0084784,0.331686  -e results.non-transitive.B62.L${LN}.dat -o results.non-transitive.B62.L${LN}.dat
	    # transitive-predefined
            nice -n +19 ./iedera -k -w ${W} -j ${J} -n ${N} -r ${R} -l ${LN} -s 1,7 -A 11 -B 11 -f 0.217708,0.133636,0.04798,0.0264,0.149884,0.00201,0.00286,0.003472,0.0094,0.074956,0.331685 -b 0.472226,0.190482,0.062172,0.032752,0.131924,0.00458,0.00234,0.002078,0.005824,0.037136,0.05849 -e results.transitive-predefined.B62.L${LN}.dat -o results.transitive-predefined.B62.L${LN}.dat
	    # transitive-ab-initio
	    nice -n +19 ./iedera -k -w ${W} -j ${J} -n ${N} -r ${R} -l ${LN} -s 1,7 -A 20 -B 20 -f 0.23033,0.01127,0.02688,0.04438,0.11105,0.02367,0.03751,0.00497,0.01994,0.02482,0.05136,0.00744,0.00940,0.00347,0.00708,0.00986,0.01247,0.02395,0.00848,0.33169 -b 0.48321,0.01894,0.04263,0.06298,0.15215,0.02704,0.03898,0.00486,0.01605,0.01945,0.03490,0.00479,0.00583,0.00208,0.00372,0.00494,0.00600,0.00991,0.00306,0.05849 -e results.transitive-ab-initio.B62.L${LN}.dat -o results.transitive-ab-initio.B62.L${LN}.dat
	    # non-tree-transitive
	    nice -n +19 ./iedera -k -w ${W} -j ${J} -n ${N} -r ${R} -l ${LN} -s 1,7 -A 47 -B 22 -M \{\{1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1\},\{1,1,1,1,1,0,0,0,1,0,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,0,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1\},\{0,1,1,1,1,0,1,1,0,1,0,1,1,1,0,0,1,1,0,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1\},\{0,0,1,0,1,1,0,0,0,0,0,0,0,1,0,1,1,1,1,0,1,0,1,1,0,0,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1\},\{0,0,0,1,1,0,0,1,0,1,1,0,1,1,0,1,0,1,1,0,0,0,0,1,0,0,1,1,0,0,1,1,0,1,1,1,0,1,1,1,1,1,1,0,1,1,1\},\{0,0,0,0,0,1,1,1,1,0,1,1,1,1,1,0,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0,0,1,1\},\{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,0,1,0,0,1,0,0,1,1\},\{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,0,1,1\},\{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,0,1,1\},\{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,1,1\},\{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1\},\{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1\}\} -f 0.01612,0.01412,0.02288,0.00065,0.14347,0.00154,0.00168,0.01030,0.01514,0.01052,0.01076,0.01056,0.00419,0.00591,0.00192,0.00081,0.02840,0.05675,0.00273,0.00330,0.00029,0.01035,0.00191,0.03588,0.00030,0.02367,0.00466,0.00046,0.02768,0.00072,0.00759,0.01365,0.00286,0.01994,0.00964,0.00210,0.00983,0.04172,0.01117,0.00940,0.00744,0.00986,0.03641,0.00347,0.00708,0.00848,0.33169 -b 0.05108,0.03647,0.06770,0.00256,0.27712,0.00366,0.00485,0.01880,0.02941,0.01701,0.01457,0.01731,0.00757,0.00956,0.00389,0.00193,0.03584,0.07233,0.00571,0.00690,0.00064,0.01405,0.00281,0.04220,0.00068,0.02704,0.00418,0.00129,0.03316,0.00190,0.00860,0.01192,0.00234,0.01605,0.00704,0.00180,0.00583,0.02786,0.00752,0.00583,0.00479,0.00494,0.01591,0.00208,0.00372,0.00306,0.05849 -e results.non-tree-transitive.B62.L${LN}.dat -o results.non-tree-transitive.B62.L${LN}.dat
                done
	    done
	done
    done
done



  
# (2) Blastp/Vector Seeds

# (2.1) Blastp
for LN in 16 32 
do
    for TH in 5 6 7 8 9 10 11 12 13 14 15
    do
        echo "BLASTP, LN : ${LN}, TH : ${TH}"
	
	nice -n +19 ./iedera -d -A 16 -B 1 \
	-M "{{1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}}"\
	-V -S "{{-4,-3,-2,-1,0,1,2,3,4,5,6,7,8,9,10,11}}"\
	-f 0.01273,0.071518,0.113096,0.151374,0.132124,0.088224,0.066816,0.032424,0.109299,0.073896,0.091497,0.029312,0.00928,0.011931,0.0,0.00647\
	-b 0.04525,0.200448,0.228342,0.217654,0.137296,0.063092,0.036466,0.012966,0.028496,0.013385,0.012616,0.002527,6.87E-4,6.09E-4,0.0,1.7E-4\
	-T ${TH} -l ${LN} -s 3,3 -e results.blastp.B62.L${LN}.dat -o results.blastp.B62.L${LN}.dat
    done
done


# (2.2) Vector Seeds
for LN in 16 32
do
    for TH in 7 8 9 10 11 12 13 14 15 16 17 18 19 20
    do
        echo "VECTOR, LN : ${LN}, TH : ${TH}"
	
	nice -n +19 ./iedera -A 16 -B 2 \
	-M "{{1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},{1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}}"\
	-V -S "{{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{-4,-3,-2,-1,0,1,2,3,4,5,6,7,8,9,10,11}}"\
	-f 0.01273,0.071518,0.113096,0.151374,0.132124,0.088224,0.066816,0.032424,0.109299,0.073896,0.091497,0.029312,0.00928,0.011931,0.0,0.00647\
	-b 0.04525,0.200448,0.228342,0.217654,0.137296,0.063092,0.036466,0.012966,0.028496,0.013385,0.012616,0.002527,6.87E-4,6.09E-4,0.0,1.7E-4\
	-T ${TH} -l ${LN} -m 101101,111001,100111,11011  -e results.vseeds.B62.L${LN}.dat -o results.vseeds.B62.L${LN}.dat
    done
done


