User Tools

Site Tools


genetica:grep4dbs
#!/bin/sh
 
debug=1
 
pairs=$1
shift
 
files=("$@")
for db in "${files[@]}"
do
	echo "Reordering ${db}"
	awk {'print $1" "$3" "$2" "$4" "$5" "$6" "$7'} ${db} > ${db}_tmp.reorder
done
 
echo "Searching matches..."
 
for db in "${files[@]}"
do
	echo "Searching in ${db}"
	gpcc.pl ${pairs} ${db}_tmp.reorder
	mv ${db}_tmp.reorder.cool ${db}.ok
done
 
echo "Done!"
 
if [ $debug = 0 ] ; then
	for db in "${files[@]}"
	do
		rm -rf ${db}_tmp.*
	done
#	output_tmp.greped
fi
genetica/grep4dbs.txt · Last modified: 2020/08/04 10:58 (external edit)