#!/bin/csh
#	Search given sequence vs given blocks
#	$1=blocks file, $2=sequence file, $3=output file
set bindir = ./
set tmp = ../tmp/$$

unalias mv
unalias cp
unalias rm

echo "ERror_level          2" > $tmp.cs
echo "DBase                $1" >> $tmp.cs
echo "SQuence              $2" >> $tmp.cs
echo "OUtput_file          $3.bli" >> $tmp.cs
echo "TYpe                 auto" >> $tmp.cs
echo "STrands_to_search    2" >> $tmp.cs
echo "FRequency            $bindir/default.amino.frq" >> $tmp.cs
echo "GEnetic_code         0" >> $tmp.cs
echo "HIstogram            No" >> $tmp.cs
echo "REpeats_allowed      Yes" >> $tmp.cs
#	rarely get any results when use SV...
#echo "SV                   yes" >> $tmp.cs
echo "NUmber_to_report     0" >> $tmp.cs
echo "COnversion_method    3" >> $tmp.cs
echo "OP alts: 5.0 $bindir/default.qij :alts" >> $tmp.cs
	
$bindir/blimps-bin/blimps $tmp.cs >& $tmp.err
$bindir/blimps-bin/blkprob $tmp.cs -mast -E 10 -C 800 -all -S $bindir/diy.stp >& $3


rm $tmp.cs $tmp.err >& /dev/null

exit(0)
